SaleOrderFormList.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. <template>
  2. <div class="p-2">
  3. <!--查询区域-->
  4. <div class="jeecg-basic-table-form-container">
  5. <a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="{ style: 'width: 200px' }">
  6. <a-row :gutter="24">
  7. <a-col :lg="8">
  8. <a-form-item name="billDate">
  9. <template #label><span title="单据日期(bill date)">单据日期(bill date)</span></template>
  10. <a-range-picker value-format="YYYY-MM-DD" v-model:value="queryParam.billDate" class="query-group-cust" />
  11. </a-form-item>
  12. </a-col>
  13. <a-col :lg="8">
  14. <a-form-item name="project">
  15. <template #label><span title="系统项目(project)">系统项目(project)</span></template>
  16. <ApiSelect
  17. :api="ProjectOption"
  18. showSearch
  19. v-model:value="queryParam.project"
  20. :filterOption="true"
  21. resultField="records"
  22. labelField="code"
  23. valueField="id"
  24. :params="{ pageSize: -1 ,status:1}"
  25. optionFilterProp="label"
  26. />
  27. </a-form-item>
  28. </a-col>
  29. <template v-if="toggleSearchStatus">
  30. <a-col :lg="8">
  31. <a-form-item name="billCode">
  32. <template #label><span title="订单编号(bill code)">订单单号(bill code)</span></template>
  33. <JInput placeholder="请输入订单编号(bill code)" v-model:value="queryParam.billCode" allow-clear AutoComplete="off" />
  34. </a-form-item>
  35. </a-col>
  36. <a-col :lg="16">
  37. <a-form-item name="customer">
  38. <template #label><span title="客户(customer)">客户(customer)</span></template>
  39. <JSelect v-model:value="queryParam.customer" :get-option-url="CustomerOption" :showField="showField" :param="{status:1}"></JSelect>
  40. </a-form-item>
  41. </a-col>
  42. <a-col :lg="8">
  43. <a-form-item name="priority">
  44. <template #label><span title="优先级(priority)">优先级(priority)</span></template>
  45. <JDictSelectTag v-model:value="queryParam.priority" placeholder="请选择" dictCode="priority" style="width: 100%" />
  46. </a-form-item>
  47. </a-col>
  48. <a-col :lg="16">
  49. <a-form-item name="customer">
  50. <template #label><span title="客户简称(abbreviation)">客户简称(abbreviation)</span></template>
  51. <JSelect v-model:value="queryParam.customer" :get-option-url="CustomerOption" :showField="showField2" :param="{status:1}"></JSelect>
  52. </a-form-item>
  53. </a-col>
  54. <a-col :lg="8">
  55. <a-form-item name="productionClass">
  56. <template #label><span title="产品分类(production class)">产品分类(production class)</span></template>
  57. <ApiSelect
  58. :api="ClassList"
  59. showSearch
  60. v-model:value="queryParam.productionClass"
  61. :filterOption="true"
  62. resultField="records"
  63. labelField="name"
  64. valueField="id"
  65. :params="{ pageSize: -1 }"
  66. optionFilterProp="label"
  67. />
  68. </a-form-item>
  69. </a-col>
  70. <a-col :lg="8">
  71. <a-form-item name="model">
  72. <template #label><span title="机型(model)">机型(model)</span></template>
  73. <JDictSelectTag v-model:value="queryParam.model" placeholder="请选择" dictCode="model_typer" style="width: 100%" />
  74. </a-form-item>
  75. </a-col>
  76. <a-col :lg="8">
  77. <a-form-item name="maker">
  78. <template #label><span title="厂家(maker)">厂家(maker)</span></template>
  79. <JDictSelectTag v-model:value="queryParam.maker" placeholder="请选择" dictCode="factory" />
  80. </a-form-item>
  81. </a-col>
  82. <a-col :lg="8">
  83. <a-form-item name="shipName" >
  84. <template #label><span title="船(shipName)">船(shipName)</span></template>
  85. <JInput placeholder="请输入船(shipName)" v-model:value="queryParam.shipName" allow-clear ></JInput>
  86. </a-form-item>
  87. </a-col>
  88. <a-col :lg="8">
  89. <a-form-item name="imo" >
  90. <template #label><span title="船IMO(imo)">船IMO(imo)</span></template>
  91. <JInput placeholder="请输入船IMO(imo)" v-model:value="queryParam.imo" allow-clear ></JInput>
  92. </a-form-item>
  93. </a-col>
  94. <a-col :lg="8">
  95. <a-form-item name="sourceCode2" >
  96. <template #label><span title="合同来源(sourceCode)">合同来源(sourceCode)</span></template>
  97. <JInput placeholder="请输入合同来源(sourceCode)" v-model:value="queryParam.sourceCode2" allow-clear ></JInput>
  98. </a-form-item>
  99. </a-col>
  100. <a-col :lg="8">
  101. <a-form-item name="sourceCode" >
  102. <template #label><span title="报价单来源(sourceCode)">报价单来源(sourceCode)</span></template>
  103. <JInput placeholder="请输入报价单来源(sourceCode)" v-model:value="queryParam.sourceCode" allow-clear ></JInput>
  104. </a-form-item>
  105. </a-col>
  106. <a-col :lg="8">
  107. <a-form-item name="customerOrder" >
  108. <template #label><span title="客户订单号(customer order)">客户订单号(customer order)</span></template>
  109. <JInput placeholder="请输入客户订单号(customer order)" v-model:value="queryParam.customerOrder" allow-clear ></JInput>
  110. </a-form-item>
  111. </a-col>
  112. <a-col :lg="8">
  113. <a-form-item name="saleDepartment">
  114. <template #label><span title="销售部门(sale saleDepartment)">销售部门(sale department)</span></template>
  115. <JSelectDept v-model:value="queryParam.saleDepartment" :multiple="false" />
  116. </a-form-item>
  117. </a-col>
  118. <a-col :lg="8">
  119. <a-form-item name="salesman">
  120. <template #label><span title="业务员(salesman)">业务员(salesman)</span></template>
  121. <ApiSelect
  122. :api="SaleManOption"
  123. showSearch
  124. v-model:value="queryParam.salesman"
  125. :filterOption="true"
  126. resultField="records"
  127. labelField="realname"
  128. valueField="username"
  129. :params="{ pageSize: -1 }"
  130. optionFilterProp="label"
  131. />
  132. <!-- <JSelectUser v-model:value="queryParam.salesman" placeholder="请选择" :multiple="false" /> -->
  133. </a-form-item>
  134. </a-col>
  135. <a-col :lg="8">
  136. <a-form-item name="submit">
  137. <template #label><span title="提交(submit)">提交(submit)</span></template>
  138. <JDictSelectTag v-model:value="queryParam.submit" placeholder="请选择" dictCode="yes_or_no" style="width: 100%" />
  139. </a-form-item>
  140. </a-col>
  141. <a-col :lg="8">
  142. <a-form-item name="status">
  143. <template #label><span title="客户确认(customer confirm)">客户确认(customer confirm)</span></template>
  144. <JDictSelectTag v-model:value="queryParam.status" placeholder="请选择" dictCode="customer_confirm" />
  145. </a-form-item>
  146. </a-col>
  147. <a-col :lg="8">
  148. <a-form-item name="close">
  149. <template #label><span title="关闭(close)">关闭(close)</span></template>
  150. <JDictSelectTag v-model:value="queryParam.close" placeholder="请选择" dictCode="yes_or_no" style="width: 100%" />
  151. </a-form-item>
  152. </a-col>
  153. <a-col :lg="8">
  154. <a-form-item name="shipName">
  155. <template #label><span title="船名(shipName)">船名(shipName)</span></template>
  156. <ApiSelect
  157. :api="shipOption"
  158. showSearch
  159. allowInput
  160. v-model:value="queryParam.shipName"
  161. :filterOption="true"
  162. resultField="records"
  163. labelField="shipName"
  164. valueField="shipName"
  165. :params="{ pageSize: -1 }"
  166. optionFilterProp="label"
  167. />
  168. </a-form-item>
  169. </a-col>
  170. <a-col :lg="8">
  171. <a-form-item name="organize">
  172. <template #label><span title="组织(organize)">组织(organize)</span></template>
  173. <a-select v-model:value="queryParam.organize">
  174. <a-select-option value="上海">上海</a-select-option>
  175. <a-select-option value="香港">香港</a-select-option>
  176. </a-select>
  177. </a-form-item>
  178. </a-col>
  179. </template>
  180. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  181. <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
  182. <a-col :lg="6">
  183. <a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button>
  184. <a-button preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
  185. <a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
  186. {{ toggleSearchStatus ? '收起' : '展开' }}
  187. <Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
  188. </a>
  189. </a-col>
  190. </span>
  191. </a-col>
  192. </a-row>
  193. </a-form>
  194. </div>
  195. <!--引用表格-->
  196. <BasicTable @register="registerTable" :rowSelection="rowSelection" size="small">
  197. <!--插槽:table标题-->
  198. <template #tableTitle>
  199. <a-button type="primary" v-auth="'saleCode:sale_order:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增(add)</a-button>
  200. <a-button type="primary" v-auth="'saleCode:sale_order:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls">
  201. 导出(export)</a-button
  202. >
  203. <a-button type="primary" v-auth="'saleCode:sale_order:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls2">
  204. 导出明细(export)</a-button
  205. >
  206. <a-button type="primary" @click="submit"> 提交(submit)</a-button>
  207. <a-button type="primary" @click="cancelSubmit"> 取消提交(cancelSubmit)</a-button>
  208. <a-button type="primary" @click="close" v-auth="'saleCode:sale_order:close'"> 关闭(close)</a-button>
  209. <!-- <a-button type="primary" @click="cancelClose"> 取消关闭(cancel close)</a-button> -->
  210. <a-button type="primary" @click="confirm" v-auth="'saleCode:sale_order:confirm'"> 确认(confirm)</a-button>
  211. <a-button type="primary" @click="cancelConfirm" v-auth="'saleCode:sale_order:cancelConfirm'"> 取消确认(cancel confirm)</a-button>
  212. <a-button type="primary" @click="setIsNotified" v-auth="'saleCode:sale_order:setIsNotified'"> Set Notified</a-button>
  213. <a-dropdown v-if="selectedRowKeys.length > 0">
  214. <template #overlay>
  215. <a-menu>
  216. <a-menu-item key="1" @click="batchHandleDelete" v-auth="'saleCode:sale_order_form:deleteBatch'">
  217. <Icon icon="ant-design:delete-outlined" />
  218. 删除(delete)
  219. </a-menu-item>
  220. </a-menu>
  221. </template>
  222. <a-button v-auth="'saleCode:sale_order:delete'"
  223. >批量操作
  224. <Icon icon="mdi:chevron-down" />
  225. </a-button>
  226. </a-dropdown>
  227. </template>
  228. <!--操作栏-->
  229. <template #action="{ record }">
  230. <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
  231. </template>
  232. <!--字段回显插槽-->
  233. <template #bodyCell="{ column, record, index, text }"> </template>
  234. //
  235. <template #viewFile="props">
  236. <a @click="viewFileDetail(props)">查看(view)</a>
  237. </template>
  238. </BasicTable>
  239. <!-- 表单区域 -->
  240. <SaleInquiryFormModal @register="registerModal" @success="handleSuccess" />
  241. <ViewFileListModal ref="ViewFileListModalRef" />
  242. <SelectSaleOrderModal ref="SelectSaleOrderModalRef" @copy-product="handleCopyProduct" />
  243. <SetCloseReasonModal ref="SetCloseReasonModalRef" @success="successfullyClosed"></SetCloseReasonModal>
  244. <ViewHistoryVersionModal ref="ViewHistoryVersionModallRef" />
  245. <SetIsNotified ref="setIsNotifiedRef" @success="handleSuccess" />
  246. </div>
  247. </template>
  248. <script lang="ts" name="saleCode-saleInquiryForm" setup>
  249. import { ref, reactive, computed, unref, onMounted } from 'vue';
  250. import { BasicTable, useTable, TableAction } from '/@/components/Table';
  251. import { useListPage } from '/@/hooks/system/useListPage';
  252. import { useModal } from '/@/components/Modal';
  253. import SaleInquiryFormModal from './components/SaleOrderFormModal.vue';
  254. import { columns, superQuerySchema } from './SaleOrderForm.data';
  255. import SetIsNotified from './components/SetIsNotified.vue';
  256. import {
  257. list,
  258. deleteOne,
  259. batchDelete,
  260. getImportUrl,
  261. getExportUrl,
  262. batchSubmit,
  263. cancelBatchSubmit,
  264. bacthClose,
  265. cancelBatchClose,
  266. bacthConfirm,
  267. cancelBatchConfirm,
  268. ProjectOption,
  269. CustomerOption,
  270. ClassList,
  271. getExportUrlRow,
  272. SaleManOption,
  273. shipOption
  274. } from './SaleOrderyForm.api';
  275. import { cloneDeep } from 'lodash-es';
  276. import { JDictSelectTag, ApiSelect, JInput,JSelect } from '/@/components/Form';
  277. import JSelectUser from '/@/components/Form/src/jeecg/components/JSelectUser.vue';
  278. import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
  279. import ViewFileListModal from './components/ViewFileListModal.vue';
  280. import SelectSaleOrderModal from './components/SelectSaleOrderModal.vue';
  281. import SetCloseReasonModal from '../../publicComponents/SetCloseReasonModal.vue'
  282. import ViewHistoryVersionModal from './components/ViewHistoryVersionModal.vue';
  283. import { message } from 'ant-design-vue';
  284. import { useMethods } from '/@/hooks/system/useMethods';
  285. const { handleExportXlsx, } = useMethods();
  286. const formRef = ref();
  287. var showField = ref('currency_dictText+name');
  288. var showField2 = ref('currency_dictText+abbreviation');
  289. const ViewFileListModalRef = ref();
  290. const SelectSaleOrderModalRef = ref();
  291. const ViewHistoryVersionModallRef = ref();
  292. var SetCloseReasonModalRef = ref();
  293. const setIsNotifiedRef = ref();
  294. const queryParam = reactive<any>({});
  295. //注册model
  296. const [registerModal, { openModal }] = useModal();
  297. //注册table数据
  298. const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
  299. tableProps: {
  300. title: '销售订单',
  301. api: list,
  302. columns,
  303. canResize: false,
  304. useSearchForm: false,
  305. actionColumn: {
  306. width: 300,
  307. fixed: 'right',
  308. },
  309. scroll: {
  310. x: '5300px',
  311. y:'calc(100vh - 400px)',
  312. },
  313. beforeFetch: async (params) => {
  314. let rangerQuery = await setRangeQuery();
  315. return Object.assign(params, rangerQuery);
  316. },
  317. },
  318. exportConfig: {
  319. name: '销售订单',
  320. url: getExportUrl,
  321. params: queryParam,
  322. },
  323. importConfig: {
  324. url: getImportUrl,
  325. success: handleSuccess,
  326. },
  327. });
  328. //注册table数据
  329. const { onExportXls: onExportXls2 } = useListPage({
  330. tableProps: {
  331. title: '销售订单明细',
  332. api: list,
  333. columns,
  334. canResize: false,
  335. useSearchForm: false,
  336. actionColumn: {
  337. width: 300,
  338. fixed: 'right',
  339. },
  340. scroll: {
  341. x: '4000px',
  342. y:'calc(100vh - 400px)',
  343. },
  344. beforeFetch: async (params) => {
  345. let rangerQuery = await setRangeQuery();
  346. return Object.assign(params, rangerQuery);
  347. },
  348. },
  349. exportConfig: {
  350. name: '销售订单明细',
  351. url: '/saleCode/saleOrder/exportXlsDetail',
  352. params: queryParam,
  353. }
  354. });
  355. const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
  356. // 高级查询配置
  357. const superQueryConfig = reactive(superQuerySchema);
  358. /**
  359. * 高级查询事件
  360. */
  361. function handleSuperQuery(params) {
  362. Object.keys(params).map((k) => {
  363. queryParam[k] = params[k];
  364. });
  365. reload();
  366. }
  367. /**
  368. * 新增事件
  369. */
  370. function handleAdd() {
  371. openModal(true, {
  372. isUpdate: false,
  373. showFooter: true,
  374. isRevise: false,
  375. });
  376. }
  377. /**
  378. * 编辑事件
  379. */
  380. function handleEdit(record: Recordable) {
  381. openModal(true, {
  382. record,
  383. isUpdate: true,
  384. showFooter: true,
  385. isRevise: false,
  386. });
  387. }
  388. //修订
  389. function handleRevise(record: Recordable) {
  390. openModal(true, {
  391. record,
  392. isUpdate: true,
  393. showFooter: true,
  394. isRevise: true,
  395. });
  396. }
  397. //查看历史版本
  398. function viewHistoryList(record) {
  399. ViewHistoryVersionModallRef.value.getTable(record);
  400. }
  401. //复制
  402. function handleCopy(record: Recordable) {
  403. SelectSaleOrderModalRef.value.getTable(record);
  404. }
  405. //下载合同
  406. function handleDownContract() {}
  407. //上传基本协议
  408. function handleUploadProtocol() {}
  409. //上传基础协议
  410. function handleExportInvoice() {}
  411. /**
  412. * 详情
  413. */
  414. function handleDetail(record: Recordable) {
  415. openModal(true, {
  416. record,
  417. isUpdate: true,
  418. showFooter: false,
  419. });
  420. }
  421. /**
  422. * 删除事件
  423. */
  424. async function handleDelete(record) {
  425. await deleteOne({ id: record.id }, handleSuccess);
  426. }
  427. /**
  428. * 批量删除事件
  429. */
  430. async function batchHandleDelete() {
  431. await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
  432. }
  433. /**
  434. * 成功回调
  435. */
  436. function handleSuccess() {
  437. (selectedRowKeys.value = []) && reload();
  438. }
  439. async function handleRowExport(record){
  440. var obj={
  441. id : record.id
  442. }
  443. // handleExportXlsx(record.billCode, getExportUrlRow,obj)
  444. handleExportXlsx('OA - '+record.projectName, getExportUrlRow,obj)
  445. }
  446. /**
  447. * 操作栏
  448. */
  449. function getTableAction(record) {
  450. return [
  451. {
  452. label: '导出(export)',
  453. onClick: handleRowExport.bind(null, record),
  454. },
  455. {
  456. label: '编辑(edit)',
  457. onClick: handleEdit.bind(null, record),
  458. auth: 'saleCode:sale_order:edit',
  459. ifShow: record.submit == '0' || !record.submit,
  460. },
  461. {
  462. label: '修订(revise)',
  463. onClick: handleRevise.bind(null, record),
  464. auth: 'saleCode:sale_order:editHis',
  465. ifShow: record.submit == '1',
  466. },
  467. ];
  468. }
  469. /**
  470. * 下拉操作栏
  471. */
  472. function getDropDownAction(record) {
  473. return [
  474. {
  475. label: '详情(detail)',
  476. onClick: handleDetail.bind(null, record),
  477. },
  478. {
  479. label: '查看历史版本(view history)',
  480. onClick: viewHistoryList.bind(null, record),
  481. auth: 'saleCode:sale_inquiry_form:delete',
  482. ifShow: record.submit == '1',
  483. },
  484. {
  485. label: '复制(copy)',
  486. onClick: handleCopy.bind(null, record),
  487. },
  488. // {
  489. // label: '导出发票(export invoice)',
  490. // onClick: handleExportInvoice.bind(null, record),
  491. // auth: 'saleCode:sale_inquiry_form:delete',
  492. // ifShow: record.submit=='1'
  493. // },
  494. // {
  495. // label: '导出预收款发票(export invoice)',
  496. // onClick: handleDetail.bind(null, record),
  497. // auth: 'saleCode:sale_inquiry_form:delete',
  498. // ifShow: record.submit=='1'
  499. // },
  500. {
  501. label: '删除(delete)',
  502. popConfirm: {
  503. title: '是否确认删除',
  504. confirm: handleDelete.bind(null, record),
  505. placement: 'topLeft',
  506. },
  507. auth: 'saleCode:sale_order:delete',
  508. ifShow: record.submit == '0' || !record.submit,
  509. },
  510. ];
  511. }
  512. function submit() {
  513. if (selectedRowKeys.value.length == 0) {
  514. message.warning('请选择数据');
  515. } else {
  516. var ids = selectedRowKeys.value.join(',');
  517. batchSubmit({ ids: ids }, handleSuccess);
  518. }
  519. }
  520. function cancelSubmit() {
  521. if (selectedRowKeys.value.length == 0) {
  522. message.warning('请选择数据');
  523. } else {
  524. var ids = selectedRowKeys.value.join(',');
  525. cancelBatchSubmit({ ids: ids }, handleSuccess);
  526. }
  527. }
  528. function close() {
  529. if (selectedRowKeys.value.length == 0) {
  530. message.warning('请选择数据');
  531. } else {
  532. var ids = selectedRowKeys.value.join(',');
  533. var ids=selectedRowKeys.value.join(',')
  534. SetCloseReasonModalRef.value.getTable(ids)
  535. }
  536. }
  537. function setIsNotified() {
  538. if (selectedRowKeys.value.length == 0) {
  539. message.warning('请选择数据');
  540. } else {
  541. var ids = selectedRowKeys.value.join(',');
  542. setIsNotifiedRef.value.getTable(ids);
  543. }
  544. }
  545. function successfullyClosed(reason,id){
  546. var params={
  547. ids: id,
  548. closeReason: reason
  549. }
  550. bacthClose(params,handleSuccess);
  551. }
  552. // function cancelClose() {
  553. // if (selectedRowKeys.value.length == 0) {
  554. // message.warning('请选择数据');
  555. // } else {
  556. // var ids = selectedRowKeys.value.join(',');
  557. // cancelBatchClose({ ids: ids }, handleSuccess);
  558. // }
  559. // }
  560. function confirm() {
  561. if (selectedRowKeys.value.length == 0) {
  562. message.warning('请选择数据');
  563. } else {
  564. var ids = selectedRowKeys.value.join(',');
  565. bacthConfirm({ ids: ids }, handleSuccess);
  566. }
  567. }
  568. function cancelConfirm() {
  569. if (selectedRowKeys.value.length == 0) {
  570. message.warning('请选择数据');
  571. } else {
  572. var ids = selectedRowKeys.value.join(',');
  573. cancelBatchConfirm({ ids: ids }, handleSuccess);
  574. }
  575. }
  576. function viewFileDetail(props) {
  577. ViewFileListModalRef.value.getTable(props.column.dataIndex, props.record);
  578. }
  579. function handleCopyProduct(data, mainId) {
  580. openModal(true, {
  581. data,
  582. mainId,
  583. isUpdate: false,
  584. showFooter: true,
  585. isCopy: true,
  586. });
  587. }
  588. /* ----------------------以下为原生查询需要添加的-------------------------- */
  589. const toggleSearchStatus = ref<boolean>(false);
  590. const labelCol = reactive({
  591. xs: 24,
  592. sm: 9,
  593. });
  594. const wrapperCol = reactive({
  595. xs: 24,
  596. sm: 15,
  597. });
  598. const labelCol1 = reactive({
  599. xs: 24,
  600. sm: 12,
  601. });
  602. const wrapperCol1 = reactive({
  603. xs: 24,
  604. sm: 12,
  605. });
  606. /**
  607. * 重置
  608. */
  609. function searchReset() {
  610. formRef.value.resetFields();
  611. selectedRowKeys.value = [];
  612. //刷新数据
  613. reload();
  614. }
  615. let rangeField = 'billDate,';
  616. /**
  617. * 设置范围查询条件
  618. */
  619. async function setRangeQuery() {
  620. let queryParamClone = cloneDeep(queryParam);
  621. if (rangeField) {
  622. let fieldsValue = rangeField.split(',');
  623. fieldsValue.forEach((item) => {
  624. if (queryParamClone[item]) {
  625. let range = queryParamClone[item];
  626. queryParamClone[item + '_begin'] = range[0];
  627. queryParamClone[item + '_end'] = range[1];
  628. delete queryParamClone[item];
  629. } else {
  630. queryParamClone[item + '_begin'] = '';
  631. queryParamClone[item + '_end'] = '';
  632. }
  633. });
  634. }
  635. return queryParamClone;
  636. }
  637. </script>
  638. <style lang="less" scoped>
  639. .jeecg-basic-table-form-container {
  640. padding: 0;
  641. .table-page-search-submitButtons {
  642. display: block;
  643. margin-bottom: 8px;
  644. white-space: nowrap;
  645. }
  646. .query-group-cust {
  647. min-width: 100px !important;
  648. }
  649. .query-group-split-cust {
  650. width: 30px;
  651. display: inline-block;
  652. text-align: center;
  653. }
  654. .ant-form-item:not(.ant-form-item-with-help) {
  655. margin-bottom: 8px;
  656. height: 32px;
  657. }
  658. :deep(.ant-picker),
  659. :deep(.ant-input-number) {
  660. width: 100%;
  661. }
  662. }
  663. </style>