detailsPage.vue 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528
  1. <template>
  2. <div>
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="backToList(0)"
  6. >返回列表
  7. </el-button>
  8. </div>
  9. <div class="add-customer-btn">
  10. <el-button class="el-button&#45;&#45;small-yh" type="primary" size="small" v-if="editButton" @click="confirmEditing">编辑 </el-button>
  11. <el-button class="el-button--small-yh" type="primary" size="small" :disabled="isSave" @click="editCustomer">保存数据 </el-button>
  12. <el-button
  13. class="el-button--small-yh"
  14. type="warning"
  15. size="small"
  16. v-if="form.statusName == '确认调拨'"
  17. @click="revoke"
  18. :disabled="isSave || form.status == '是'"
  19. >撤销调拨
  20. </el-button>
  21. <el-button class="el-button--small-yh" type="success" size="small" style="margin-left: 6px;" v-else @click="complete" :disabled="isSave"
  22. >确认调拨
  23. </el-button>
  24. <el-button
  25. v-if="form.statusName == '确认调拨' && form.status == '否'"
  26. class="el-button--small-yh"
  27. type="info"
  28. size="small"
  29. style="margin-left: 6px;"
  30. @click="confirmComplete"
  31. :disabled="isSave"
  32. >已出仓
  33. </el-button>
  34. </div>
  35. </div>
  36. <div style="margin-top: 50px">
  37. <trade-card title="基础信息">
  38. <avue-form :option="optionForm" v-model="form" ref="form">
  39. <template slot="storageName">
  40. <dic-select
  41. v-model="form.storageName"
  42. placeholder="调出仓库"
  43. label="cname"
  44. res="records"
  45. :disabled="isSave || isAddDisabled || form.shipItemsList.length"
  46. url="/blade-sales-part/storageDesc/list?current=1&size=5"
  47. :filterable="true"
  48. :remote="true"
  49. dataName="cname"
  50. @selectChange="dicChange('storageName', $event)"
  51. ></dic-select>
  52. </template>
  53. <template slot="callInStorageName">
  54. <dic-select
  55. v-model="form.callInStorageName"
  56. placeholder="调入仓库"
  57. label="cname"
  58. res="records"
  59. :disabled="isSave || isAddDisabled || form.shipItemsList.length"
  60. url="/blade-sales-part/storageDesc/list?current=1&size=5"
  61. :filterable="true"
  62. :remote="true"
  63. dataName="cname"
  64. @selectChange="dicChange('callInStorageName', $event)"
  65. ></dic-select>
  66. </template>
  67. </avue-form>
  68. </trade-card>
  69. <trade-card title="明细信息">
  70. <avue-crud
  71. :option="optionContacts"
  72. v-model="formContacts"
  73. ref="formContacts"
  74. :data="form.shipItemsList"
  75. :key="key"
  76. @row-save="rowSave"
  77. @row-update="rowUpdate"
  78. @selection-change="selectionContacts"
  79. @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 430)"
  80. @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 430)"
  81. >
  82. <template slot-scope="{ scope, row }" slot="menuLeft">
  83. <el-button type="primary" icon="el-icon-printer" size="small" @click="adddiailsfun">录入明细</el-button>
  84. <el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button>
  85. <el-popover width="800" trigger="click" placement="right">
  86. <avue-crud :data="inventoryData" :option="inventoryOption">
  87. <template slot-scope="{ row }" slot="menu">
  88. <el-button
  89. type="text"
  90. icon="el-icon-refresh"
  91. size="small"
  92. :disabled="row.storageId != form.storageId"
  93. @click.stop="synchronous(row)"
  94. >更新库存
  95. </el-button>
  96. </template>
  97. </avue-crud>
  98. <el-button type="primary" plain size="small" slot="reference" @click="viewInventory" :disabled="selectionMultilist.length != 1"
  99. >同步库存</el-button
  100. >
  101. </el-popover>
  102. </template>
  103. <template slot-scope="{ type, size, row, index, disabled }" slot="menu">
  104. <el-button
  105. v-if="reservoirArea == 1 && row.historyList.length"
  106. :size="size"
  107. :disabled="!row.id || disabled || isAddDisabled"
  108. type="text"
  109. @click="rowDelArea(row, index)"
  110. >
  111. 清空库区
  112. </el-button>
  113. <el-button v-if="reservoirArea == 1 && row.historyList.length" :size="size" :disabled="!row.id" type="text" @click="rowArea(row, index)">
  114. 查看库区
  115. </el-button>
  116. <el-button
  117. v-if="reservoirArea == 1 && row.historyList.length == 0"
  118. :size="size"
  119. :disabled="!row.id || disabled || isAddDisabled"
  120. type="text"
  121. @click="rowArea(row, index)"
  122. >
  123. 选择库区
  124. </el-button>
  125. <el-button
  126. v-if="reservoirArea != 1"
  127. :size="size"
  128. :disabled="disabled || isAddDisabled"
  129. :type="type"
  130. :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
  131. @click="rowEdit(row, index)"
  132. >
  133. {{ row.$cellEdit ? "保存" : "编辑" }}
  134. </el-button>
  135. <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled" :type="type" @click="rowDelBox(row, index)"
  136. >删除
  137. </el-button>
  138. </template>
  139. <template slot="goodsNum" slot-scope="{ row }">
  140. <el-input-number
  141. v-if="row.$cellEdit && whetherFinancing != 1"
  142. v-model="row.goodsNum"
  143. size="small"
  144. :controls="false"
  145. :precision="0"
  146. style="width: 100%"
  147. @change="calculator2(row)"
  148. />
  149. <span v-else>{{ row.goodsNum }}</span>
  150. </template>
  151. <template slot="sendNumFinancing" slot-scope="{ row }">
  152. <el-input-number
  153. v-if="row.$cellEdit"
  154. v-model="row.sendNumFinancing"
  155. size="small"
  156. :controls="false"
  157. :precision="0"
  158. style="width: 100%"
  159. @change="calculator(row)"
  160. />
  161. <span v-else>{{ row.sendNumFinancing }}</span>
  162. </template>
  163. <template slot="sendNumHave" slot-scope="{ row }">
  164. <el-input-number
  165. v-if="row.$cellEdit"
  166. v-model="row.sendNumHave"
  167. size="small"
  168. :controls="false"
  169. :precision="0"
  170. style="width: 100%"
  171. @change="calculator(row)"
  172. />
  173. <span v-else>{{ row.sendNumHave }}</span>
  174. </template>
  175. <template slot="dot" slot-scope="{ row }">
  176. <!--使用allow-create属性即可通过在输入框中输入文字来创建新的条目。注意此时filterable必须为真。-->
  177. <!--本例还使用了default-first-option属性, 在该属性打开的情况下,按下回车就可以选中当前选项列表中的第一个选项,-->
  178. <!--无需使用鼠标或键盘方向键进行定位。-->
  179. <!--allow-create filterable default-first-option-->
  180. <el-select
  181. v-if="row.$cellEdit"
  182. v-model="row.dot"
  183. size="small"
  184. filterable
  185. default-first-option
  186. @focus="picihaolistfun(row.goodsId)"
  187. @change="picihaolistChangefun($event, row)"
  188. >
  189. <el-option v-for="(item, index) in picihaolist" :key="index" :label="item.dot" :value="item.dot"></el-option>
  190. </el-select>
  191. <span v-else>{{ row.dot }}</span>
  192. </template>
  193. <template slot="price" slot-scope="{ row }">
  194. <el-input-number v-if="row.$cellEdit" v-model="row.price" size="small" :controls="false" style="width: 100%" @change="calculator2(row)" />
  195. <span v-else>{{ row.price }}</span>
  196. </template>
  197. </avue-crud>
  198. </trade-card>
  199. <view-area ref="viewArea" @areaData="areaData" :disabled="disabled || isAddDisabled"></view-area>
  200. <containerTitle title="上传附件"></containerTitle>
  201. <c-upload
  202. v-loading="loadingBtn"
  203. typeUpload="LT"
  204. :disabled="isAddDisabled"
  205. deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId"
  206. :data="filesList"
  207. display
  208. :enumerationValue="35.1"
  209. ></c-upload>
  210. <report-dialog :switchDialog="switchDialog" :reportId="form.id" @onClose="onClose()"></report-dialog>
  211. <dialogAssembly ref="dialogAssemblyRef" :form="form" @tableDataHandle="tableDataHandle"> </dialogAssembly>
  212. </div>
  213. </div>
  214. </template>
  215. <script>
  216. import {
  217. getDetails,
  218. tradingBox,
  219. transferAllocateSubmit,
  220. confirmTransferAllocate,
  221. revokeTransferAllocate,
  222. itemRemove,
  223. confirmComplete
  224. } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
  225. import { dateFormat } from "@/util/date";
  226. import reportDialog from "@/components/report-dialog/main";
  227. import { dotList } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
  228. import { isProcurement } from "@/api/basicData/configuration";
  229. import dialogAssembly from "@/views/tirePartsMall/salesManagement/outboundWorkOrderL/dialogAssembly.vue";
  230. import { getKh } from "@/api/tirePartsMall/salesManagement/saleOrder";
  231. import { getList as inventoryList } from "@/api/tirePartsMall/inventory";
  232. import viewArea from "./components/viewArea.vue";
  233. import dicSelect from "@/components/dicSelect/main";
  234. export default {
  235. name: "detailsPage",
  236. data() {
  237. return {
  238. reservoirArea: 0,
  239. selectionMultilist: [],
  240. inventoryData: [],
  241. inventoryOption: {
  242. header: false,
  243. menu: true,
  244. menuWidth: 90,
  245. editBtn: false,
  246. delBtn: false,
  247. column: [
  248. {
  249. label: "商品名称",
  250. prop: "cname",
  251. overHidden: true
  252. },
  253. {
  254. label: "仓库",
  255. prop: "storageName",
  256. overHidden: true
  257. },
  258. {
  259. label: "结余数量",
  260. prop: "balanceQuantity",
  261. overHidden: true
  262. },
  263. {
  264. label: "结余数量(融资)",
  265. prop: "balanceQuantityFinancing",
  266. overHidden: true
  267. },
  268. {
  269. label: "结余数量(自有)",
  270. prop: "balanceQuantityHave",
  271. overHidden: true
  272. },
  273. {
  274. label: "批次号",
  275. prop: "dot",
  276. overHidden: true
  277. }
  278. ]
  279. },
  280. whetherFinancing: 0,
  281. picihaolist: [], // 批次号数据
  282. tableData: [],
  283. // 上传附件的需要参数
  284. loadingBtn: false,
  285. filesList: [],
  286. switchDialog: false,
  287. activeName: "sale_detail",
  288. editButton: true,
  289. isSave: true,
  290. disabled: false,
  291. isDisabled: false,
  292. isAddDisabled: false,
  293. form: {
  294. shipItemsList: [],
  295. shipVOList: [],
  296. historyList: []
  297. },
  298. key: 0,
  299. optionForm: {
  300. disabled: false,
  301. menuBtn: false,
  302. span: 8,
  303. column: [
  304. // {
  305. // label: '业务对象',
  306. // disabled: false,
  307. // prop: "customerId",
  308. // type: 'select',
  309. // props: {
  310. // label: 'cname',
  311. // value: 'id'
  312. // },
  313. // dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH&enableOrNot=1',
  314. // dicData:[],
  315. // rules: [{
  316. // required: true,
  317. // message: " ",
  318. // trigger: "blur"
  319. // }]
  320. // },
  321. {
  322. label: "调出仓库",
  323. prop: "storageName",
  324. disabled: true,
  325. // type: "select",
  326. // props: {
  327. // label: "cname",
  328. // value: "id"
  329. // },
  330. // dicUrl: "/api/blade-sales-part/storageDesc/listAll",
  331. rules: [
  332. {
  333. required: true,
  334. message: " ",
  335. trigger: "blur"
  336. }
  337. ]
  338. },
  339. {
  340. label: "调入仓库",
  341. prop: "callInStorageName",
  342. disabled: true,
  343. // type: "select",
  344. // props: {
  345. // label: "cname",
  346. // value: "id"
  347. // },
  348. // dicUrl: "/api/blade-sales-part/storageDesc/listAll",
  349. rules: [
  350. {
  351. required: true,
  352. message: " ",
  353. trigger: "blur"
  354. }
  355. ]
  356. },
  357. {
  358. label: "库管",
  359. prop: "stockClerkId",
  360. type: "select",
  361. disabled: true,
  362. props: {
  363. label: "realName",
  364. value: "id"
  365. },
  366. dicUrl: "/api/blade-user/stockClerkList",
  367. rules: [
  368. {
  369. required: true,
  370. message: " ",
  371. trigger: "blur"
  372. }
  373. ]
  374. },
  375. {
  376. label: "业务日期",
  377. prop: "businesDate",
  378. searchProp: "businesDateList",
  379. disabled: true,
  380. type: "datetime",
  381. value: dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss"),
  382. format: "yyyy-MM-dd HH:mm",
  383. valueFormat: "yyyy-MM-dd HH:mm:ss",
  384. rules: [
  385. {
  386. required: true,
  387. message: "",
  388. trigger: "blur"
  389. }
  390. ]
  391. },
  392. {
  393. label: "调拨单号",
  394. prop: "billno",
  395. disabled: true
  396. },
  397. {
  398. label: "调拨数量",
  399. prop: "goodsTotalNum",
  400. disabled: true
  401. },
  402. {
  403. label: "备注",
  404. prop: "remarks",
  405. type: "textarea",
  406. disabled: false,
  407. span: 24,
  408. minRows: 1
  409. }
  410. ]
  411. },
  412. formContacts: {},
  413. optionContacts: {},
  414. optionContactsBack: {
  415. align: "center",
  416. index: true,
  417. addBtnText: "录入明细",
  418. updateBtnText: "保存",
  419. refreshBtn: false,
  420. dialogDrag: true,
  421. addBtn: false,
  422. span: 8,
  423. height: 300,
  424. addRowBtn: false,
  425. editBtn: false,
  426. delBtn: false,
  427. menuWidth: 250,
  428. dialogTop: 25,
  429. dialogWidth: "80%",
  430. showSummary: true,
  431. tip: false,
  432. selection: true,
  433. sumColumnList: [
  434. {
  435. name: "goodsNum",
  436. type: "sum"
  437. },
  438. {
  439. name: "sendNum",
  440. type: "sum"
  441. }
  442. ],
  443. column: [
  444. {
  445. label: "商品名称",
  446. prop: "goodsName",
  447. width: 200,
  448. overHidden: true,
  449. hide: false
  450. },
  451. {
  452. label: "商品编码",
  453. disabled: true,
  454. prop: "goodsNo",
  455. overHidden: true,
  456. width: 100
  457. },
  458. {
  459. label: "批次号",
  460. prop: "dot",
  461. overHidden: true,
  462. width: 160,
  463. type: "select",
  464. // disabled: true,
  465. dicData: [],
  466. props: {
  467. label: "dot",
  468. value: "dot"
  469. },
  470. dicUrl: "/api/blade-sales-part/stockDesc/dotList"
  471. },
  472. {
  473. label: "库存数量",
  474. prop: "inventory",
  475. overHidden: true,
  476. disabled: true
  477. },
  478. {
  479. label: "参考库存融资",
  480. prop: "inventoryFinancing",
  481. overHidden: true,
  482. width: 120,
  483. disabled: true,
  484. hide: true,
  485. showColumn: false
  486. },
  487. {
  488. label: "参考库存自有",
  489. prop: "inventoryHave",
  490. overHidden: true,
  491. width: 120,
  492. disabled: true,
  493. hide: true,
  494. showColumn: false
  495. },
  496. {
  497. label: "调拨数量",
  498. prop: "goodsNum",
  499. overHidden: true,
  500. disabled: false
  501. },
  502. {
  503. label: "调拨融资",
  504. prop: "sendNumFinancing",
  505. overHidden: true,
  506. disabled: false,
  507. hide: true,
  508. showColumn: false
  509. },
  510. {
  511. label: "调拨自有",
  512. prop: "sendNumHave",
  513. overHidden: true,
  514. disabled: false,
  515. hide: true,
  516. showColumn: false
  517. },
  518. {
  519. label: "单价",
  520. prop: "price",
  521. overHidden: true,
  522. disabled: true
  523. },
  524. {
  525. label: "品牌",
  526. prop: "brandName",
  527. disabled: false,
  528. width: 100,
  529. overHidden: true
  530. },
  531. {
  532. label: "规格型号",
  533. prop: "propertyName",
  534. overHidden: true,
  535. disabled: true,
  536. width: 100
  537. },
  538. {
  539. label: "花纹",
  540. prop: "pattern",
  541. overHidden: true,
  542. disabled: true,
  543. width: 100
  544. },
  545. {
  546. label: "商品描述",
  547. prop: "goodsDescription",
  548. overHidden: true,
  549. disabled: true
  550. },
  551. {
  552. label: "单位",
  553. prop: "units",
  554. overHidden: true,
  555. type: "select",
  556. disabled: true,
  557. props: {
  558. label: "dictValue",
  559. value: "dictValue"
  560. },
  561. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit"
  562. },
  563. {
  564. label: "备注",
  565. prop: "remarks",
  566. overHidden: true
  567. }
  568. ]
  569. },
  570. optionContactsBack2: {
  571. disabled: false,
  572. border: true,
  573. align: "center",
  574. index: true,
  575. addBtnText: "添加商品",
  576. updateBtnText: "保存",
  577. refreshBtn: false,
  578. dialogDrag: true,
  579. addBtn: false,
  580. span: 8,
  581. height: 500,
  582. // 添加
  583. addRowBtn: false,
  584. // 保存按钮
  585. editBtn: false,
  586. // 航编辑开启
  587. cellBtn: true,
  588. rowKey: "ids",
  589. delBtn: false,
  590. menuWidth: 140,
  591. dialogTop: 25,
  592. dialogWidth: "80%",
  593. summaryText: this.$t("land118n.total"),
  594. showSummary: true,
  595. selection: true,
  596. sumColumnList: [
  597. {
  598. name: "goodsNum",
  599. type: "sum"
  600. },
  601. {
  602. name: "price",
  603. type: "sum",
  604. decimals: 2
  605. },
  606. {
  607. name: "sendNum",
  608. type: "sum",
  609. decimals: 2
  610. },
  611. {
  612. name: "outGoodsTotalShipNum",
  613. type: "sum",
  614. decimals: 2
  615. },
  616. {
  617. name: "outGoodsTotalShipAmount",
  618. type: "sum",
  619. decimals: 2
  620. },
  621. {
  622. name: "subTotalMoney",
  623. type: "sum",
  624. decimals: 2
  625. },
  626. {
  627. name: "returnsNumber",
  628. type: "sum"
  629. },
  630. {
  631. name: "returnsAmount",
  632. type: "sum"
  633. },
  634. {
  635. name: "primaryGoodsTotalNum",
  636. type: "sum"
  637. },
  638. {
  639. name: "inventory",
  640. type: "sum"
  641. },
  642. {
  643. name: "rebatePrice",
  644. type: "sum",
  645. decimals: 2
  646. },
  647. {
  648. name: "rebateCostprie",
  649. type: "sum",
  650. decimals: 2
  651. },
  652. {
  653. name: "rebateProfit",
  654. type: "sum",
  655. decimals: 2
  656. },
  657. {
  658. name: "primaryGoodsTotalAmount",
  659. type: "sum",
  660. decimals: 2
  661. }
  662. ],
  663. column: [
  664. {
  665. label: "商品名称",
  666. prop: "goodsId",
  667. width: 200,
  668. disabled: false,
  669. remote: true,
  670. hide: true,
  671. overHidden: true,
  672. type: "select",
  673. // dicData: [],
  674. props: {
  675. label: "cname",
  676. value: "id"
  677. },
  678. // dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}'
  679. dicUrl: "/api/blade-sales-part/goodsDesc/list?current=1&size=10&cname={{key}}&enableOrNot=1"
  680. // dicUrl: "/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}"
  681. },
  682. {
  683. label: "商品名称",
  684. prop: "goodsName",
  685. width: 200,
  686. disabled: false,
  687. remote: true,
  688. overHidden: true
  689. },
  690. {
  691. label: "数量",
  692. prop: "goodsNum",
  693. overHidden: true,
  694. disabled: false,
  695. cell: true,
  696. width: 100,
  697. rules: [
  698. {
  699. required: true,
  700. message: " ",
  701. trigger: "blur"
  702. },
  703. {
  704. validator: (rule, value, callback) => {
  705. console.log(this.formContacts.inventory);
  706. if (value < 0) {
  707. callback(new Error("数量不能小于0"));
  708. } else {
  709. callback();
  710. }
  711. },
  712. trigger: "blur"
  713. }
  714. ]
  715. },
  716. {
  717. label: "价格",
  718. prop: "price",
  719. overHidden: true,
  720. width: 100,
  721. disabled: false,
  722. cell: true,
  723. rules: [
  724. {
  725. required: true,
  726. message: " ",
  727. trigger: "blur"
  728. },
  729. {
  730. validator: (rule, value, callback) => {
  731. if (value < 0) {
  732. callback(new Error("价格不能小于0"));
  733. } else {
  734. callback();
  735. }
  736. },
  737. trigger: "blur"
  738. }
  739. ]
  740. },
  741. {
  742. label: "库存",
  743. prop: "inventory",
  744. overHidden: true,
  745. width: 100
  746. },
  747. {
  748. label: "批次号",
  749. prop: "dot",
  750. cell: true,
  751. width: 120,
  752. type: "select",
  753. disabled: true,
  754. allowCreate: true,
  755. filterable: true,
  756. dicData: [],
  757. props: {
  758. label: "dot",
  759. value: "dot"
  760. },
  761. dicUrl: "/api/blade-sales-part/stockDesc/dotList",
  762. overHidden: true
  763. },
  764. {
  765. label: "小计",
  766. prop: "subTotalMoney",
  767. overHidden: true,
  768. width: 100,
  769. disabled: true,
  770. editDisplay: false,
  771. addDisplay: false
  772. },
  773. {
  774. label: "商品编码",
  775. prop: "goodsNo",
  776. overHidden: true,
  777. disabled: false,
  778. width: 100
  779. },
  780. {
  781. label: "品牌",
  782. prop: "brandName",
  783. disabled: false,
  784. width: 100,
  785. overHidden: true
  786. },
  787. {
  788. label: "规格型号",
  789. prop: "propertyName",
  790. overHidden: true,
  791. disabled: false,
  792. width: 100
  793. },
  794. {
  795. label: "花纹",
  796. prop: "pattern",
  797. overHidden: true,
  798. disabled: false,
  799. width: 100
  800. },
  801. {
  802. label: "商品描述",
  803. prop: "goodsDescription",
  804. disabled: false,
  805. overHidden: true,
  806. width: 100
  807. },
  808. {
  809. label: "单位",
  810. prop: "units",
  811. type: "select",
  812. disabled: false,
  813. props: {
  814. label: "dictValue",
  815. value: "dictValue"
  816. },
  817. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  818. overHidden: true,
  819. width: 100
  820. },
  821. {
  822. label: "订单数量",
  823. prop: "primaryGoodsTotalNum",
  824. overHidden: true,
  825. width: 100,
  826. disabled: true,
  827. editDisplay: false,
  828. addDisplay: false
  829. },
  830. {
  831. label: "订单金额",
  832. prop: "primaryGoodsTotalAmount",
  833. overHidden: true,
  834. width: 100,
  835. disabled: true,
  836. editDisplay: false,
  837. addDisplay: false
  838. },
  839. {
  840. label: "入库数量",
  841. prop: "sendNum",
  842. overHidden: true,
  843. width: 100,
  844. disabled: true,
  845. editDisplay: false,
  846. addDisplay: false
  847. },
  848. {
  849. label: "出库数量",
  850. prop: "outGoodsTotalShipNum",
  851. overHidden: true,
  852. width: 100,
  853. disabled: true,
  854. editDisplay: false,
  855. addDisplay: false
  856. },
  857. {
  858. label: "出库金额",
  859. prop: "outGoodsTotalShipAmount",
  860. overHidden: true,
  861. width: 100,
  862. disabled: true,
  863. editDisplay: false,
  864. addDisplay: false
  865. },
  866. {
  867. label: "原始数量",
  868. prop: "primaryGoodsTotalNum",
  869. overHidden: true,
  870. width: 100,
  871. disabled: true,
  872. editDisplay: false,
  873. addDisplay: false
  874. },
  875. {
  876. label: "原始金额",
  877. prop: "primaryGoodsTotalAmount",
  878. overHidden: true,
  879. width: 100,
  880. disabled: true,
  881. editDisplay: false,
  882. addDisplay: false
  883. },
  884. {
  885. label: "返利后单价",
  886. prop: "rebatePrice",
  887. overHidden: true,
  888. width: 100,
  889. cell: true
  890. },
  891. {
  892. label: "返利后成本价",
  893. prop: "rebateCostprie",
  894. overHidden: true,
  895. width: 100,
  896. disabled: true,
  897. editDisplay: false,
  898. addDisplay: false
  899. },
  900. {
  901. label: "返利后利润",
  902. prop: "rebateProfit",
  903. overHidden: true,
  904. width: 100,
  905. disabled: true,
  906. editDisplay: false,
  907. addDisplay: false
  908. },
  909. // {
  910. // label: '退货数量',
  911. // prop: "returnsNumber",
  912. // overHidden: true,
  913. // width: 100,
  914. // disabled: true,
  915. // },
  916. // {
  917. // label: '退货金额',
  918. // prop: "returnsAmount",
  919. // overHidden: true,
  920. // width: 100,
  921. // disabled: true,
  922. // },
  923. // {
  924. // label: '利润',
  925. // prop: 'profit',
  926. // overHidden: true,
  927. // width: 100
  928. // },
  929. // {
  930. // label: '返利',
  931. // prop: 'thisAmount',
  932. // overHidden: true,
  933. // width: 100
  934. // },
  935. // {
  936. // label: '成本',
  937. // prop: 'costprie',
  938. // overHidden: true,
  939. // width: 100,
  940. // disabled: true,
  941. // editDisplay: false,
  942. // addDisplay: false
  943. // },
  944. // {
  945. // label: '毛利',
  946. // prop: 'grossProfit',
  947. // overHidden: true,
  948. // width: 100,
  949. // disabled: true,
  950. // editDisplay: false,
  951. // addDisplay: false
  952. // },
  953. {
  954. label: "备注",
  955. prop: "remarks",
  956. overHidden: true,
  957. width: 100,
  958. disabled: false
  959. }
  960. ]
  961. }
  962. };
  963. },
  964. components: {
  965. reportDialog,
  966. dialogAssembly,
  967. viewArea,
  968. dicSelect
  969. },
  970. props: {
  971. onLoad: Object,
  972. detailData: Object
  973. },
  974. async created() {
  975. this.optionContacts = await this.getColumnData(this.getColumnName(430), this.optionContactsBack);
  976. isProcurement({ param: "whether.model" }).then(res => {
  977. if (res.data.data == 1) {
  978. this.findObject(this.optionContacts.column, "pattern").label = "规格型号1";
  979. }
  980. });
  981. isProcurement({ param: "whether.financing" }).then(res => {
  982. if (res.data.data == 1) {
  983. this.whetherFinancing = res.data.data;
  984. this.findObject(this.optionContacts.column, "inventoryFinancing").hide = false;
  985. this.findObject(this.optionContacts.column, "inventoryFinancing").showColumn = true;
  986. this.findObject(this.optionContacts.column, "inventoryHave").hide = false;
  987. this.findObject(this.optionContacts.column, "inventoryHave").showColumn = true;
  988. this.findObject(this.optionContacts.column, "sendNumFinancing").hide = false;
  989. this.findObject(this.optionContacts.column, "sendNumFinancing").showColumn = true;
  990. this.findObject(this.optionContacts.column, "sendNumHave").hide = false;
  991. this.findObject(this.optionContacts.column, "sendNumHave").showColumn = true;
  992. }
  993. });
  994. isProcurement({ param: "reservoir.area" }).then(res => {
  995. this.reservoirArea = res.data.data;
  996. });
  997. this.key++;
  998. if (this.detailData.id) {
  999. this.refresh();
  1000. } else {
  1001. this.optionForm.column.forEach(item => {
  1002. if (item.prop == "remarks" || item.prop == "stockClerkId" || item.prop == "businesDate") {
  1003. item.disabled = false;
  1004. } else {
  1005. item.disabled = true;
  1006. }
  1007. });
  1008. this.editButton = false;
  1009. this.isSave = false;
  1010. }
  1011. this.$store.commit("DOMIO_IN_ALLOCATW");
  1012. },
  1013. activated() {
  1014. if (this.detailData.id) {
  1015. this.refresh();
  1016. }
  1017. this.$store.commit("DOMIO_IN_ALLOCATW");
  1018. },
  1019. methods: {
  1020. dicChange(name, row) {
  1021. if (name == "storageName") {
  1022. if (row) {
  1023. this.form.storageId = row.id;
  1024. } else {
  1025. this.form.storageId = null;
  1026. this.form.storageName = row.id;
  1027. }
  1028. }
  1029. if (name == "callInStorageName") {
  1030. if (row) {
  1031. this.form.callInStorageId = row.id;
  1032. this.form.remarks = row.remarks;
  1033. } else {
  1034. this.form.callInStorageId = null;
  1035. this.form.callInStorageName = row.id;
  1036. }
  1037. }
  1038. },
  1039. rowDelArea(row, index) {
  1040. if (row.historyList.filter(item => item.id).length) {
  1041. this.$confirm("是否撤销库区?", "提示", {
  1042. confirmButtonText: "确定",
  1043. cancelButtonText: "取消",
  1044. type: "warning"
  1045. }).then(() => {
  1046. let ids = [];
  1047. for (let item of row.historyList) {
  1048. ids.push(item.id);
  1049. }
  1050. itemRemove({ ids: ids.join(",") }).then(res => {
  1051. row.historyList = [];
  1052. row.dot = null;
  1053. row.sendNum = 0;
  1054. row.sendNumFinancing = 0;
  1055. row.sendNumHave = 0;
  1056. });
  1057. });
  1058. } else {
  1059. row.historyList = [];
  1060. row.dot = null;
  1061. row.sendNum = 0;
  1062. row.sendNumFinancing = 0;
  1063. row.sendNumHave = 0;
  1064. }
  1065. },
  1066. rowArea(row, index) {
  1067. this.$refs.viewArea.openDialog(this.form, row, index);
  1068. },
  1069. areaData(row, index) {
  1070. console.log(row, index);
  1071. this.form.shipItemsList[index].dot = row.dot;
  1072. this.form.shipItemsList[index].goodsNum = row.sendNum;
  1073. this.form.shipItemsList[index].sendNumFinancing = row.sendNumFinancing;
  1074. this.form.shipItemsList[index].sendNumHave = row.sendNumHave;
  1075. this.form.shipItemsList[index].historyList = row.historyList;
  1076. },
  1077. viewInventory() {
  1078. inventoryList({
  1079. cname: this.selectionMultilist[0].goodsName,
  1080. dot: this.selectionMultilist[0].dot,
  1081. storageId: this.form.storageId
  1082. }).then(res => [(this.inventoryData = res.data.data.records)]);
  1083. },
  1084. synchronous(row) {
  1085. this.form.shipItemsList.forEach(e => {
  1086. if (e.goodsName == this.selectionMultilist[0].goodsName) {
  1087. e.inventory = row.balanceQuantity;
  1088. e.inventoryFinancing = row.balanceQuantityFinancing;
  1089. e.inventoryHave = row.balanceQuantityHave;
  1090. }
  1091. });
  1092. },
  1093. selectionContacts(list) {
  1094. this.selectionMultilist = list;
  1095. },
  1096. // 撤销调拨
  1097. revoke() {
  1098. this.$refs["form"].validate((valid, done) => {
  1099. done();
  1100. if (valid) {
  1101. const loading = this.$loading({
  1102. lock: true,
  1103. text: "加载中",
  1104. spinner: "el-icon-loading",
  1105. background: "rgba(255,255,255,0.7)"
  1106. });
  1107. revokeTransferAllocate({
  1108. ...this.form,
  1109. bizTypeName: "DBGD"
  1110. })
  1111. .then(res => {
  1112. this.$message.success("撤销成功");
  1113. this.refresh(res.data.data.id);
  1114. loading.close();
  1115. })
  1116. .finally(() => {
  1117. loading.close();
  1118. });
  1119. }
  1120. });
  1121. },
  1122. confirmComplete() {
  1123. this.$confirm("调拨单是否确认完成?", "提示", {
  1124. confirmButtonText: "确定",
  1125. cancelButtonText: "取消",
  1126. type: "warning"
  1127. }).then(() => {
  1128. const loading = this.$loading({
  1129. lock: true,
  1130. text: "加载中",
  1131. spinner: "el-icon-loading",
  1132. background: "rgba(255,255,255,0.7)"
  1133. });
  1134. confirmComplete({
  1135. ...this.form,
  1136. bizTypeName: "DBGD"
  1137. })
  1138. .then(res => {
  1139. this.$message.success("撤销成功");
  1140. this.refresh(this.form.id);
  1141. })
  1142. .finally(() => {
  1143. loading.close();
  1144. });
  1145. });
  1146. },
  1147. rowEdit(row, index) {
  1148. this.$set(row, "$cellEdit", !row.$cellEdit);
  1149. // if (this.form.statusName == '录入') {
  1150. // this.optionContactsBack.column.forEach(its => {
  1151. // if (its.prop == 'dot') {
  1152. // this.$set(its, 'disabled', false)
  1153. // }
  1154. // })
  1155. // }
  1156. // console.log('this.formContacts.goodsId', this.formContacts.goodsId);
  1157. // dotList({
  1158. // storageId: this.form.storageId,
  1159. // goodsId: row.goodsId
  1160. // }).then(res => {
  1161. // this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
  1162. // })
  1163. // this.$refs.formContacts.rowEdit(row, index)
  1164. },
  1165. // 批次号获取数据
  1166. picihaolistfun(goodsId) {
  1167. dotList({
  1168. storageId: this.form.storageId,
  1169. goodsId: goodsId
  1170. }).then(res => {
  1171. this.picihaolist = res.data.data;
  1172. });
  1173. },
  1174. // 批次号
  1175. picihaolistChangefun(value, row) {
  1176. for (let item of this.picihaolist) {
  1177. if (item.dot == value) {
  1178. this.$set(row, "inventory", item.balanceQuantity);
  1179. }
  1180. }
  1181. },
  1182. // 确认调拨
  1183. complete() {
  1184. if (!this.form.id) {
  1185. this.$message.warning("请先保存数据");
  1186. return;
  1187. }
  1188. this.$refs["form"].validate((valid, done) => {
  1189. done();
  1190. if (valid) {
  1191. if (this.whetherFinancing == 1) {
  1192. for (let item of this.form.shipItemsList) {
  1193. if (item.historyList.length == 0) {
  1194. return this.$message.error("请维护出库明细的库区");
  1195. }
  1196. if (!item.dot) {
  1197. return this.$message.error("请维护明细信息的批次号");
  1198. }
  1199. }
  1200. }
  1201. const loading = this.$loading({
  1202. lock: true,
  1203. text: "加载中",
  1204. spinner: "el-icon-loading",
  1205. background: "rgba(255,255,255,0.7)"
  1206. });
  1207. this.form.shipItemsList.forEach(item => {
  1208. item.goodsName = item.$goodsId;
  1209. });
  1210. transferAllocateSubmit({
  1211. ...this.form,
  1212. bizTypeName: "DBGD"
  1213. })
  1214. .then(res => {
  1215. confirmTransferAllocate({
  1216. ...this.form,
  1217. bizTypeName: "DBGD"
  1218. })
  1219. .then(res => {
  1220. this.$message.success("调拨完成");
  1221. this.refresh(res.data.data.id);
  1222. loading.close();
  1223. })
  1224. .finally(() => {
  1225. loading.close();
  1226. });
  1227. })
  1228. .catch(() => {
  1229. loading.close();
  1230. });
  1231. } else {
  1232. this.$message.error("请选择库管");
  1233. }
  1234. });
  1235. },
  1236. //修改提交触发
  1237. editCustomer() {
  1238. this.$refs["form"].validate((valid, done) => {
  1239. done();
  1240. if (valid) {
  1241. const loading = this.$loading({
  1242. lock: true,
  1243. text: "加载中",
  1244. spinner: "el-icon-loading",
  1245. background: "rgba(255,255,255,0.7)"
  1246. });
  1247. // this.goodsName;
  1248. transferAllocateSubmit({
  1249. ...this.form,
  1250. bizTypeName: "DBGD",
  1251. filesList: this.filesList
  1252. })
  1253. .then(res => {
  1254. this.$message.success("保存成功");
  1255. this.editButton = true;
  1256. this.refresh(res.data.data.id);
  1257. loading.close();
  1258. })
  1259. .finally(() => {
  1260. loading.close();
  1261. });
  1262. } else {
  1263. return false;
  1264. }
  1265. });
  1266. },
  1267. refresh(id, type) {
  1268. this.$set(this.optionContactsBack, "addBtn", false);
  1269. this.$set(this.optionContacts, "addBtn", false);
  1270. this.isDisabled = true;
  1271. const loading = this.$loading({
  1272. lock: true,
  1273. text: "加载中",
  1274. spinner: "el-icon-loading",
  1275. background: "rgba(255,255,255,0.7)"
  1276. });
  1277. if (!this.detailData.id) {
  1278. getDetails({ id: id })
  1279. .then(res => {
  1280. if (res.data.data.statusName == "确认调拨") {
  1281. this.$set(this.optionForm, "disabled", true);
  1282. this.isAddDisabled = true;
  1283. this.optionContacts.column.forEach(item => {
  1284. if (item.prop == "sendNum") {
  1285. item.disabled = true;
  1286. }
  1287. });
  1288. }
  1289. this.isAddDisabled = true;
  1290. if (res.data.data.statusName == "录入") {
  1291. this.isAddDisabled = true;
  1292. this.isDisabled = true;
  1293. }
  1294. this.form = res.data.data;
  1295. this.filesList = res.data.data.filesList;
  1296. this.$nextTick(() => {
  1297. this.$refs.formContacts.refreshTable();
  1298. });
  1299. loading.close();
  1300. })
  1301. .catch(() => {
  1302. loading.close();
  1303. });
  1304. } else {
  1305. getDetails({ id: this.detailData.id })
  1306. .then(res => {
  1307. if (res.data.data.statusName == "已出库") {
  1308. this.$set(this.optionForm, "disabled", true);
  1309. this.isAddDisabled = true;
  1310. this.optionContacts.column.forEach(item => {
  1311. if (item.prop == "sendNum") {
  1312. item.disabled = true;
  1313. }
  1314. });
  1315. }
  1316. this.isAddDisabled = true;
  1317. if (res.data.data.statusName == "待出库") {
  1318. this.isAddDisabled = true;
  1319. this.isDisabled = true;
  1320. }
  1321. this.form = res.data.data;
  1322. this.filesList = res.data.data.filesList;
  1323. this.$nextTick(() => {
  1324. this.$refs.formContacts.refreshTable();
  1325. });
  1326. loading.close();
  1327. })
  1328. .catch(() => {
  1329. loading.close();
  1330. });
  1331. }
  1332. },
  1333. rowDelBox(row, index) {
  1334. this.$confirm("确定将选择数据删除?", {
  1335. confirmButtonText: "确定",
  1336. cancelButtonText: "取消",
  1337. type: "warning"
  1338. }).then(() => {
  1339. if (row.id) {
  1340. tradingBox(row.id).then(res => {
  1341. this.form.shipItemsList.splice(index, 1);
  1342. this.$message.success("操作成功!");
  1343. });
  1344. } else {
  1345. this.form.shipItemsList.splice(index, 1);
  1346. this.$message.success("操作成功!");
  1347. }
  1348. });
  1349. },
  1350. rowSave(form, done, loading) {
  1351. done(form);
  1352. },
  1353. rowUpdate(form, index, done, loading) {
  1354. done(form);
  1355. },
  1356. //打印
  1357. handlePrint() {
  1358. this.switchDialog = !this.switchDialog;
  1359. },
  1360. onClose(val) {
  1361. this.switchDialog = val;
  1362. },
  1363. // 新增出库明细
  1364. adddiailsfun() {
  1365. if (!this.form.storageId) {
  1366. this.$message.warning("请先选择调出仓库!");
  1367. return;
  1368. }
  1369. this.$refs.dialogAssemblyRef.dialogVisible = true;
  1370. this.$refs.dialogAssemblyRef.getAllWorkDicts();
  1371. // this.dialogVisible = true
  1372. },
  1373. //编辑
  1374. confirmEditing() {
  1375. if (this.form.statusName == "录入") {
  1376. this.isDisabled = false;
  1377. this.isSave = false;
  1378. this.$set(this.optionForm, "disabled", false);
  1379. this.optionForm.column.forEach(item => {
  1380. if (item.prop == "remarks" || item.prop == "stockClerkId" || item.prop == "businesDate") {
  1381. item.disabled = false;
  1382. } else {
  1383. item.disabled = true;
  1384. }
  1385. });
  1386. // if (this.form.shipItemsList.length != 0) {
  1387. // this.findObject(this.optionForm.column, "storageId").disabled = true;
  1388. // }
  1389. this.isAddDisabled = false;
  1390. this.optionContactsBack.column.forEach(its => {
  1391. if (its.prop == "dot") {
  1392. this.$set(its, "disabled", false);
  1393. }
  1394. });
  1395. } else {
  1396. this.$set(this.optionForm, "disabled", false);
  1397. this.isAddDisabled = true;
  1398. this.isSave = false;
  1399. // this.optionForm.column.forEach(item => {
  1400. // if (item.prop == 'remarks') {
  1401. // item.disabled = false
  1402. // } else {
  1403. // item.disabled = true
  1404. // }
  1405. // })
  1406. this.optionForm.column.forEach(item => {
  1407. item.disabled = true;
  1408. });
  1409. // this.isAddDisabled = false
  1410. }
  1411. },
  1412. calculator(row) {
  1413. if (row.sendNumFinancing > row.inventoryFinancing) {
  1414. this.$set(row, "sendNumFinancing", null);
  1415. this.$message.error("融资数量不能大于参考库存融资");
  1416. }
  1417. if (row.sendNumHave > row.inventoryHave) {
  1418. this.$set(row, "sendNumHave", null);
  1419. this.$message.error("自由数量不能大于参考库存自有");
  1420. }
  1421. row.goodsNum = Number(Number(row.sendNumFinancing) + Number(row.sendNumHave));
  1422. row.subTotalMoney = row.goodsNum * row.price;
  1423. },
  1424. calculator2(row) {
  1425. if (row.goodsNum > row.inventory) {
  1426. this.$set(row, "goodsNum", null);
  1427. this.$message.error("调拨数量不能大于库存");
  1428. }
  1429. row.subTotalMoney = row.goodsNum * row.price;
  1430. },
  1431. // 导入按钮事件
  1432. tableDataHandle(arr) {
  1433. this.tableData = arr;
  1434. // 循环获取库存数量
  1435. for (let item of this.tableData) {
  1436. let obj = {
  1437. goodsId: item.id,
  1438. price: item.price, // 单价
  1439. goodsName: item.cname,
  1440. goodsNum: item.goodsNum,
  1441. sendNumFinancing: this.whetherFinancing == 1 ? item.sendNumFinancing : 0,
  1442. sendNumHave: this.whetherFinancing == 1 ? item.sendNumHave : 0,
  1443. brandName: item.brandName,
  1444. brandId: item.brandId,
  1445. goodsNo: item.code,
  1446. propertyName: item.specificationAndModel,
  1447. inventory: item.inventory,
  1448. inventoryHave: this.whetherFinancing == 1 ? item.inventoryHave : 0,
  1449. inventoryFinancing: this.whetherFinancing == 1 ? item.inventoryFinancing : 0,
  1450. pattern: item.brandItem,
  1451. goodsDescription: item.goodsDescription,
  1452. dot: item.dot,
  1453. whether: item.whether,
  1454. units: item.unit,
  1455. // 小计
  1456. subTotalMoney: item.goodsNum * item.price,
  1457. // 备注
  1458. remarks: item.remarks,
  1459. // 批次号的状态
  1460. dotedittype: false,
  1461. // 价格数量
  1462. goodsNumtype: false,
  1463. // 价格
  1464. pricetype: false,
  1465. historyList: [],
  1466. $cellEdit: this.reservoirArea == 1 ? false : true
  1467. };
  1468. this.form.shipItemsList.push(obj);
  1469. }
  1470. this.$refs.dialogAssemblyRef.dialogVisible = false;
  1471. this.$nextTick(() => {
  1472. this.$refs.formContacts.doLayout();
  1473. this.$refs.formContacts.refreshTable();
  1474. });
  1475. },
  1476. //自定义列保存
  1477. async saveColumnTwo(ref, option, optionBack, code) {
  1478. /**
  1479. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1480. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1481. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1482. */
  1483. const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
  1484. isProcurement({ param: "whether.model" }).then(res => {
  1485. if (res.data.data == 1) {
  1486. this.findObject(this.optionContacts.column, "pattern").label = "规格型号1";
  1487. }
  1488. });
  1489. if (inSave) {
  1490. this.$message.success("保存成功");
  1491. //关闭窗口
  1492. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  1493. }
  1494. },
  1495. //自定义列重置
  1496. async resetColumnTwo(ref, option, optionBack, code) {
  1497. this[option] = this[optionBack];
  1498. isProcurement({ param: "whether.model" }).then(res => {
  1499. if (res.data.data == 1) {
  1500. this.findObject(this.optionContacts.column, "pattern").label = "规格型号1";
  1501. }
  1502. });
  1503. const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
  1504. if (inSave) {
  1505. this.$message.success("重置成功");
  1506. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  1507. }
  1508. },
  1509. backToList(type) {
  1510. this.$emit("backToList", type);
  1511. // this.$store.commit("DOMIO_OUT_DETAIL");
  1512. }
  1513. }
  1514. };
  1515. </script>
  1516. <style lang="scss" scoped>
  1517. ::v-deep .el-form-item {
  1518. margin-bottom: 8px !important;
  1519. }
  1520. </style>