productDetails.vue 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776
  1. <!-- 成品明细 -->
  2. <template>
  3. <div >
  4. <a-form-model ref="formRef" :model="form">
  5. <a-table
  6. ref="table"
  7. size="middle"
  8. bordered
  9. id='sonList'
  10. :columns="columns"
  11. rowKey="rowNo"
  12. :dataSource="form.dataSource"
  13. :pagination="false"
  14. :scroll="{ x: 6500, y: 300 }"
  15. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  16. @change="handleTableChange"
  17. >
  18. <span slot="framesCountTitle" class="form-table-heard">
  19. 框数量
  20. </span>
  21. <span slot="leafCountTitle" class="form-table-heard">
  22. 扇数量
  23. </span>
  24. <span slot="inventoryCodeTitle" class="form-table-heard">
  25. 料品编码
  26. </span>
  27. <span slot="quantityTitle" class="form-table-heard">
  28. 成品主数量
  29. </span>
  30. <span slot="unQuantityTitle" class="form-table-heard">
  31. 成品辅数量
  32. </span>
  33. <template slot="billingType" slot-scope="text, record, index">
  34. <a-form-model-item prop="billingType" class='sonItem'>
  35. <span v-if="title=='订单操作'">{{ record.billingType }}</span>
  36. <a-select v-model="record.billingType" style='width:100%' v-else>
  37. <a-select-option value='铝合金门窗'> 铝合金门窗</a-select-option>
  38. <a-select-option value='双开窗'> 双开窗</a-select-option>
  39. </a-select>
  40. </a-form-model-item>
  41. </template>
  42. <template slot="batch" slot-scope="text, record, index">
  43. <a-form-model-item prop="batch" class='sonItem'>
  44. <span v-if="title=='订单操作'">{{ record.batch }}</span>
  45. <a-input placeholder="请输入" v-model="record.batch" v-else></a-input>
  46. </a-form-model-item>
  47. </template>
  48. <template slot="inventoryCode" slot-scope="text, record, index">
  49. <a-form-model-item :prop="'dataSource.'+index+'.inventoryCode'" class='sonItem' :rules="rules.inventoryCode">
  50. <span v-if="title=='订单操作'">{{ record.inventoryCode }}</span>
  51. <a-input-search placeholder="请输入" v-model="record.inventoryCode" @search="onSearchInven(record)" readOnly v-else></a-input-search>
  52. </a-form-model-item>
  53. </template>
  54. <template slot="quantity" slot-scope="text, record, index">
  55. <a-form-model-item :prop="'dataSource.'+index+'.quantity'" class='sonItem' :rules="rules.quantity">
  56. <span v-if="title=='订单操作'">{{ record.quantity }}</span>
  57. <a-input placeholder="请输入" v-model="record.quantity" @change="changeQuantity(record)" v-else></a-input>
  58. </a-form-model-item>
  59. </template>
  60. <template slot="unQuantity" slot-scope="text, record, index">
  61. <a-form-model-item :prop="'dataSource.'+index+'.unQuantity'" class='sonItem' :rules="rules.unQuantity">
  62. <span v-if="title=='订单操作'">{{ record.unQuantity }}</span>
  63. <a-input placeholder="请输入" v-model="record.unQuantity" @change="changeUnQuantity(record)" v-else></a-input>
  64. </a-form-model-item>
  65. </template>
  66. <template slot="quantityExecuteIn" slot-scope="text, record, index">
  67. <a-form-model-item prop="quantityExecuteIn" class='sonItem'>
  68. <a-input placeholder="请输入" v-model="record.quantityExecuteIn" v-if="record.allowEditNum=='yes'" @blur="changeQuantityExecuteIn(index,record)"></a-input>
  69. <span v-else>{{ record.quantityExecuteIn }}</span>
  70. </a-form-model-item>
  71. </template>
  72. <template slot="framesCount" slot-scope="text, record, index">
  73. <a-form-model-item :prop="'dataSource.'+index+'.framesCount'" class='sonItem' :rules="rules.framesCount">
  74. <span v-if="title=='订单操作'">{{ record.framesCount }}</span>
  75. <a-input placeholder="请输入" v-model="record.framesCount" v-else></a-input>
  76. </a-form-model-item>
  77. </template>
  78. <template slot="leafCount" slot-scope="text, record, index">
  79. <a-form-model-item :prop="'dataSource.'+index+'.leafCount'" class='sonItem' :rules="rules.leafCount">
  80. <span v-if="title=='订单操作'">{{ record.leafCount }}</span>
  81. <a-input placeholder="请输入" v-model="record.leafCount" v-else></a-input>
  82. </a-form-model-item>
  83. </template>
  84. <template slot="executeInLeaf" slot-scope="text, record, index">
  85. <a-form-model-item prop="executeInLeaf" class='sonItem'>
  86. <span v-if="title=='订单操作'">{{ record.executeInLeaf }}</span>
  87. <a-input placeholder="请输入" v-model="record.executeInLeaf" v-else></a-input>
  88. </a-form-model-item>
  89. </template>
  90. <template slot="executeInFrames" slot-scope="text, record, index">
  91. <a-form-model-item prop="executeInFrames" class='sonItem'>
  92. <span v-if="title=='订单操作'">{{ record.executeInFrames }}</span>
  93. <a-input placeholder="请输入" v-model="record.executeInFrames" v-else></a-input>
  94. </a-form-model-item>
  95. </template>
  96. <template slot="executeOutLeaf" slot-scope="text, record, index">
  97. <a-form-model-item prop="executeOutLeaf" class='sonItem'>
  98. <span v-if="title=='订单操作'">{{ record.executeOutLeaf }}</span>
  99. <a-input placeholder="请输入" v-model="record.executeOutLeaf" v-else></a-input>
  100. </a-form-model-item>
  101. </template>
  102. <template slot="executeOutFrames" slot-scope="text, record, index">
  103. <a-form-model-item prop="executeOutFrames" class='sonItem'>
  104. <span v-if="title=='订单操作'">{{ record.executeOutFrames }}</span>
  105. <a-input placeholder="请输入" v-model="record.executeOutFrames" v-else></a-input>
  106. </a-form-model-item>
  107. </template>
  108. <template slot="model" slot-scope="text, record, index">
  109. <a-form-model-item prop="model" class='sonItem'>
  110. <span v-if="title=='订单操作'">{{ record.model }}</span>
  111. <a-input placeholder="请输入" v-model="record.model" v-else></a-input>
  112. </a-form-model-item>
  113. </template>
  114. <template slot="color" slot-scope="text, record, index">
  115. <a-form-model-item prop="color" class='sonItem'>
  116. <span v-if="title=='订单操作'">{{ record.color }}</span>
  117. <a-input placeholder="请输入" v-model="record.color" v-else></a-input>
  118. </a-form-model-item>
  119. </template>
  120. <template slot="fixedNum" slot-scope="text, record, index">
  121. <a-form-model-item prop="fixedNum" class='sonItem'>
  122. <span v-if="title=='订单操作'">{{ record.fixedNum }}</span>
  123. <a-input placeholder="请输入" v-model="record.fixedNum" v-else></a-input>
  124. </a-form-model-item>
  125. </template>
  126. <template slot="fixedLength" slot-scope="text, record, index">
  127. <a-form-model-item prop="fixedLength" class='sonItem'>
  128. <span v-if="title=='订单操作'">{{ record.fixedLength }}</span>
  129. <a-input placeholder="请输入" v-model="record.fixedLength" v-else></a-input>
  130. </a-form-model-item>
  131. </template>
  132. <template slot="widthHeight" slot-scope="text, record, index">
  133. <a-form-model-item prop="widthHeight" class='sonItem'>
  134. <span v-if="title=='订单操作'">{{ record.widthHeight }}</span>
  135. <a-input placeholder="请输入" v-model="record.widthHeight" v-else></a-input>
  136. </a-form-model-item>
  137. </template>
  138. <template slot="pieces" slot-scope="text, record, index">
  139. <a-form-model-item prop="pieces" class='sonItem'>
  140. <span v-if="title=='订单操作'">{{ record.pieces }}</span>
  141. <a-input placeholder="请输入" v-model="record.pieces" v-else></a-input>
  142. </a-form-model-item>
  143. </template>
  144. <template slot="remarks" slot-scope="text, record, index">
  145. <a-form-model-item prop="remarks" class='sonItem'>
  146. <span v-if="title=='订单操作'">{{ record.remarks }}</span>
  147. <a-input placeholder="请输入" v-model="record.remarks" v-else></a-input>
  148. </a-form-model-item>
  149. </template>
  150. <template slot="meterWeight" slot-scope="text, record, index">
  151. <a-form-model-item prop="meterWeight" class='sonItem'>
  152. <span v-if="title=='订单操作'">{{ record.meterWeight }}</span>
  153. <a-input placeholder="请输入" v-model="record.meterWeight" v-else></a-input>
  154. </a-form-model-item>
  155. </template>
  156. <template slot="decorationLength" slot-scope="text, record, index">
  157. <a-form-model-item prop="decorationLength" class='sonItem'>
  158. <span v-if="title=='订单操作'">{{ record.decorationLength }}</span>
  159. <a-input placeholder="请输入" v-model="record.decorationLength" v-else></a-input>
  160. </a-form-model-item>
  161. </template>
  162. <template slot="windowNo" slot-scope="text, record, index">
  163. <a-form-model-item prop="windowNo" class='sonItem'>
  164. <span v-if="title=='订单操作'">{{ record.windowNo }}</span>
  165. <a-input placeholder="请输入" v-model="record.windowNo" v-else></a-input>
  166. </a-form-model-item>
  167. </template>
  168. <template slot="exclusiveZone" slot-scope="text, record, index">
  169. <a-form-model-item prop="exclusiveZone" class='sonItem'>
  170. <span v-if="title=='订单操作'">{{ record.exclusiveZone }}</span>
  171. <a-input placeholder="请输入" v-model="record.exclusiveZone" v-esle></a-input>
  172. </a-form-model-item>
  173. </template>
  174. <template slot="widthLength" slot-scope="text, record, index">
  175. <a-form-model-item prop="widthLength" class='sonItem'>
  176. <span v-if="title=='订单操作'">{{ record.widthLength }}</span>
  177. <a-input placeholder="请输入" v-model="record.widthLength" v-else></a-input>
  178. </a-form-model-item>
  179. </template>
  180. <template slot="height" slot-scope="text, record, index">
  181. <a-form-model-item prop="height" class='sonItem'>
  182. <span v-if="title=='订单操作'">{{ record.height }}</span>
  183. <a-input placeholder="请输入" v-model="record.height" v-else></a-input>
  184. </a-form-model-item>
  185. </template>
  186. <template slot="buildingNumber" slot-scope="text, record, index">
  187. <a-form-model-item prop="buildingNumber" class='sonItem'>
  188. <span v-if="title=='订单操作'">{{ record.buildingNumber }}</span>
  189. <a-input placeholder="请输入" v-model="record.buildingNumber" v-else></a-input>
  190. </a-form-model-item>
  191. </template>
  192. <template slot="framesTang" slot-scope="text, record, index">
  193. <a-form-model-item prop="framesTang" class='sonItem'>
  194. <span v-if="title=='订单操作'">{{ record.framesTang }}</span>
  195. <a-input placeholder="请输入" v-model="record.framesTang" v-else></a-input>
  196. </a-form-model-item>
  197. </template>
  198. <template slot="semiClass" slot-scope="text, record, index">
  199. <a-form-model-item prop="semiClass" class='sonItem'>
  200. <span v-if="title=='订单操作'">{{ record.semiClass }}</span>
  201. <a-input placeholder="请输入" v-model="record.semiClass" v-else></a-input>
  202. </a-form-model-item>
  203. </template>
  204. <template slot="area" slot-scope="text, record, index">
  205. <a-form-model-item prop="area" class='sonItem'>
  206. <span v-if="title=='订单操作'">{{ record.area }}</span>
  207. <a-input placeholder="请输入" v-model="record.area" v-else></a-input>
  208. </a-form-model-item>
  209. </template>
  210. <template slot="cuttingLength" slot-scope="text, record, index">
  211. <a-form-model-item prop="cuttingLength" class='sonItem'>
  212. <span v-if="title=='订单操作'">{{ record.cuttingLength }}</span>
  213. <a-input placeholder="请输入" v-model="record.cuttingLength" v-else></a-input>
  214. </a-form-model-item>
  215. </template>
  216. <template slot="cuttingLeftDown" slot-scope="text, record, index">
  217. <a-form-model-item prop="cuttingLeftDown" class='sonItem'>
  218. <span v-if="title=='订单操作'">{{ record.cuttingLeftDown }}</span>
  219. <a-input placeholder="请输入" v-model="record.cuttingLeftDown" v-else></a-input>
  220. </a-form-model-item>
  221. </template>
  222. <template slot="cuttingRightTop" slot-scope="text, record, index">
  223. <a-form-model-item prop="cuttingRightTop" class='sonItem'>
  224. <span v-if="title=='订单操作'">{{ record.cuttingRightTop }}</span>
  225. <a-input placeholder="请输入" v-model="record.cuttingRightTop" v-else></a-input>
  226. </a-form-model-item>
  227. </template>
  228. <template slot="series" slot-scope="text, record, index">
  229. <a-form-model-item prop="series" class='sonItem'>
  230. <span v-if="title=='订单操作'">{{ record.series }}</span>
  231. <a-input placeholder="请输入" v-model="record.series" v-else></a-input>
  232. </a-form-model-item>
  233. </template>
  234. <template slot="glassNumber" slot-scope="text, record, index">
  235. <a-form-model-item prop="glassNumber" class='sonItem'>
  236. <span v-if="title=='订单操作'">{{ record.glassNumber }}</span>
  237. <a-input placeholder="请输入" v-model="record.glassNumber" v-else></a-input>
  238. </a-form-model-item>
  239. </template>
  240. </a-table>
  241. </a-form-model>
  242. <inventoryPopup ref="inventoryPopup" @okData="okDataInvent"></inventoryPopup>
  243. </div>
  244. </template>
  245. <script>
  246. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  247. import JEllipsis from '@/components/jeecg/JEllipsis'
  248. import { httpAction ,getAction,postAction,putAction} from '@/api/manage'
  249. import inventoryPopup from '../../Popup/inventoryPopup.vue'
  250. import moment from 'moment'
  251. export default {
  252. name: 'productDetails', // Tabs 详情
  253. mixins: [JeecgListMixin],
  254. components: {
  255. JEllipsis,
  256. moment,
  257. inventoryPopup,
  258. },
  259. data() {
  260. return {
  261. selectedRowKeys:[],
  262. selectedRows:[],
  263. planOrg:'',
  264. form:{
  265. dataSource:[],
  266. },
  267. disableMixinCreated:'1',
  268. columns: [
  269. {
  270. title: '行号',
  271. dataIndex: '',
  272. key: 'rowIndex',
  273. width: 60,
  274. align: "center",
  275. customRender:function (t, r, index) {
  276. return parseInt(index)+1;
  277. }
  278. },
  279. {
  280. title: '开票类型',
  281. align:"center",
  282. dataIndex: 'billingType',
  283. ellipsis: true,
  284. scopedSlots: { customRender: 'billingType' }
  285. },
  286. {
  287. title: '项目编码',
  288. align:"center",
  289. dataIndex: 'projectCode',
  290. ellipsis: true,
  291. },
  292. {
  293. title: '项目名称',
  294. align:"center",
  295. dataIndex: 'projectName',
  296. ellipsis: true,
  297. },
  298. {
  299. title: '批次',
  300. align:"center",
  301. dataIndex: 'batch',
  302. ellipsis: true,
  303. scopedSlots: { customRender: 'batch' }
  304. },
  305. {
  306. // title: '料品编码',
  307. align:"center",
  308. dataIndex: 'inventoryCode',
  309. ellipsis: true,
  310. scopedSlots: { customRender: 'inventoryCode' } ,
  311. slots:{title:'inventoryCodeTitle'},
  312. },
  313. {
  314. title: '料品名称',
  315. align:"center",
  316. dataIndex: 'inventoryName',
  317. ellipsis: true,
  318. },
  319. {
  320. title: '成品计量单位',
  321. align:"center",
  322. dataIndex: 'unit',
  323. ellipsis: true,
  324. },
  325. {
  326. title: '成品辅计量单位',
  327. align:"center",
  328. dataIndex: 'auxiliaryUnit',
  329. ellipsis: true,
  330. },
  331. {
  332. // title: '成品主数量',
  333. align:"center",
  334. dataIndex: 'quantity',
  335. ellipsis: true,
  336. scopedSlots: { customRender: 'quantity' } ,
  337. slots:{title:'quantityTitle'},
  338. },
  339. {
  340. // title: '成品辅数量',
  341. align:"center",
  342. dataIndex: 'unQuantity',
  343. ellipsis: true,
  344. scopedSlots: { customRender: 'unQuantity' } ,
  345. slots:{title:'unQuantityTitle'},
  346. },
  347. {
  348. title: '税率',
  349. align:"center",
  350. dataIndex: 'rate',
  351. ellipsis: true,
  352. },
  353. {
  354. title: '已入库成品数量',
  355. align:"center",
  356. dataIndex: 'quantityExecuteIn',
  357. ellipsis: true,
  358. scopedSlots: { customRender: 'quantityExecuteIn' }
  359. },
  360. {
  361. // title: '框数量',
  362. align:"center",
  363. dataIndex: 'framesCount',
  364. ellipsis: true,
  365. scopedSlots: { customRender: 'framesCount' } ,
  366. slots:{title:'framesCountTitle'},
  367. },
  368. {
  369. // title: '扇数量',
  370. align:"center",
  371. dataIndex: 'leafCount',
  372. ellipsis: true,
  373. scopedSlots: { customRender: 'leafCount' } ,
  374. slots:{title:'leafCountTitle'},
  375. },
  376. {
  377. title: '已入库框数量',
  378. align:"center",
  379. dataIndex: 'executeInFrames',
  380. ellipsis: true,
  381. // scopedSlots: { customRender: 'executeInFrames' }
  382. },
  383. {
  384. title: '已入库扇数量',
  385. align:"center",
  386. dataIndex: 'executeInLeaf',
  387. ellipsis: true,
  388. // scopedSlots: { customRender: 'executeInLeaf' } ,
  389. },
  390. {
  391. title: '已出库框数量',
  392. align:"center",
  393. dataIndex: 'executeOutFrames',
  394. ellipsis: true,
  395. // scopedSlots: { customRender: 'executeOutFrames' }
  396. },
  397. {
  398. title: '已出库扇数量',
  399. align:"center",
  400. dataIndex: 'executeOutLeaf',
  401. ellipsis: true,
  402. // scopedSlots: { customRender: 'executeOutLeaf' }
  403. },
  404. {
  405. title: '规格',
  406. align:"center",
  407. dataIndex: 'specs',
  408. ellipsis: true,
  409. }, {
  410. title: '料品属性',
  411. align:"center",
  412. dataIndex: 'attribute',
  413. ellipsis: true,
  414. },
  415. {
  416. title: '型号',
  417. align:"center",
  418. dataIndex: 'model',
  419. ellipsis: true,
  420. scopedSlots: { customRender: 'model' }
  421. },
  422. {
  423. title: '颜色',
  424. align:"center",
  425. dataIndex: 'color',
  426. ellipsis: true,
  427. scopedSlots: { customRender: 'color' }
  428. },
  429. {
  430. title: '支数',
  431. align:"center",
  432. dataIndex: 'fixedNum',
  433. ellipsis: true,
  434. scopedSlots: { customRender: 'fixedNum' }
  435. },
  436. {
  437. title: '定尺',
  438. align:"center",
  439. dataIndex: 'fixedLength',
  440. ellipsis: true,
  441. scopedSlots: { customRender: 'fixedLength' }
  442. },
  443. {
  444. title: '宽/高',
  445. align:"center",
  446. dataIndex: 'widthHeight',
  447. ellipsis: true,
  448. scopedSlots: { customRender: 'widthHeight' }
  449. },
  450. {
  451. title: '片数',
  452. align:"center",
  453. dataIndex: 'pieces',
  454. ellipsis: true,
  455. scopedSlots: { customRender: 'pieces' }
  456. },
  457. {
  458. title: '备注',
  459. align:"center",
  460. dataIndex: 'remarks',
  461. ellipsis: true,
  462. scopedSlots: { customRender: 'remarks' }
  463. },
  464. {
  465. title: '米重',
  466. align:"center",
  467. dataIndex: 'meterWeight',
  468. ellipsis: true,
  469. scopedSlots: { customRender: 'meterWeight' }
  470. },
  471. {
  472. title: '装饰面周长',
  473. align:"center",
  474. dataIndex: 'decorationLength',
  475. ellipsis: true,
  476. scopedSlots: { customRender: 'decorationLength' }
  477. },
  478. {
  479. title: '窗号',
  480. align:"center",
  481. dataIndex: 'windowNo',
  482. ellipsis: true,
  483. scopedSlots: { customRender: 'windowNo' }
  484. },
  485. {
  486. title: '专用区',
  487. align:"center",
  488. dataIndex: 'exclusiveZone',
  489. ellipsis: true,
  490. scopedSlots: { customRender: 'exclusiveZone' }
  491. },
  492. {
  493. title: '宽度/长度',
  494. align:"center",
  495. dataIndex: 'widthLength',
  496. ellipsis: true,
  497. scopedSlots: { customRender: 'widthLength' }
  498. },
  499. {
  500. title: '高度',
  501. align:"center",
  502. dataIndex: 'height',
  503. ellipsis: true,
  504. scopedSlots: { customRender: 'height' }
  505. },
  506. {
  507. title: '楼层楼号',
  508. align:"center",
  509. dataIndex: 'buildingNumber',
  510. ellipsis: true,
  511. scopedSlots: { customRender: 'buildingNumber' }
  512. },
  513. {
  514. title: '樘数(数量)',
  515. align:"center",
  516. dataIndex: 'framesTang',
  517. ellipsis: true,
  518. scopedSlots: { customRender: 'framesTang' }
  519. },
  520. {
  521. title: '半成品分类',
  522. align:"center",
  523. dataIndex: 'semiClass',
  524. ellipsis: true,
  525. scopedSlots: { customRender: 'semiClass' }
  526. },
  527. {
  528. title: '面积',
  529. align:"center",
  530. dataIndex: 'area',
  531. ellipsis: true,
  532. scopedSlots: { customRender: 'area' }
  533. },
  534. {
  535. title: '切割长度',
  536. align:"center",
  537. dataIndex: 'cuttingLength',
  538. ellipsis: true,
  539. scopedSlots: { customRender: 'cuttingLength' }
  540. },
  541. {
  542. title: '切割角度左下',
  543. align:"center",
  544. dataIndex: 'cuttingLeftDown',
  545. ellipsis: true,
  546. scopedSlots: { customRender: 'cuttingLeftDown' }
  547. },
  548. {
  549. title: '切割角度右上',
  550. align:"center",
  551. dataIndex: 'cuttingRightTop',
  552. ellipsis: true,
  553. scopedSlots: { customRender: 'cuttingRightTop' }
  554. },
  555. {
  556. title: '系列',
  557. align:"center",
  558. dataIndex: 'series',
  559. ellipsis: true,
  560. scopedSlots: { customRender: 'series' }
  561. },
  562. {
  563. title: '玻璃编号',
  564. align:"center",
  565. dataIndex: 'glassNumber',
  566. ellipsis: true,
  567. scopedSlots: { customRender: 'glassNumber' }
  568. },
  569. {
  570. title: '同步状态',
  571. align:"center",
  572. dataIndex: 'sync',
  573. ellipsis: true,
  574. },
  575. {
  576. title: '同步信息',
  577. align:"center",
  578. dataIndex: 'syncInfo',
  579. ellipsis: true,
  580. width:460,
  581. },
  582. ],
  583. rules:{
  584. framesCount:{required:true,message:"不可为空"},
  585. leafCount:{required:true,message:"不可为空"},
  586. inventoryCode:{required:true,message:"不可为空"},
  587. quantity:{required:true,message:"不可为空"},
  588. unQuantity:{required:true,message:"不可为空"},
  589. },
  590. }
  591. },
  592. props:{
  593. title: {
  594. type: String,
  595. default:''
  596. },
  597. },
  598. created() {},
  599. methods: {
  600. onSelectChange(selectedRowKeys, selectionRows) {
  601. this.selectedRowKeys = selectedRowKeys;
  602. this.selectedRows = selectionRows;
  603. },
  604. addList(projectCode,projectName){
  605. this.form.dataSource.push({rowNo: this.form.dataSource.length+1,projectCode:projectCode,projectName:projectName})
  606. },
  607. //改变主数量计算辅数量
  608. changeQuantity(record){
  609. if(record.rate){
  610. var num = (Number(record.quantity)*Number(record.rate)).toFixed(2)
  611. this.$set(record,'unQuantity',num)
  612. }
  613. },
  614. //改变辅数量计算主数量
  615. changeUnQuantity(record){
  616. if(record.rate){
  617. var numUn = (Number(record.unQuantity)/Number(record.rate)).toFixed(2)
  618. this.$set(record,'quantity',numUn)
  619. }
  620. },
  621. onSearchInven(record){
  622. if(!this.planOrg||this.planOrg==''){
  623. this.$message.warning('请选择生产组织!')
  624. }else{
  625. this.$refs.inventoryPopup.visible = true
  626. this.$refs.inventoryPopup.getData(this.planOrg)
  627. this.$refs.inventoryPopup.record=record
  628. }
  629. },
  630. // 修改已执行数量
  631. editNum(index){
  632. this.form.dataSource[index-1].allowEditNum = 'yes'
  633. this.$forceUpdate();
  634. },
  635. changeQuantityExecuteIn(index,record){
  636. if(Number(record.quantityExecuteIn)>Number(record.quantity)||record.quantityExecuteIn<0){
  637. this.$message.error('已入库成品数量需大于成品主数量,且大于0!');
  638. }else{
  639. this.$confirm({
  640. content: `是否保存修改后已执行数量?`,
  641. onOk: () => {
  642. postAction('/productionOrder/madeProductionOrders/updateFinishedNum',record).then(res=>{
  643. if(res.success){
  644. this.$message.success('修改成功')
  645. this.form.dataSource[index].allowEditNum = ''
  646. this.$forceUpdate();
  647. this.selectedRowKeys = []
  648. this.selectedRows = []
  649. }else{
  650. this.$message.error(res.message);
  651. }
  652. })
  653. }
  654. })
  655. }
  656. },
  657. validateList(){
  658. let flag = null
  659. this.$refs.formRef.validate(valid =>{
  660. if(valid){
  661. flag = true
  662. }else{
  663. flag = false
  664. }
  665. })
  666. return flag
  667. },
  668. okDataInvent(data,recoerd){
  669. this.$set(recoerd,'inventoryCode',data.Code)
  670. this.$set(recoerd,'inventoryName',data.Name)
  671. this.$set(recoerd,'specs',data.SPECS)
  672. this.$set(recoerd,'unit',data.unit)
  673. this.$set(recoerd,'auxiliaryUnit',data.auxiliaryUnit )
  674. this.$set(recoerd,'attribute',data.Code1 )
  675. this.$set(recoerd,'inventory',data.ID )
  676. this.$set(recoerd,'quantity','' )
  677. this.$set(recoerd,'unQuantity','')
  678. this.$set(recoerd,'rate',data.rate)
  679. },
  680. delectRow(){
  681. if( this.selectedRowKeys.length==0){
  682. this.$message.warning('请勾选子表数据!')
  683. }else{
  684. this.selectedRowKeys.map(event=>{
  685. this.form.dataSource = this.form.dataSource.filter( (x)=> {return x.rowNo !== event});
  686. })
  687. }
  688. },
  689. },
  690. computed: {
  691. // 合计数据
  692. // sumInfoSource() {}
  693. }
  694. }
  695. </script>
  696. <style lang="less" scoped>
  697. /* @import '~@assets/less/common.less' */
  698. /deep/.ant-input{
  699. height:29px;
  700. }
  701. /deep/.ant-select-selection--single {
  702. height: 29px;
  703. }
  704. /deep/.ant-select{
  705. font-size: 12px;
  706. }
  707. /deep/.ant-form label{
  708. font-size: 12px;
  709. }
  710. /deep/.table-page-search-wrapper .ant-form-inline .ant-form-item{
  711. margin-bottom:9px
  712. }
  713. /deep/.moddle>.ant-card-body{
  714. padding-bottom:0px;
  715. padding-top: 12px;
  716. }
  717. /deep/.top>.ant-card-body{
  718. padding-bottom:0px;
  719. padding-top: 12px;
  720. }
  721. /deep/.ant-btn{
  722. height:28px
  723. }
  724. /deep/.ant-modal-body{
  725. padding-bottom: 0px;
  726. padding-top: 0px;
  727. }
  728. // /deep/.ant-modal-body{
  729. // background: #f0f2f5;
  730. // }
  731. /deep/.ant-modal-content{
  732. background: #f0f2f5;
  733. }
  734. /deep/.ant-card-body .table-operator {
  735. margin-bottom: 0px;
  736. }
  737. /deep/.three>.ant-card-body{
  738. padding-bottom:12px;
  739. padding-top: 12px;
  740. }
  741. /deep/.bottom>.ant-card-body{
  742. padding-bottom:0px;
  743. padding-top: 12px;
  744. }
  745. /deep/.ant-calendar-picker{
  746. min-width: 0px !important;
  747. }
  748. /deep/.sonItem {
  749. margin-bottom:0px !important
  750. }
  751. /deep/#sonList>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-scroll>.ant-table-body>.ant-table-fixed>.ant-table-tbody > tr > td {
  752. padding: 0px 8px !important;
  753. }
  754. .form-table-heard:before {
  755. content:'*';
  756. color:red
  757. }
  758. /deep/.ant-form-explain, .ant-form-split {
  759. display: none;
  760. }
  761. </style>