OtherOutModal.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. <template>
  2. <j-modal
  3. :title="title"
  4. :width="width"
  5. :visible="visible"
  6. :confirmLoading="confirmLoading"
  7. :keyboard="false"
  8. :forceRender="true"
  9. v-bind:prefixNo="prefixNo"
  10. fullscreen
  11. switchFullscreen
  12. @cancel="handleCancel"
  13. :id="prefixNo"
  14. style="top: 20px; height: 95%"
  15. >
  16. <template slot="footer">
  17. <a-button @click="handleCancel">取消</a-button>
  18. <a-button v-if="billPrintFlag && isShowPrintBtn" @click="handlePrint('其它出库')">三联打印预览</a-button>
  19. <a-button v-if="checkFlag && isCanCheck" :loading="confirmLoading" @click="handleOkAndCheck">保存并审核</a-button>
  20. <a-button type="primary" :loading="confirmLoading" @click="handleOk">保存(Ctrl+S)</a-button>
  21. <!--发起多级审核-->
  22. <a-button v-if="!checkFlag" @click="handleWorkflow()" type="primary">提交流程</a-button>
  23. </template>
  24. <a-spin :spinning="confirmLoading">
  25. <a-form :form="form">
  26. <a-row class="form-row" :gutter="24">
  27. <a-col :lg="6" :md="12" :sm="24">
  28. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
  29. <a-select
  30. placeholder="请选择客户"
  31. v-decorator="['organId', validatorRules.organId]"
  32. :disabled="!rowCanEdit"
  33. :dropdownMatchSelectWidth="false"
  34. showSearch
  35. optionFilterProp="children"
  36. @change="getTatRate"
  37. >
  38. <div slot="dropdownRender" slot-scope="menu">
  39. <v-nodes :vnodes="menu" />
  40. <a-divider style="margin: 4px 0" />
  41. <div
  42. v-if="quickBtn.customer"
  43. style="padding: 4px 8px; cursor: pointer"
  44. @mousedown="(e) => e.preventDefault()"
  45. @click="addCustomer"
  46. >
  47. <a-icon type="plus" /> 新增客户
  48. </div>
  49. </div>
  50. <a-select-option v-for="(item, index) in cusList" :key="index" :value="item.id">
  51. {{ item.supplier }}
  52. </a-select-option>
  53. </a-select>
  54. </a-form-item>
  55. </a-col>
  56. <a-col :lg="6" :md="12" :sm="24">
  57. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  58. <j-date v-decorator="['operTime', validatorRules.operTime]" :show-time="true" />
  59. </a-form-item>
  60. </a-col>
  61. <a-col :lg="6" :md="12" :sm="24">
  62. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  63. <a-input placeholder="请输入单据编号" v-decorator.trim="['number']" />
  64. </a-form-item>
  65. </a-col>
  66. <a-col :lg="6" :md="12" :sm="24">
  67. <a-form-item
  68. :labelCol="labelCol"
  69. :wrapperCol="wrapperCol"
  70. label="仓库名"
  71. >
  72. <a-select v-decorator="['depotId',validatorRules.depotId]" placeholder="请选择仓库名" @change="changeDepot($event,refKeys[0])">
  73. <a-select-option v-for="(item, index) in depotList" :key="index" :value="item.id">
  74. {{ item.depotName }}
  75. </a-select-option>
  76. </a-select>
  77. </a-form-item>
  78. </a-col>
  79. <a-col :lg="6" :md="12" :sm="24">
  80. <a-form-item
  81. :labelCol="labelCol"
  82. :wrapperCol="wrapperCol"
  83. label="税率"
  84. >
  85. <a-input placeholder="自动带出" disabled v-decorator="['taxRate']" />
  86. </a-form-item>
  87. </a-col>
  88. <a-col :lg="6" :md="12" :sm="24">
  89. <a-form-item
  90. v-if="inOutManageFlag && !model.billType"
  91. :labelCol="labelCol"
  92. :wrapperCol="wrapperCol"
  93. label="关联单据"
  94. >
  95. <a-input-search
  96. placeholder="请选择待出库单据"
  97. v-decorator="['linkNumber']"
  98. @search="onSearchLinkNumber"
  99. :readOnly="true"
  100. />
  101. </a-form-item>
  102. </a-col>
  103. </a-row>
  104. <j-editable-table
  105. id="billModal"
  106. :ref="refKeys[0]"
  107. :loading="materialTable.loading"
  108. :columns="materialTable.columns"
  109. :dataSource="materialTable.dataSource"
  110. :minWidth="minWidth"
  111. :maxHeight="300"
  112. :rowNumber="false"
  113. :rowSelection="rowCanEdit"
  114. :actionButton="rowCanEdit"
  115. :dragSortAndNumber="rowCanEdit"
  116. @valueChange="onValueChange"
  117. @added="onAdded"
  118. @deleted="onDeleted"
  119. @focusChange="getUnitInfo"
  120. >
  121. <template #buttonAfter>
  122. <a-row
  123. v-if="rowCanEdit"
  124. :gutter="24"
  125. style="float: left"
  126. data-step="4"
  127. data-title="扫码录入"
  128. data-intro="此功能支持扫码枪扫描商品条码进行录入"
  129. >
  130. <a-col v-if="scanStatus" :md="6" :sm="24">
  131. <a-button @click="scanEnter">扫码录入</a-button>
  132. </a-col>
  133. <a-col v-if="!scanStatus" :md="16" :sm="24" style="padding: 0 8px 0 12px">
  134. <a-input
  135. placeholder="请扫条码或序列号并回车"
  136. v-model="scanBarCode"
  137. @pressEnter="scanPressEnter"
  138. ref="scanBarCode"
  139. />
  140. </a-col>
  141. <a-col v-if="!scanStatus" :md="6" :sm="24" style="padding: 0px 12px 0 0">
  142. <a-button @click="stopScan">收起扫码</a-button>
  143. </a-col>
  144. </a-row>
  145. <a-row v-if="rowCanEdit" :gutter="24" style="float: left; padding-bottom: 5px; padding-left: 20px">
  146. <a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
  147. </a-row>
  148. </template>
  149. <template #depotId="{ value }">
  150. <a-select
  151. disabled
  152. :value="value"
  153. :options="depotList"
  154. >
  155. </a-select>
  156. </template>
  157. <template #wholesaleDecimal="{ handleChange, value, index,allValues }">
  158. <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
  159. <a-tooltip slot="suffix" title="修改后和默认价格不一致">
  160. <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultWholesaleDecimal',value,allValues)" />
  161. </a-tooltip>
  162. </a-input>
  163. </template>
  164. <template #unitPrice="{ handleChange, value, index,allValues }">
  165. <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
  166. <a-tooltip slot="suffix" title="修改后和默认价格不一致">
  167. <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultPurchaseDecimal',value,allValues)" />
  168. </a-tooltip>
  169. </a-input>
  170. </template>
  171. <!-- <template #depotBatchSet>
  172. <a-icon type="down" @click="handleBatchSetDepot" />
  173. </template> -->
  174. <!-- <template #depotAdd>
  175. <a-divider v-if="quickBtn.depot" style="margin: 4px 0" />
  176. <div v-if="quickBtn.depot" style="padding: 4px 8px; cursor: pointer" @click="addDepot">
  177. <a-icon type="plus" /> 新增仓库
  178. </div>
  179. </template> -->
  180. <template #unit="{ handleChange, handleFocus, value }">
  181. <a-select
  182. placeholder="请选择"
  183. v-decorator="['unit']"
  184. :dropdownMatchSelectWidth="false"
  185. showSearch
  186. :allowClear="false"
  187. optionFilterProp="children"
  188. :value="value"
  189. @change="($event) => handleChange($event)"
  190. @focus="($event) => handleFocus($event)"
  191. >
  192. <a-select-option v-for="(item, index) in unitList" :key="index" :value="item.name">
  193. {{ item.name }}
  194. </a-select-option>
  195. </a-select>
  196. </template>
  197. <template #warehousingUser="{ handleChange, value }">
  198. <a-select
  199. placeholder="请选择"
  200. v-decorator="['warehousingUser']"
  201. :dropdownMatchSelectWidth="false"
  202. showSearch
  203. :allowClear="false"
  204. optionFilterProp="children"
  205. :value="value"
  206. :options="currentUserList"
  207. @change="($event) => handleChange($event)"
  208. >
  209. </a-select>
  210. </template>
  211. </j-editable-table>
  212. <a-row class="form-row" :gutter="24">
  213. <a-col :lg="24" :md="24" :sm="24">
  214. <a-form-item :labelCol="labelCol" :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }" label="">
  215. <a-textarea :rows="1" placeholder="请输入备注" v-decorator="['remark']" style="margin-top: 8px" />
  216. </a-form-item>
  217. </a-col>
  218. </a-row>
  219. <a-row class="form-row" :gutter="24">
  220. <a-col :lg="6" :md="12" :sm="24">
  221. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="附件">
  222. <j-upload v-model="fileList" bizPath="bill"></j-upload>
  223. </a-form-item>
  224. </a-col>
  225. </a-row>
  226. <a-row class="form-row" :gutter="24">
  227. <a-col :lg="6" :md="12" :sm="24">
  228. <a-form-item
  229. :labelCol="labelCol"
  230. :wrapperCol="wrapperCol"
  231. label="凭证图片"
  232. data-step="11"
  233. data-title="附件"
  234. data-intro="可以上传与单据相关的图片、文档,支持多个文件"
  235. >
  236. <j-image-upload v-model="imageList" bizPath="material" text="上传图片" isMultiple></j-image-upload>
  237. </a-form-item>
  238. </a-col>
  239. </a-row>
  240. </a-form>
  241. </a-spin>
  242. <customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
  243. <depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
  244. <batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
  245. <import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal>
  246. <wait-bill-list ref="waitBillList" @ok="waitBillListOk"></wait-bill-list>
  247. <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
  248. <bill-print-iframe ref="modalPrint"></bill-print-iframe>
  249. </j-modal>
  250. </template>
  251. <script>
  252. import pick from 'lodash.pick'
  253. import CustomerModal from '../../system/modules/CustomerModal'
  254. import DepotModal from '../../system/modules/DepotModal'
  255. import BatchSetDepot from '../dialog/BatchSetDepot'
  256. import ImportItemModal from '../dialog/ImportItemModal'
  257. import WorkflowIframe from '@/components/tools/WorkflowIframe'
  258. import BillPrintIframe from '../dialog/BillPrintIframe'
  259. import { FormTypes } from '@/utils/JEditableTableUtil'
  260. import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
  261. import { BillModalMixin } from '../mixins/BillModalMixin'
  262. import { getMpListShort } from '@/utils/util'
  263. import JUpload from '@/components/jeecg/JUpload'
  264. import JDate from '@/components/jeecg/JDate'
  265. import Vue from 'vue'
  266. import WaitBillList from '../dialog/WaitBillList'
  267. import JImageUpload from '@/components/jeecg/JImageUpload.vue'
  268. export default {
  269. name: 'OtherOutModal',
  270. mixins: [JEditableTableMixin, BillModalMixin],
  271. components: {
  272. CustomerModal,
  273. DepotModal,
  274. BatchSetDepot,
  275. ImportItemModal,
  276. WaitBillList,
  277. WorkflowIframe,
  278. BillPrintIframe,
  279. JUpload,
  280. JImageUpload,
  281. JDate,
  282. VNodes: {
  283. functional: true,
  284. render: (h, ctx) => ctx.props.vnodes,
  285. },
  286. },
  287. data() {
  288. return {
  289. title: '操作',
  290. width: '1600px',
  291. moreStatus: false,
  292. // 新增时子表默认添加几行空数据
  293. addDefaultRowNum: 1,
  294. visible: false,
  295. operTimeStr: '',
  296. prefixNo: 'QTCK',
  297. fileList: [],
  298. imageList: [],
  299. rowCanEdit: true,
  300. //出入库管理开关,适合独立仓管场景
  301. inOutManageFlag: false,
  302. model: {},
  303. labelCol: {
  304. xs: { span: 24 },
  305. sm: { span: 8 },
  306. },
  307. wrapperCol: {
  308. xs: { span: 24 },
  309. sm: { span: 16 },
  310. },
  311. refKeys: ['materialDataTable'],
  312. activeKey: 'materialDataTable',
  313. materialTable: {
  314. loading: false,
  315. dataSource: [],
  316. columns: [
  317. // {
  318. // title: '仓库名称',
  319. // key: 'depotId',
  320. // width: '8%',
  321. // type: FormTypes.select,
  322. // placeholder: '请选择${title}',
  323. // options: [],
  324. // allowSearch: true,
  325. // validateRules: [{ required: true, message: '${title}不能为空' }],
  326. // },
  327. {
  328. title: '商品条码',
  329. key: 'barCode',
  330. width: '200px',
  331. type: FormTypes.popupJsh,
  332. kind: 'material2',
  333. multi: true,
  334. newBatch: true,
  335. validateRules: [{ required: true, message: '${title}不能为空' }],
  336. },
  337. { title: '名称', key: 'name', width: '120px', type: FormTypes.normal },
  338. // { title: '规格', key: 'standard', width: '9%', type: FormTypes.normal },
  339. // { title: '生产日期', key: 'productionDate', width: '200px', type: FormTypes.normal, disabled: true },
  340. // { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.normal },
  341. // { title: '商品条码', key: 'barCode', width: '9%', type: FormTypes.normal },
  342. { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.slot,validateRules: [{ required: true, message: '${title}不能为空' }], },
  343. { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
  344. { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
  345. { title: '型号', key: 'model', width: '120px', type: FormTypes.normal },
  346. { title: '颜色', key: 'color', width: '120px', type: FormTypes.normal },
  347. { title: '品牌', key: 'brand', width: '120px', type: FormTypes.normal },
  348. { title: '制造商', key: 'mfrs', width: '120px', type: FormTypes.normal },
  349. { title: '扩展信息', key: 'materialOther', width: '120px', type: FormTypes.normal },
  350. { title: '库存', key: 'stock', width: '120px', type: FormTypes.normal },
  351. {
  352. title: '单位',
  353. key: 'unit',
  354. width: '120px',
  355. type: FormTypes.normal,
  356. // options: [],
  357. // allowClear: false,
  358. // slotName: 'unit',
  359. },
  360. { title: '销售价', key: 'wholesaleDecimal', width: '120px', type: FormTypes.slot,validateRules: [{ required: true, message: '${title}不能为空' },{ pattern: /^(([0-9][0-9]*)|([0]\.\d{0,4}|[0-9][0-9]*\.\d{0,4}))$/, message: '金额格式不正确!' }] },
  361. { title: '单位id', key: 'unitId', width: '120px', type: FormTypes.hidden },
  362. { title: '单位列表', key: 'unitList', width: '120px', type: FormTypes.hidden },
  363. { title: '序列号', key: 'snList', width: '120px', type: FormTypes.popupJsh, kind: 'sn', multi: true },
  364. // { title: '有效期', key: 'expirationDate', width: '120px', type: FormTypes.date, readonly: true },
  365. { title: '多属性', key: 'sku', width: '120px', type: FormTypes.normal },
  366. { title: '原数量', key: 'preNumber', width: '120px', type: FormTypes.normal },
  367. { title: '已入库', key: 'finishNumber', width: '120px', type: FormTypes.normal },
  368. {
  369. title: '出库数量',
  370. key: 'operNumber',
  371. width: '120px',
  372. type: FormTypes.inputNumber,
  373. statistics: true,
  374. validateRules: [{ required: true, message: '${title}不能为空' }],
  375. },
  376. { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.slot,validateRules: [{ required: true, message: '${title}不能为空' },{ pattern: /^(([0-9][0-9]*)|([0]\.\d{0,4}|[0-9][0-9]*\.\d{0,4}))$/, message: '金额格式不正确!' }], },
  377. { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber, readonly: true, statistics: true },
  378. // {
  379. // title: '实际出库数量',
  380. // key: 'actualQuantityInStorage',
  381. // width: '120px',
  382. // type: FormTypes.inputNumber,
  383. // validateRules: [{ required: true, message: '实际入库数量不能为空' }],
  384. // },
  385. { title: '出库差异', key: 'warehousingVariance', width: '120px', type: FormTypes.inputNumber },
  386. { title: '出库差异原因', key: 'reasonOfDifference', width: '120px', type: FormTypes.input },
  387. {
  388. title: '出库人',
  389. key: 'warehousingUser',
  390. width: '120px',
  391. type: FormTypes.slot,
  392. slotName: 'warehousingUser',
  393. validateRules: [{ required: true, message: '出库人不能为空' }],
  394. },
  395. { title: '出库时间', key: 'warehousingTime', width: '200px', type: FormTypes.date },
  396. { title: '备注', key: 'remark', width: '120px', type: FormTypes.input },
  397. { title: '关联id', key: 'linkId', width: '120px', type: FormTypes.hidden },
  398. { title: '默认销售价', key: 'defaultWholesaleDecimal', width: '120px', type: FormTypes.hidden },
  399. { title: '默认采购价', key: 'defaultPurchaseDecimal', width: '120px', type: FormTypes.hidden },
  400. ],
  401. },
  402. confirmLoading: false,
  403. validatorRules: {
  404. organId: {
  405. rules: [{ required: true, message: '请选择客户!' }],
  406. },
  407. operTime: {
  408. rules: [{ required: true, message: '请输入单据日期!' }],
  409. },
  410. type: {
  411. rules: [{ required: true, message: '请选择类型!' }],
  412. },
  413. depotId: {
  414. rules: [{ required: true, message: '请选择仓库名!' }],
  415. },
  416. },
  417. url: {
  418. add: '/depotHead/addDepotHeadAndDetail',
  419. edit: '/depotHead/updateDepotHeadAndDetail',
  420. detailList: '/depotItem/getDetailList',
  421. },
  422. unitList: [],
  423. }
  424. },
  425. created() {},
  426. methods: {
  427. //调用完edit()方法之后会自动调用此方法
  428. editAfter() {
  429. this.billStatus = '0'
  430. this.rowCanEdit = true
  431. this.materialTable.columns[0].type = FormTypes.popupJsh
  432. this.changeColumnHide()
  433. this.changeFormTypes(this.materialTable.columns, 'snList', 0)
  434. // this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
  435. this.changeFormTypes(this.materialTable.columns, 'expirationDate', 0)
  436. this.changeFormTypes(this.materialTable.columns, 'preNumber', 0)
  437. this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0)
  438. if (this.action === 'add') {
  439. this.addInit(this.prefixNo)
  440. this.fileList = []
  441. this.imageList = []
  442. } else {
  443. // if (this.model.linkNumber) {
  444. // this.rowCanEdit = false
  445. // this.materialTable.columns[1].type = FormTypes.normal
  446. // }
  447. this.model.operTime = this.model.operTimeStr
  448. this.fileList = this.model.fileName
  449. this.imageList = this.model.voucherPicture
  450. this.$nextTick(() => {
  451. this.form.setFieldsValue(
  452. pick(
  453. this.model,
  454. 'organId',
  455. 'operTime',
  456. 'number',
  457. 'linkNumber',
  458. 'remark',
  459. 'discount',
  460. 'discountMoney',
  461. 'discountLastMoney',
  462. 'otherMoney',
  463. 'accountId',
  464. 'changeAmount',
  465. 'depotId',
  466. 'taxRate'
  467. )
  468. )
  469. })
  470. // 加载子表数据
  471. let params = {
  472. headerId: this.model.id,
  473. mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性
  474. linkType: 'basic',
  475. }
  476. let url = this.readOnly ? this.url.detailList : this.url.detailList
  477. this.requestSubTableData(url, params, this.materialTable)
  478. }
  479. //复制新增单据-初始化单号和日期
  480. if (this.action === 'copyAdd') {
  481. this.model.id = ''
  482. this.model.tenantId = ''
  483. this.copyAddInit(this.prefixNo)
  484. }
  485. this.initSystemConfig()
  486. this.initCustomer(0)
  487. this.initDepot()
  488. this.initPlatform()
  489. this.initQuickBtn()
  490. },
  491. //提交单据时整理成formData
  492. classifyIntoFormData(allValues) {
  493. let totalPrice = 0
  494. let billMain = Object.assign(this.model, allValues.formValue)
  495. let detailArr = allValues.tablesValue[0].values
  496. billMain.type = '出库'
  497. billMain.subType = '其它'
  498. for (let item of detailArr) {
  499. totalPrice += item.allPrice - 0
  500. }
  501. billMain.totalPrice = totalPrice
  502. if (this.fileList && this.fileList.length > 0) {
  503. billMain.fileName = this.fileList
  504. } else {
  505. billMain.fileName = ''
  506. }
  507. if (this.imageList && this.imageList.length > 0) {
  508. billMain.voucherPicture = this.imageList
  509. } else {
  510. billMain.voucherPicture = ''
  511. }
  512. if (this.model.id) {
  513. billMain.id = this.model.id
  514. }
  515. billMain.status = this.billStatus
  516. return {
  517. info: JSON.stringify(billMain),
  518. rows: JSON.stringify(detailArr),
  519. }
  520. },
  521. onSearchLinkNumber() {
  522. this.$refs.waitBillList.show('出库', '销售,采购退货', '1,3')
  523. this.$refs.waitBillList.title = '请选择销售出库或采购退货'
  524. },
  525. waitBillListOk(selectBillDetailRows, linkNumber, remark) {
  526. this.rowCanEdit = false
  527. this.materialTable.columns[1].type = FormTypes.normal
  528. this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
  529. this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
  530. if (selectBillDetailRows && selectBillDetailRows.length > 0) {
  531. let listEx = []
  532. for (let j = 0; j < selectBillDetailRows.length; j++) {
  533. let info = selectBillDetailRows[j]
  534. if (info.finishNumber > 0) {
  535. info.operNumber = info.preNumber - info.finishNumber
  536. }
  537. info.unitPrice = 0
  538. info.allPrice = 0
  539. info.linkId = info.id
  540. listEx.push(info)
  541. this.changeColumnShow(info)
  542. }
  543. this.materialTable.dataSource = listEx
  544. this.$nextTick(() => {
  545. this.form.setFieldsValue({
  546. linkNumber: linkNumber,
  547. remark: remark,
  548. })
  549. })
  550. }
  551. },
  552. getUnitInfo(val) {
  553. this.unitList = val
  554. },
  555. },
  556. }
  557. </script>
  558. <style scoped></style>