detailsPage.vue 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131
  1. <template>
  2. <div class="borderless" v-loading="pageLoading">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button
  6. type="danger"
  7. style="border: none;background: none;color: red"
  8. icon="el-icon-arrow-left"
  9. @click="backToList"
  10. >返回列表
  11. </el-button>
  12. </div>
  13. <div class="add-customer-btn" v-if="showBut">
  14. <el-button
  15. type="primary"
  16. size="small"
  17. v-if="detailData.status == 1"
  18. class="el-button--small-yh "
  19. @click.stop="openEdit"
  20. >编辑
  21. </el-button>
  22. <el-dropdown style="margin-right: 8px;margin-left: 8px;">
  23. <el-button type="primary" size="small">
  24. 审核处理<i class="el-icon-arrow-down el-icon--right"></i>
  25. </el-button>
  26. <el-dropdown-menu slot="dropdown">
  27. <el-dropdown-item
  28. :disabled="form.status > 0"
  29. @click.native="pleaseCheck"
  30. >请核数据</el-dropdown-item
  31. >
  32. <el-dropdown-item disabled>审核进度</el-dropdown-item>
  33. <el-dropdown-item disabled>撤销请核</el-dropdown-item>
  34. </el-dropdown-menu>
  35. </el-dropdown>
  36. <el-dropdown style="margin-right: 8px;">
  37. <el-button type="warning" size="small">
  38. 账单处理<i class="el-icon-arrow-down el-icon--right"></i>
  39. </el-button>
  40. <el-dropdown-menu slot="dropdown">
  41. <el-dropdown-item @click.native="generateBill" :disabled="!form.id"
  42. >生成账单
  43. </el-dropdown-item>
  44. <el-dropdown-item @click.native="viewBill" :disabled="!form.id"
  45. >查看账单</el-dropdown-item
  46. >
  47. </el-dropdown-menu>
  48. </el-dropdown>
  49. <el-dropdown style="margin-right: 8px;">
  50. <el-button type="success" size="small">
  51. 业务处理<i class="el-icon-arrow-down el-icon--right"></i>
  52. </el-button>
  53. <el-dropdown-menu slot="dropdown">
  54. <el-dropdown-item @click.native="saveSell"
  55. >生成采购
  56. </el-dropdown-item>
  57. <el-dropdown-item :disabled="!form.id" @click.native="copyDoc"
  58. >复制单据</el-dropdown-item
  59. >
  60. </el-dropdown-menu>
  61. </el-dropdown>
  62. <el-button
  63. type="primary"
  64. :disabled="disabled"
  65. @click="editCustomer"
  66. :loading="subLoading"
  67. v-if="detailData.status != 1"
  68. size="small"
  69. >保存数据
  70. </el-button>
  71. </div>
  72. </div>
  73. <div class="customer-main">
  74. <containerTitle title="基础信息"></containerTitle>
  75. <basic-container>
  76. <avue-form
  77. ref="form"
  78. class="trading-form"
  79. v-model="form"
  80. :option="option"
  81. >
  82. <template slot="portOfLoad">
  83. <port-info
  84. v-model="form.portOfLoad"
  85. :disabled="detailData.status == 1"
  86. />
  87. </template>
  88. <template slot="portOfDestination">
  89. <port-info
  90. v-model="form.portOfDestination"
  91. :disabled="detailData.status == 1"
  92. />
  93. </template>
  94. <template slot="corpId">
  95. <crop-select
  96. v-model="form.corpId"
  97. @getCorpData="getCorpData"
  98. corpType="KH"
  99. :disabled="detailData.status == 1"
  100. ></crop-select>
  101. </template>
  102. <template slot="belongToCorpId">
  103. <crop-select
  104. v-model="form.belongToCorpId"
  105. corpType="GS"
  106. :disabled="detailData.status == 1"
  107. ></crop-select>
  108. </template>
  109. <template slot="priceTerms">
  110. <el-select
  111. size="small"
  112. v-model="form.priceTerms"
  113. placeholder="请选择"
  114. @change="priceTermsChange"
  115. clearable
  116. :disabled="detailData.status == 1"
  117. >
  118. <el-option
  119. v-for="item in priceTermsList"
  120. :key="item.id"
  121. :label="item.dictValue"
  122. :value="item.dictValue"
  123. >
  124. </el-option>
  125. </el-select>
  126. </template>
  127. <template slot="paymentType">
  128. <el-select
  129. size="small"
  130. v-model="form.paymentType"
  131. placeholder="请选择"
  132. @change="paymentTypeChange"
  133. clearable
  134. :disabled="detailData.status == 1"
  135. >
  136. <el-option
  137. v-for="item in paymentTermList"
  138. :key="item.id"
  139. :label="item.dictValue"
  140. :value="item.dictValue"
  141. >
  142. </el-option>
  143. </el-select>
  144. </template>
  145. <template slot="currency">
  146. <el-select
  147. size="small"
  148. v-model="form.currency"
  149. placeholder="请选择"
  150. @change="currencyChange"
  151. :disabled="detailData.status == 1"
  152. >
  153. <el-option
  154. v-for="item in currencyList"
  155. :key="item.id"
  156. :label="item.dictValue"
  157. :value="item.dictValue"
  158. >
  159. </el-option>
  160. </el-select>
  161. </template>
  162. <template slot="exchangeRate">
  163. <el-input
  164. size="small"
  165. v-model="form.exchangeRate"
  166. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  167. placeholder="请输入 汇率"
  168. :disabled="detailData.status == 1"
  169. @change="exchangeRateChange"
  170. />
  171. </template>
  172. <template slot="boxNumber">
  173. <el-input
  174. size="mini"
  175. v-model="form.boxNumber"
  176. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  177. placeholder="请输入 起订量"
  178. :disabled="detailData.status == 1"
  179. />
  180. </template>
  181. <template slot="minOrder">
  182. <el-input
  183. size="mini"
  184. v-model="form.minOrder"
  185. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  186. placeholder="请输入 起订量"
  187. :disabled="detailData.status == 1"
  188. />
  189. </template>
  190. <template slot="predictOceanFreight">
  191. <el-input
  192. size="mini"
  193. v-model="form.predictOceanFreight"
  194. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  195. placeholder="请输入 预计海运费"
  196. :disabled="detailData.status == 1"
  197. />
  198. </template>
  199. <template slot="referenceOceanFreight">
  200. <el-input
  201. size="mini"
  202. v-model="form.referenceOceanFreight"
  203. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  204. placeholder="请输入 参考海运费"
  205. :disabled="detailData.status == 1"
  206. />
  207. </template>
  208. <template slot="oceanFreight">
  209. <el-input
  210. size="mini"
  211. v-model="form.oceanFreight"
  212. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  213. placeholder="请输入 实际海运费"
  214. :disabled="detailData.status == 1"
  215. />
  216. </template>
  217. <template slot="orderNo">
  218. <el-input
  219. size="mini"
  220. v-model="form.orderNo"
  221. oninput="this.value=this.value.toUpperCase()"
  222. placeholder="请输入 "
  223. :disabled="detailData.status == 1"
  224. />
  225. </template>
  226. </avue-form>
  227. </basic-container>
  228. <div>
  229. <containerTitle title="商品信息"></containerTitle>
  230. <basic-container>
  231. <avue-crud
  232. ref="crud"
  233. :data="data"
  234. :option="tableOption"
  235. @row-del="rowDel"
  236. @selection-change="goodsSelectionChange"
  237. @saveColumn="saveColumn"
  238. @resetColumn="resetColumn"
  239. :summary-method="summaryMethod"
  240. :cell-style="cellStyle"
  241. >
  242. <template slot="cname" slot-scope="{ row, index }">
  243. <span v-if="row.$cellEdit" style="display:flex">
  244. <el-select
  245. v-model="row.itemId"
  246. placeholder="请选择"
  247. size="small"
  248. style="width:60%"
  249. @change="cnameChange(row, index)"
  250. >
  251. <el-option
  252. v-for="item in goodsoptions"
  253. :key="item.id"
  254. :label="item.cname"
  255. :value="item.id"
  256. >
  257. </el-option>
  258. </el-select>
  259. <el-button
  260. icon="el-icon-search"
  261. size="small"
  262. @click="rePick(row, index)"
  263. ></el-button>
  264. </span>
  265. <span v-else> {{ row.cname }}</span>
  266. </template>
  267. <template slot="partsDescribe" slot-scope="{ row, index }">
  268. <span v-if="row.$cellEdit" style="display:flex">
  269. <el-input
  270. v-model="row.partsDescribe"
  271. :readonly="true"
  272. size="small"
  273. placeholder="请点击右边按钮"
  274. ></el-input>
  275. <el-button
  276. icon="el-icon-edit"
  277. size="mini"
  278. @click="partrePick(row, index)"
  279. ></el-button>
  280. </span>
  281. <span v-else>{{ row.partsDescribe }}</span>
  282. </template>
  283. <template slot="itemType" slot-scope="{ row }">
  284. <el-select
  285. v-if="row.$cellEdit"
  286. v-model="row.itemType"
  287. filterable
  288. allow-create
  289. default-first-option
  290. placeholder="请输入"
  291. size="small"
  292. @focus="itemTypeFocus(row)"
  293. >
  294. <el-option
  295. v-for="(item, index) in itemtypeList"
  296. :key="index"
  297. :label="item.value"
  298. :value="item.value"
  299. >
  300. </el-option>
  301. </el-select>
  302. <span v-else>{{ row.itemType }}</span>
  303. </template>
  304. <template slot="itemProp" slot-scope="{ row, index }">
  305. <span v-if="row.$cellEdit" style="display:flex">
  306. <el-input
  307. v-model="row.itemProp"
  308. :readonly="true"
  309. size="small"
  310. placeholder="请点击右边按钮"
  311. ></el-input>
  312. <el-button
  313. icon="el-icon-edit"
  314. size="mini"
  315. @click="openProperty(row, index)"
  316. ></el-button>
  317. </span>
  318. <span v-else>{{ row.itemProp }}</span>
  319. </template>
  320. <template slot="priorityReferrer" slot-scope="{ row }">
  321. <el-checkbox
  322. :disabled="!row.$cellEdit"
  323. v-model="row.priorityReferrer"
  324. :true-label="1"
  325. :false-label="0"
  326. />
  327. </template>
  328. <template slot="corpId" slot-scope="{ row, index }">
  329. <crop-select
  330. v-show="row.$cellEdit"
  331. v-model="row.corpId"
  332. :cropIndex="index"
  333. @getCorpData="rowCorpData"
  334. corpType="GYS"
  335. ></crop-select>
  336. <span v-show="!row.$cellEdit">{{ row.corpName }}</span>
  337. </template>
  338. <template slot="purchaseAmount" slot-scope="{ row }">
  339. <el-input
  340. v-if="row.$cellEdit"
  341. v-model="row.purchaseAmount"
  342. size="small"
  343. placeholder="请输入"
  344. @change="purchaseAmountChange(row)"
  345. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  346. ></el-input>
  347. <span v-else>{{ row.purchaseAmount | micrometerFormat }}</span>
  348. </template>
  349. <template slot="price" slot-scope="{ row }">
  350. <el-input
  351. v-if="row.$cellEdit"
  352. v-model="row.price"
  353. size="small"
  354. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  355. @change="priceChange(row)"
  356. ></el-input>
  357. <span v-else>{{ row.price | micrometerFormat }}</span>
  358. </template>
  359. <template slot="amount" slot-scope="{ row }">
  360. <span>{{ row.amount | micrometerFormat }}</span>
  361. </template>
  362. <template slot="orderQuantity" slot-scope="{ row }">
  363. <el-input
  364. v-if="row.$cellEdit"
  365. v-model="row.orderQuantity"
  366. size="small"
  367. oninput='this.value=this.value.replace(/[^(\d)]/g,"")'
  368. @change="priceChange(row)"
  369. ></el-input>
  370. <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
  371. </template>
  372. <template slot="actualQuantity" slot-scope="{ row }">
  373. <span>{{ row.actualQuantity | IntegerFormat }}</span>
  374. </template>
  375. <template slot="discount" slot-scope="{ row }">
  376. <el-input
  377. v-if="row.$cellEdit"
  378. v-model="row.discount"
  379. size="small"
  380. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  381. @change="discountChange(row)"
  382. ></el-input>
  383. <span v-else>{{ row.discount | isDiscount }}</span>
  384. </template>
  385. <template slot="insurance" slot-scope="{ row }">
  386. <el-input
  387. v-if="row.$cellEdit"
  388. v-model="row.insurance"
  389. size="small"
  390. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  391. @change="priceChange(row)"
  392. ></el-input>
  393. <span v-else>{{ row.insurance | micrometerFormat }}</span>
  394. </template>
  395. <template slot="freight" slot-scope="{ row }">
  396. <el-input
  397. v-if="row.$cellEdit"
  398. v-model="row.freight"
  399. size="small"
  400. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  401. @change="priceChange(row)"
  402. ></el-input>
  403. <span v-else>{{ row.freight | micrometerFormat }}</span>
  404. </template>
  405. <template slot="taxRate" slot-scope="{ row }">
  406. <el-input
  407. v-if="row.$cellEdit"
  408. v-model="row.taxRate"
  409. size="small"
  410. oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  411. @change="taxRateChange(row)"
  412. ></el-input>
  413. <span v-else>{{ row.taxRate | isPercentage }}</span>
  414. </template>
  415. <template slot="itemMargin" slot-scope="{ row }">
  416. <span>{{ row.itemMargin | isPercentage }}</span>
  417. </template>
  418. <template slot="menuLeft">
  419. <el-button
  420. type="primary"
  421. icon="el-icon-plus"
  422. size="small"
  423. @click.stop="newDetails"
  424. :disabled="detailData.status == 1"
  425. >录入明细</el-button
  426. >
  427. <el-button
  428. type="primary"
  429. icon="el-icon-plus"
  430. size="small"
  431. @click.stop="addLibrary"
  432. :disabled="detailData.status == 1"
  433. >出口价格库</el-button
  434. >
  435. <el-button
  436. type="info"
  437. icon="el-icon-printer"
  438. size="small"
  439. @click.stop="openReport()"
  440. >报 表</el-button
  441. >
  442. <el-button
  443. type="warning"
  444. icon="el-icon-plus"
  445. size="small"
  446. :disabled="detailData.status == 1 || orderItemIds.length == 0"
  447. @click="getInvoice"
  448. >生成发货单
  449. </el-button>
  450. </template>
  451. <template slot="menu" slot-scope="{ row, index }">
  452. <el-button
  453. size="small"
  454. icon="el-icon-edit"
  455. type="text"
  456. @click="rowCell(row, index)"
  457. :disabled="disabled || detailData.status == 1"
  458. >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
  459. >
  460. <el-button
  461. size="small"
  462. icon="el-icon-edit"
  463. type="text"
  464. @click="rowDel(row, index)"
  465. :disabled="detailData.status == 1"
  466. >删 除</el-button
  467. >
  468. </template>
  469. </avue-crud>
  470. </basic-container>
  471. </div>
  472. <fee-info
  473. ref="feeInfo"
  474. :orderFeesList="orderFeesList"
  475. :disabled="detailData.status == 1"
  476. feeUrl="/blade-purchase-sales/orderfees/update"
  477. />
  478. <upload-file
  479. ref="uploadFile"
  480. title="合同附件"
  481. :orderFilesList="orderFilesList"
  482. :disabled="detailData.status == 1"
  483. delUrl="/blade-purchase-sales/orderfiles/update"
  484. />
  485. <div>
  486. <containerTitle title="银行信息"></containerTitle>
  487. <basic-container>
  488. <avue-form
  489. class="trading-form"
  490. ref="form"
  491. v-model="form"
  492. :option="bankOption"
  493. />
  494. </basic-container>
  495. </div>
  496. <div>
  497. <containerTitle title="保险信息"></containerTitle>
  498. <basic-container>
  499. <avue-form
  500. class="trading-form"
  501. ref="form"
  502. v-model="form"
  503. :option="insuranceOption"
  504. />
  505. </basic-container>
  506. </div>
  507. <div>
  508. <containerTitle title="唛头"></containerTitle>
  509. <basic-container>
  510. <avue-form
  511. class="trading-form"
  512. ref="form"
  513. v-model="form"
  514. :option="markOption"
  515. />
  516. </basic-container>
  517. </div>
  518. </div>
  519. <el-dialog
  520. title="账单"
  521. append-to-body
  522. class="el-dialogDeep"
  523. :visible.sync="financialAccountDialog"
  524. width="60%"
  525. :close-on-click-modal="false"
  526. :destroy-on-close="true"
  527. :close-on-press-escape="false"
  528. v-dialog-drag
  529. >
  530. <financial-account
  531. billType="收费"
  532. :billData="billData"
  533. itemType="销售"
  534. @choceFun="choceFun"
  535. >
  536. </financial-account>
  537. </el-dialog>
  538. <el-dialog
  539. title="申请记录"
  540. append-to-body
  541. class="el-dialogDeep"
  542. :visible.sync="applicationDialog"
  543. width="60%"
  544. :close-on-click-modal="false"
  545. :destroy-on-close="true"
  546. :close-on-press-escape="false"
  547. v-dialog-drag
  548. >
  549. <bill-application :billId="form.id" @choceApplication="choceApplication">
  550. </bill-application>
  551. </el-dialog>
  552. <el-dialog
  553. title="导入商品"
  554. append-to-body
  555. class="el-dialogDeep"
  556. :visible.sync="dialogVisible"
  557. width="80%"
  558. :close-on-click-modal="false"
  559. :destroy-on-close="true"
  560. :close-on-press-escape="false"
  561. @close="closeGoods"
  562. top="5vh"
  563. v-dialog-drag
  564. >
  565. <span>
  566. <el-row>
  567. <el-col :span="4">
  568. <div>
  569. <el-scrollbar>
  570. <basic-container>
  571. <avue-tree
  572. :option="treeOption"
  573. @node-click="nodeClick"
  574. :style="treeStyle"
  575. />
  576. </basic-container>
  577. </el-scrollbar>
  578. </div>
  579. </el-col>
  580. <el-col :span="20">
  581. <avue-crud
  582. :option="goodsOption"
  583. :table-loading="loading"
  584. :data="goodsList"
  585. ref="goodsCrud"
  586. @refresh-change="refreshChange"
  587. @selection-change="selectionChange"
  588. @row-click="rowClick"
  589. :page.sync="page"
  590. @on-load="onLoad"
  591. @saveColumn="saveGoodsColumn"
  592. @resetColumn="resetGoodsColumn"
  593. :cell-style="cellStyle"
  594. ></avue-crud>
  595. </el-col>
  596. </el-row>
  597. </span>
  598. <span slot="footer" class="dialog-footer">
  599. <el-button @click="dialogVisible = false">取 消</el-button>
  600. <el-button
  601. type="primary"
  602. @click="importGoods"
  603. :disabled="selectionList.length == 0"
  604. >导入</el-button
  605. >
  606. </span>
  607. </el-dialog>
  608. <report-dialog
  609. :switchDialog="switchDialog"
  610. :reportId="form.id"
  611. reportName="销售明细(E)"
  612. @onClose="onClose()"
  613. ></report-dialog>
  614. <part-dialog
  615. ref="part"
  616. :partList="partList"
  617. @importPart="importPart"
  618. @partClosed="partClosed"
  619. />
  620. <price-library ref="library" @importLibray="importLibray" />
  621. <property-dialog ref="property" @importProperty="importProperty" />
  622. </div>
  623. </template>
  624. <script>
  625. import tableOption from "./config/customerContact.json";
  626. import goodsOption from "./config/commodity.json";
  627. import feeInfo from "@/components/fee-info/main";
  628. import uploadFile from "@/components/upload-file/main";
  629. import {
  630. detail,
  631. submit,
  632. delItem,
  633. getDeptLazyTree,
  634. getGoods,
  635. deliverGoods,
  636. getPorts,
  637. getSpecification,
  638. saveSell,
  639. getPricedetail,
  640. pleaseCheck
  641. } from "@/api/basicData/salesContract";
  642. import _ from "lodash";
  643. import reportDialog from "@/components/report-dialog/main";
  644. import partDialog from "@/components/part-dialog/main";
  645. import { micrometerFormat, IntegerFormat } from "@/util/validate";
  646. import { contrastObj, contrastList } from "@/util/contrastData";
  647. import customerDialog from "@/components/customer-dialog/main";
  648. import priceLibrary from "@/components/price-Library/main";
  649. import propertyDialog from "@/components/property-dialog/main";
  650. import { dateFormat } from "@/util/date";
  651. import financialAccount from "@/components/finance/financialAccount";
  652. import billApplication from "@/components/bill/billApplication";
  653. import {
  654. productCal,
  655. sellingCal,
  656. amountCal,
  657. transformCal,
  658. grossProfitCal,
  659. STGPCal,
  660. numCal
  661. } from "@/util/calculate";
  662. export default {
  663. name: "detailsPageEdit",
  664. data() {
  665. return {
  666. billData: {}, //账单需要数据
  667. financialAccountDialog: false,
  668. applicationDialog: false,
  669. oldExchange: null,
  670. treeStyle: "height:" + (window.innerHeight - 315) + "px",
  671. configuration: {
  672. multipleChoices: false,
  673. multiple: false,
  674. collapseTags: false,
  675. placeholder: "请点击右边按钮选择",
  676. dicData: []
  677. },
  678. switchDialog: false,
  679. form: {
  680. orderStatus: "录入",
  681. businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
  682. currency: "USD"
  683. },
  684. disabled: false,
  685. dialogVisible: false,
  686. tableOption: {},
  687. option: {
  688. menuBtn: false,
  689. labelWidth: 100,
  690. column: [
  691. {
  692. label: "客户名称",
  693. prop: "corpId",
  694. rules: [
  695. {
  696. required: true,
  697. message: "",
  698. trigger: "blur"
  699. }
  700. ],
  701. span: 16,
  702. slot: true
  703. },
  704. {
  705. label: "系统号",
  706. prop: "sysNo",
  707. span: 8,
  708. disabled: true
  709. },
  710. {
  711. label: "联系人",
  712. prop: "corpAttn",
  713. span: 8
  714. },
  715. {
  716. label: "电话",
  717. prop: "corpTel",
  718. span: 8
  719. },
  720. {
  721. label: "订单状态",
  722. prop: "orderStatus",
  723. span: 8,
  724. type: "select",
  725. dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
  726. props: {
  727. label: "dictValue",
  728. value: "dictValue"
  729. }
  730. },
  731. {
  732. label: "公司主体",
  733. prop: "belongToCorpId",
  734. span: 16,
  735. row: true
  736. },
  737. {
  738. label: "起运港",
  739. prop: "portOfLoad",
  740. span: 8,
  741. type: "select",
  742. filterable: true,
  743. dicData: [],
  744. props: {
  745. label: "name",
  746. value: "name"
  747. }
  748. },
  749. {
  750. label: "目的港",
  751. prop: "portOfDestination",
  752. span: 8,
  753. type: "select",
  754. filterable: true,
  755. dicData: [],
  756. props: {
  757. label: "name",
  758. value: "name"
  759. }
  760. },
  761. {
  762. label: "运输方式",
  763. prop: "transport",
  764. span: 8,
  765. type: "select",
  766. dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
  767. props: {
  768. label: "dictValue",
  769. value: "dictValue"
  770. }
  771. },
  772. {
  773. label: "价格条款",
  774. prop: "priceTerms",
  775. span: 8
  776. // type: "select",
  777. // dicUrl: "/api/blade-system/dict-biz/dictionary?code=pricing_terms",
  778. // props: {
  779. // label: "dictValue",
  780. // value: "dictValue"
  781. // }
  782. },
  783. {
  784. label: "条款说明",
  785. prop: "priceTermsDescription",
  786. span: 16
  787. },
  788. {
  789. label: "收款方式",
  790. prop: "paymentType",
  791. span: 8
  792. // type: "select",
  793. // dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
  794. // props: {
  795. // label: "dictValue",
  796. // value: "dictValue"
  797. // }
  798. },
  799. {
  800. label: "收款说明",
  801. prop: "paymentTypeDescription",
  802. span: 16
  803. },
  804. {
  805. label: "订单日期",
  806. prop: "businesDate",
  807. span: 8,
  808. type: "date",
  809. format: "yyyy-MM-dd",
  810. valueFormat: "yyyy-MM-dd 00:00:00",
  811. rules: [
  812. {
  813. required: true,
  814. message: "",
  815. trigger: "blur"
  816. }
  817. ]
  818. },
  819. {
  820. label: "预交日期",
  821. prop: "plannedDeliveryDate",
  822. span: 8,
  823. type: "date",
  824. format: "yyyy-MM-dd",
  825. valueFormat: "yyyy-MM-dd 00:00:00"
  826. },
  827. {
  828. label: "销售订单号",
  829. prop: "orderNo",
  830. span: 8
  831. },
  832. {
  833. label: "币别",
  834. prop: "currency",
  835. span: 8,
  836. rules: [
  837. {
  838. required: true,
  839. message: "",
  840. trigger: "blur"
  841. }
  842. ]
  843. },
  844. {
  845. label: "汇率",
  846. prop: "exchangeRate",
  847. span: 8,
  848. row: true,
  849. rules: [
  850. {
  851. required: true,
  852. message: "",
  853. trigger: "blur"
  854. }
  855. ]
  856. },
  857. {
  858. label: "箱型",
  859. prop: "boxPile",
  860. type: "select",
  861. dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
  862. props: {
  863. label: "dictValue",
  864. value: "dictValue"
  865. },
  866. span: 8
  867. },
  868. {
  869. label: "箱量",
  870. prop: "boxNumber",
  871. span: 8
  872. },
  873. {
  874. label: "起订量",
  875. prop: "minOrder",
  876. span: 8
  877. },
  878. {
  879. label: "预计海运费",
  880. prop: "predictOceanFreight",
  881. span: 8
  882. },
  883. {
  884. label: "参考海运费",
  885. prop: "referenceOceanFreight",
  886. span: 8
  887. },
  888. {
  889. label: "实际海运费",
  890. prop: "oceanFreight",
  891. span: 8
  892. },
  893. {
  894. label: "产品毛利",
  895. prop: "grossProfit",
  896. span: 8,
  897. disabled: true
  898. },
  899. {
  900. label: "产品利率",
  901. prop: "grossProfitRate",
  902. span: 8,
  903. append: "%",
  904. disabled: true
  905. },
  906. {
  907. label: "单票毛利",
  908. prop: "singleTicketMargin",
  909. span: 8,
  910. disabled: true
  911. },
  912. {
  913. label: "备注",
  914. prop: "orderRemark",
  915. type: "textarea",
  916. minRows: 2,
  917. span: 8
  918. },
  919. {
  920. label: "采购备注",
  921. prop: "purchaseRemark",
  922. type: "textarea",
  923. minRows: 2,
  924. span: 8
  925. },
  926. {
  927. label: "船务备注",
  928. prop: "shippingRemark",
  929. type: "textarea",
  930. minRows: 2,
  931. span: 8
  932. }
  933. ]
  934. },
  935. treeOption: {
  936. nodeKey: "id",
  937. lazy: true,
  938. treeLoad: function(node, resolve) {
  939. const parentId = node.level === 0 ? 0 : node.data.id;
  940. getDeptLazyTree(parentId).then(res => {
  941. resolve(
  942. res.data.data.map(item => {
  943. return {
  944. ...item,
  945. leaf: !item.hasChildren
  946. };
  947. })
  948. );
  949. });
  950. },
  951. addBtn: false,
  952. menu: false,
  953. size: "small",
  954. props: {
  955. label: "title",
  956. value: "value",
  957. children: "children"
  958. }
  959. },
  960. bankOption: {
  961. menuBtn: false,
  962. labelWidth: 100,
  963. column: [
  964. {
  965. label: "外币银行",
  966. prop: "banks",
  967. span: 8
  968. },
  969. {
  970. label: "银行信息",
  971. prop: "banksAccountName",
  972. span: 16,
  973. type: "textarea",
  974. minRows: 2
  975. }
  976. ]
  977. },
  978. insuranceOption: {
  979. menuBtn: false,
  980. labelWidth: 100,
  981. column: [
  982. {
  983. label: "保险描述",
  984. prop: "insuranceRemarks",
  985. span: 24,
  986. type: "textarea",
  987. minRows: 2
  988. }
  989. ]
  990. },
  991. markOption: {
  992. menuBtn: false,
  993. labelWidth: 100,
  994. column: [
  995. {
  996. label: "唛头描述",
  997. prop: "marks",
  998. span: 24,
  999. type: "textarea",
  1000. minRows: 2
  1001. }
  1002. ]
  1003. },
  1004. page: {
  1005. pageSize: 10,
  1006. currentPage: 1,
  1007. total: 0
  1008. },
  1009. loading: false,
  1010. goodsOption: {},
  1011. data: [],
  1012. goodsList: [],
  1013. selectionList: [],
  1014. treeDeptId: null,
  1015. orderFeesList: [],
  1016. orderFilesList: [],
  1017. orderItemIds: [],
  1018. itemtypeList: [],
  1019. reData: null,
  1020. oldform: {
  1021. orderStatus: "录入",
  1022. businesDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
  1023. currency: "USD"
  1024. },
  1025. olddata: [],
  1026. oldorderFeesList: [],
  1027. oldorderFilesList: [],
  1028. subLoading: false,
  1029. pageLoading: false,
  1030. showBut: true,
  1031. partType: false,
  1032. partList: [],
  1033. goodsoptions: [],
  1034. priceTermsList: [],
  1035. paymentTermList: [],
  1036. currencyList: []
  1037. };
  1038. },
  1039. props: {
  1040. detailData: {
  1041. type: Object
  1042. }
  1043. },
  1044. components: {
  1045. reportDialog,
  1046. feeInfo,
  1047. uploadFile,
  1048. customerDialog,
  1049. partDialog,
  1050. priceLibrary,
  1051. propertyDialog,
  1052. financialAccount,
  1053. billApplication
  1054. },
  1055. async created() {
  1056. if (this.detailData.id) {
  1057. this.getDetail(this.detailData.id);
  1058. }
  1059. this.tableOption = await this.getColumnData(
  1060. this.getColumnName(5),
  1061. tableOption
  1062. );
  1063. this.goodsOption = await this.getColumnData(
  1064. this.getColumnName(28),
  1065. goodsOption
  1066. );
  1067. if (this.detailData.status == 1) {
  1068. this.option.disabled = true;
  1069. this.bankOption.disabled = true;
  1070. this.insuranceOption.disabled = true;
  1071. this.markOption.disabled = true;
  1072. }
  1073. getPorts().then(res => {
  1074. this.findObject(this.option.column, "portOfLoad").dicData = res.data;
  1075. this.findObject(this.option.column, "portOfDestination").dicData =
  1076. res.data;
  1077. });
  1078. this.getWorkDicts("product_properties").then(res => {
  1079. this.findObject(this.tableOption.column, "itemProp").dicData =
  1080. res.data.data;
  1081. });
  1082. this.getWorkDicts("unit").then(res => {
  1083. this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
  1084. });
  1085. this.getWorkDicts("pricing_terms").then(res => {
  1086. this.priceTermsList = res.data.data;
  1087. });
  1088. this.getWorkDicts("payment_term").then(res => {
  1089. this.paymentTermList = res.data.data;
  1090. });
  1091. this.getWorkDicts("currency").then(res => {
  1092. this.currencyList = res.data.data;
  1093. if (!this.detailData.id) {
  1094. this.currencyList.forEach(e => {
  1095. if (e.dictValue == "USD") {
  1096. this.form.exchangeRate = e.remark;
  1097. this.oldform.exchangeRate = e.remark;
  1098. this.oldExchange = e.remark;
  1099. }
  1100. });
  1101. }
  1102. });
  1103. getGoods(1, 500).then(res => {
  1104. this.goodsoptions = res.data.data.records;
  1105. });
  1106. },
  1107. filters: {
  1108. IntegerFormat(num) {
  1109. return IntegerFormat(num);
  1110. }
  1111. },
  1112. methods: {
  1113. cellStyle() {
  1114. return "padding:0;height:40px;";
  1115. },
  1116. copyDoc() {
  1117. this.$emit("copyOrder", this.form.id);
  1118. },
  1119. rowCorpData(row) {
  1120. this.data[row.index].corpName = row.cname;
  1121. },
  1122. priceTermsChange(row) {
  1123. this.priceTermsList.forEach(e => {
  1124. if (row == e.dictValue) {
  1125. this.form.priceTermsDescription = e.remark;
  1126. }
  1127. });
  1128. },
  1129. paymentTypeChange(row) {
  1130. this.paymentTermList.forEach(e => {
  1131. if (row == e.dictValue) {
  1132. this.form.paymentTypeDescription = e.remark;
  1133. }
  1134. });
  1135. },
  1136. getCorpData(row) {
  1137. this.form.coefficient = row.coefficient;
  1138. if (this.data.length > 0) {
  1139. this.data.forEach(e => {
  1140. e.productPrice = productCal(
  1141. e.purchaseAmount,
  1142. e.partsPrice,
  1143. this.form.coefficient
  1144. );
  1145. e.price = sellingCal(e.productPrice, this.form.exchangeRate);
  1146. e.amount = amountCal(
  1147. e.price,
  1148. e.orderQuantity,
  1149. e.freight,
  1150. e.insurance,
  1151. e.discount
  1152. );
  1153. e.itemMargin = grossProfitCal(
  1154. e.purchaseAmount,
  1155. e.partsPrice,
  1156. e.price,
  1157. this.form.exchangeRate
  1158. );
  1159. });
  1160. }
  1161. },
  1162. cnameChange(row) {
  1163. this.goodsoptions.forEach(e => {
  1164. if (e.id == row.itemId) {
  1165. row.cname = e.cname;
  1166. row.code = e.code;
  1167. row.corpId = e.corpId;
  1168. row.corpName = e.corpName;
  1169. row.priceCategory = e.goodsTypeName;
  1170. row.itemUrl = e.url;
  1171. row.itemDescription = e.cnameDescription;
  1172. row.unit = e.unit;
  1173. row.purchaseAmount = 0;
  1174. row.productPrice = productCal(
  1175. 0,
  1176. row.partsPrice,
  1177. this.form.coefficient
  1178. );
  1179. row.price = sellingCal(
  1180. productCal(0, row.partsPrice, this.form.coefficient),
  1181. this.form.exchangeRate
  1182. );
  1183. row.amount = amountCal(
  1184. sellingCal(
  1185. productCal(0, row.partsPrice, this.form.coefficient),
  1186. this.form.exchangeRate
  1187. ),
  1188. row.orderQuantity,
  1189. row.freight,
  1190. row.insurance,
  1191. row.discount
  1192. );
  1193. row.itemMargin = grossProfitCal(
  1194. 0,
  1195. row.partsPrice,
  1196. sellingCal(
  1197. productCal(0, row.partsPrice, this.form.coefficient),
  1198. this.form.exchangeRate
  1199. ),
  1200. this.form.exchangeRate
  1201. );
  1202. }
  1203. });
  1204. getPricedetail({ itemId: row.itemId, corpId: row.corpId }).then(res => {
  1205. if (res.data.data) {
  1206. this.goodsoptions.forEach(e => {
  1207. if (e.id == row.itemId) {
  1208. row.purchaseAmount = res.data.data.purchaseAmount;
  1209. row.productPrice = productCal(
  1210. res.data.data.purchaseAmount,
  1211. row.partsPrice,
  1212. this.form.coefficient
  1213. );
  1214. row.price = sellingCal(
  1215. productCal(
  1216. res.data.data.purchaseAmount,
  1217. row.partsPrice,
  1218. this.form.coefficient
  1219. ),
  1220. this.form.exchangeRate
  1221. );
  1222. row.amount = amountCal(
  1223. sellingCal(
  1224. productCal(
  1225. res.data.data.purchaseAmount,
  1226. row.partsPrice,
  1227. this.form.coefficient
  1228. ),
  1229. this.form.exchangeRate
  1230. ),
  1231. row.orderQuantity,
  1232. row.freight,
  1233. row.insurance,
  1234. row.discount
  1235. );
  1236. row.itemMargin = grossProfitCal(
  1237. res.data.data.purchaseAmount,
  1238. row.partsPrice,
  1239. sellingCal(
  1240. productCal(
  1241. res.data.data.purchaseAmount,
  1242. row.partsPrice,
  1243. this.form.coefficient
  1244. ),
  1245. this.form.exchangeRate
  1246. ),
  1247. this.form.exchangeRate
  1248. );
  1249. }
  1250. });
  1251. }
  1252. });
  1253. },
  1254. addLibrary() {
  1255. if (!this.form.corpId) {
  1256. return this.$message.error("请选择客户名称");
  1257. }
  1258. if (!this.form.currency) {
  1259. return this.$message.error("请选择币别");
  1260. }
  1261. this.$refs.library.init(false);
  1262. },
  1263. partrePick(row, index) {
  1264. this.partList = row.partsList;
  1265. this.$refs.part.init(index);
  1266. },
  1267. importPart(rows, sum, index) {
  1268. this.data[index].partsList = rows;
  1269. this.data[index].partsPrice = sum;
  1270. // 销售价=(配件采购价格+产品价格)/汇率 *(1+客户FOB系数/100)
  1271. this.data[index].productPrice = productCal(
  1272. this.data[index].purchaseAmount,
  1273. this.data[index].partsPrice,
  1274. this.form.coefficient
  1275. );
  1276. this.data[index].price = sellingCal(
  1277. this.data[index].productPrice,
  1278. this.form.exchangeRate
  1279. );
  1280. this.data[index].amount = amountCal(
  1281. this.data[index].price,
  1282. this.data[index].orderQuantity,
  1283. this.data[index].freight,
  1284. this.data[index].insurance,
  1285. this.data[index].discount
  1286. );
  1287. this.data[index].itemMargin = grossProfitCal(
  1288. this.data[index].purchaseAmount,
  1289. this.data[index].partsPrice,
  1290. this.data[index].price,
  1291. this.form.exchangeRate
  1292. );
  1293. const names = [];
  1294. const namePrices = [];
  1295. rows.map(e => {
  1296. names.push(e.goodName);
  1297. namePrices.push(e.ename + ":" + e.amout);
  1298. });
  1299. this.data[index].partsDescribe = names.join(",");
  1300. this.data[index].partsPriceDescribe = namePrices.join(";");
  1301. this.priceChange(this.data[index]);
  1302. },
  1303. importProperty(row, index) {
  1304. const arr = [];
  1305. for (let key in row) {
  1306. if (row[key]) {
  1307. arr.push(row[key]);
  1308. }
  1309. }
  1310. this.data[index].itemProp = arr.join(",");
  1311. this.data[index].remarksOne = row.remarksOne;
  1312. this.data[index].customTwo = row.customTwo;
  1313. this.data[index].customThree = row.customThree;
  1314. this.data[index].customFour = row.customFour;
  1315. this.data[index].customFive = row.customFive;
  1316. },
  1317. partClosed() {
  1318. this.partList = [];
  1319. },
  1320. saveSell() {
  1321. if (!this.form.id) {
  1322. return this.$message.error("此单据没有提交记录,请先提交");
  1323. }
  1324. this.$confirm("是否生成采购单?", {
  1325. confirmButtonText: "确定",
  1326. cancelButtonText: "取消",
  1327. type: "warning"
  1328. }).then(() => {
  1329. saveSell(this.form.id).then(res => {
  1330. if (res.data.code == 200) {
  1331. this.$message.success("生成成功");
  1332. }
  1333. });
  1334. });
  1335. },
  1336. rePick(row, index) {
  1337. this.reData = {
  1338. ...row,
  1339. index: index
  1340. };
  1341. this.newDetails();
  1342. },
  1343. rowCell(row, index) {
  1344. if (row.$cellEdit == true) {
  1345. this.$set(row, "$cellEdit", false);
  1346. } else {
  1347. this.$set(row, "$cellEdit", true);
  1348. }
  1349. },
  1350. itemTypeFocus(row) {
  1351. this.itemtypeList = [];
  1352. getSpecification({ goodId: row.itemId }).then(res => {
  1353. const data = res.data.data;
  1354. this.itemtypeList = data.map(item => ({ value: item }));
  1355. });
  1356. },
  1357. purchaseAmountChange(row) {
  1358. row.productPrice = productCal(
  1359. row.purchaseAmount,
  1360. row.partsPrice,
  1361. this.form.coefficient
  1362. );
  1363. row.price = sellingCal(row.productPrice, this.form.exchangeRate);
  1364. row.amount = amountCal(
  1365. row.price,
  1366. row.orderQuantity,
  1367. row.freight,
  1368. row.insurance,
  1369. row.discount
  1370. );
  1371. row.itemMargin = grossProfitCal(
  1372. row.purchaseAmount,
  1373. row.partsPrice,
  1374. row.price,
  1375. this.form.exchangeRate
  1376. );
  1377. },
  1378. priceChange(row) {
  1379. row.amount = amountCal(
  1380. row.price,
  1381. row.orderQuantity,
  1382. row.freight,
  1383. row.insurance,
  1384. row.discount
  1385. );
  1386. row.itemMargin = grossProfitCal(
  1387. row.purchaseAmount,
  1388. row.partsPrice,
  1389. row.price,
  1390. this.form.exchangeRate
  1391. );
  1392. },
  1393. quantityChange(row) {
  1394. if (Number(row.orderQuantity) < Number(row.actualQuantity)) {
  1395. row.orderQuantity = row.actualQuantity;
  1396. this.$message.error("修改的数量不能低于发货数量");
  1397. }
  1398. if (!row.orderQuantity) {
  1399. row.orderQuantity = 0;
  1400. } else {
  1401. row.amount = amountCal(
  1402. row.price,
  1403. row.orderQuantity,
  1404. row.freight,
  1405. row.insurance,
  1406. row.discount
  1407. );
  1408. }
  1409. },
  1410. currencyChange(row) {
  1411. this.currencyList.forEach(e => {
  1412. if (e.dictValue == row) {
  1413. this.form.exchangeRate = e.remark;
  1414. }
  1415. });
  1416. if (this.data.length > 0) {
  1417. this.data.forEach(e => {
  1418. e.freight = transformCal(
  1419. e.freight,
  1420. this.oldExchange,
  1421. this.form.exchangeRate
  1422. );
  1423. e.insurance = transformCal(
  1424. e.insurance,
  1425. this.oldExchange,
  1426. this.form.exchangeRate
  1427. );
  1428. e.price = sellingCal(e.productPrice, this.form.exchangeRate);
  1429. e.amount = amountCal(
  1430. e.price,
  1431. e.orderQuantity,
  1432. e.freight,
  1433. e.insurance,
  1434. e.discount
  1435. );
  1436. e.itemMargin = grossProfitCal(
  1437. e.purchaseAmount,
  1438. e.partsPrice,
  1439. e.price,
  1440. this.form.exchangeRate
  1441. );
  1442. e.exchangeRate = this.form.exchangeRate;
  1443. });
  1444. }
  1445. this.oldExchange = this.deepClone(this.form.exchangeRate);
  1446. },
  1447. exchangeRateChange(row) {
  1448. if (this.data.length > 0) {
  1449. this.data.forEach(e => {
  1450. e.freight = transformCal(e.freight, this.oldExchange, row);
  1451. e.insurance = transformCal(e.insurance, this.oldExchange, row);
  1452. e.price = sellingCal(e.productPrice, row);
  1453. e.amount = amountCal(
  1454. e.price,
  1455. e.orderQuantity,
  1456. e.freight,
  1457. e.insurance,
  1458. e.discount
  1459. );
  1460. e.itemMargin = grossProfitCal(
  1461. e.purchaseAmount,
  1462. e.partsPrice,
  1463. e.price,
  1464. this.form.exchangeRate
  1465. );
  1466. e.exchangeRate = this.form.exchangeRate;
  1467. });
  1468. }
  1469. this.oldExchange = this.deepClone(row);
  1470. },
  1471. discountChange(row) {
  1472. if (row.discount >= 10) {
  1473. row.discount = null;
  1474. this.$message.error("请正确输入折扣");
  1475. }
  1476. this.priceChange(row);
  1477. },
  1478. taxRateChange(row) {
  1479. if (Number(row.taxRate) >= 100) {
  1480. row.taxRate = 0;
  1481. this.$message.error("税率不能超过100%");
  1482. }
  1483. },
  1484. rowSave(row) {
  1485. this.$set(row, "$cellEdit", false);
  1486. },
  1487. rowDel(row, index) {
  1488. this.$confirm("确定删除数据?", {
  1489. confirmButtonText: "确定",
  1490. cancelButtonText: "取消",
  1491. type: "warning"
  1492. }).then(() => {
  1493. if (row.id) {
  1494. delItem(row.id).then(res => {
  1495. this.$message({
  1496. type: "success",
  1497. message: "删除成功!"
  1498. });
  1499. this.data.splice(index, 1);
  1500. });
  1501. } else {
  1502. this.$message({
  1503. type: "success",
  1504. message: "删除成功!"
  1505. });
  1506. this.data.splice(index, 1);
  1507. }
  1508. });
  1509. },
  1510. importGoods() {
  1511. if (this.reData) {
  1512. if (this.selectionList.length != 1) {
  1513. return this.$message.error("重新选择的时候只能选择一条数据");
  1514. } else {
  1515. this.selectionList.forEach(e => {
  1516. this.data.forEach((item, index) => {
  1517. if (index == this.reData.index) {
  1518. item.itemId = e.id;
  1519. item.code = e.code;
  1520. item.cname = e.cname;
  1521. item.ename = e.ename;
  1522. item.corpId = e.corpId;
  1523. item.corpName = e.corpName;
  1524. item.priceCategory = e.goodsTypeName;
  1525. item.itemUrl = e.url;
  1526. item.itemProp = this.reData.itemProp;
  1527. item.remarksOne = this.reData.remarksOne;
  1528. item.customTwo = this.reData.customTwo;
  1529. item.customThree = this.reData.customThree;
  1530. item.customFour = this.reData.customFour;
  1531. item.customFive = this.reData.customFive;
  1532. item.partsList = this.reData.partsList;
  1533. item.partsPrice = this.reData.ppartsPrice;
  1534. item.itemDescription = e.cnameDescription;
  1535. item.itemType = this.reData.itemType;
  1536. item.tradeTerms = this.reData.tradeTerms;
  1537. item.purchaseAmount = 0;
  1538. item.productPrice = productCal(
  1539. 0,
  1540. this.reData.partsPrice,
  1541. this.form.coefficient
  1542. );
  1543. item.price = sellingCal(
  1544. productCal(0, this.reData.partsPrice, this.form.coefficient),
  1545. this.form.exchangeRate
  1546. );
  1547. item.orderQuantity = this.reData.orderQuantity;
  1548. item.insurance = this.reData.insurance;
  1549. item.freight = this.reData.freight;
  1550. item.discount = this.reData.discount;
  1551. item.amount = amountCal(
  1552. sellingCal(
  1553. productCal(
  1554. 0,
  1555. this.reData.partsPrice,
  1556. this.form.coefficient
  1557. ),
  1558. this.form.exchangeRate
  1559. ),
  1560. this.reData.orderQuantity,
  1561. this.reData.freight,
  1562. this.reData.insurance,
  1563. this.reData.discount
  1564. );
  1565. item.taxRate = this.reData.taxRate;
  1566. item.itemMargin = grossProfitCal(
  1567. 0,
  1568. this.reData.partsPrice,
  1569. sellingCal(
  1570. productCal(
  1571. 0,
  1572. this.reData.partsPrice,
  1573. this.form.coefficient
  1574. ),
  1575. this.form.exchangeRate
  1576. ),
  1577. this.form.exchangeRate
  1578. );
  1579. item.unit = e.unit;
  1580. item.remarks = this.reData.remarks;
  1581. item.exchangeRate = this.reData.exchangeRate;
  1582. item.$cellEdit = true;
  1583. }
  1584. });
  1585. });
  1586. }
  1587. } else {
  1588. this.selectionList.forEach(e => {
  1589. this.data.push({
  1590. itemId: e.id,
  1591. code: e.code,
  1592. cname: e.cname,
  1593. ename: e.ename,
  1594. corpId: e.corpId,
  1595. corpName: e.corpName,
  1596. priceCategory: e.goodsTypeName,
  1597. itemUrl: e.url,
  1598. itemProp: null,
  1599. remarksOne: null,
  1600. customTwo: null,
  1601. customThree: null,
  1602. customFour: null,
  1603. customFive: null,
  1604. itemDescription: e.cnameDescription,
  1605. partsList: [],
  1606. partsPrice: 0,
  1607. itemType: null,
  1608. tradeTerms: null,
  1609. price: 0,
  1610. orderQuantity: 0,
  1611. insurance: 0,
  1612. freight: 0,
  1613. discount: null,
  1614. amount: 0,
  1615. taxRate: 0,
  1616. unit: e.unit,
  1617. itemMargin: 0,
  1618. remarks: null,
  1619. exchangeRate: this.form.exchangeRate,
  1620. $cellEdit: true
  1621. });
  1622. });
  1623. }
  1624. this.dialogVisible = false;
  1625. },
  1626. closeGoods() {
  1627. this.selectionList = [];
  1628. this.treeDeptId = "";
  1629. this.reData = null;
  1630. },
  1631. goodsSelectionChange(list) {
  1632. this.orderItemIds = [];
  1633. list.map(e => {
  1634. this.orderItemIds.push(e.id);
  1635. });
  1636. },
  1637. selectionChange(list) {
  1638. this.selectionList = list;
  1639. },
  1640. rowClick(row) {
  1641. this.$refs.goodsCrud.toggleSelection([this.goodsList[row.$index]]);
  1642. },
  1643. nodeClick(data) {
  1644. this.treeDeptId = data.id;
  1645. this.page.currentPage = 1;
  1646. this.onLoad(this.page);
  1647. },
  1648. //费用查询
  1649. onLoad(page, params = {}) {
  1650. this.loading = true;
  1651. getGoods(page.currentPage, page.pageSize, this.treeDeptId).then(res => {
  1652. const data = res.data.data;
  1653. this.page.total = data.total;
  1654. this.goodsList = data.records;
  1655. this.loading = false;
  1656. if (this.page.total) {
  1657. this.goodsOption.height = window.innerHeight - 350;
  1658. }
  1659. });
  1660. },
  1661. importLibray(rows) {
  1662. rows.forEach(e => {
  1663. this.data.push({
  1664. itemId: e.itemId,
  1665. code: e.code,
  1666. cname: e.cname,
  1667. ename: e.ename,
  1668. priceCategory: e.goodsTypeName,
  1669. purchaseAmount: e.purchaseAmount,
  1670. itemProp: null,
  1671. remarksOne: null,
  1672. customTwo: null,
  1673. customThree: null,
  1674. customFour: null,
  1675. customFive: null,
  1676. corpId: e.corpId,
  1677. corpName: e.corpName,
  1678. itemDescription: e.cnameDescription,
  1679. partsList: [],
  1680. partsPrice: 0,
  1681. itemType: e.specs,
  1682. tradeTerms: null,
  1683. productPrice: productCal(e.purchaseAmount, 0, this.form.coefficient),
  1684. price: sellingCal(
  1685. productCal(e.purchaseAmount, 0, this.form.coefficient),
  1686. this.form.exchangeRate
  1687. ),
  1688. orderQuantity: 1,
  1689. insurance: 0,
  1690. freight: 0,
  1691. discount: null,
  1692. amount: sellingCal(
  1693. productCal(e.purchaseAmount, 0, this.form.coefficient),
  1694. this.form.exchangeRate
  1695. ),
  1696. taxRate: 0,
  1697. unit: e.unit,
  1698. itemMargin: grossProfitCal(
  1699. e.purchaseAmount,
  1700. 0,
  1701. sellingCal(
  1702. productCal(e.purchaseAmount, 0, this.form.coefficient),
  1703. this.form.exchangeRate
  1704. ),
  1705. this.form.exchangeRate
  1706. ),
  1707. remarks: null,
  1708. exchangeRate: this.form.exchangeRate,
  1709. $cellEdit: true
  1710. });
  1711. });
  1712. },
  1713. //商品明细导入
  1714. newDetails() {
  1715. if (!this.form.corpId) {
  1716. return this.$message.error("请选择客户名称");
  1717. }
  1718. this.dialogVisible = !this.dialogVisible;
  1719. },
  1720. getDetail(id) {
  1721. this.showBut = false;
  1722. this.pageLoading = true;
  1723. detail(id)
  1724. .then(res => {
  1725. if (this.detailData.status == "copy") {
  1726. delete res.data.data.id;
  1727. delete res.data.data.sysNo;
  1728. delete res.data.data.orderNo;
  1729. delete res.data.data.orgOrderNo;
  1730. delete res.data.data.createTime;
  1731. delete res.data.data.createUser;
  1732. delete res.data.data.createUserName;
  1733. delete res.data.data.updateTime;
  1734. delete res.data.data.updateUser;
  1735. delete res.data.data.updateUserName;
  1736. delete res.data.data.morderNo;
  1737. delete res.data.data.status;
  1738. delete res.data.data.ifEnquiry;
  1739. delete res.data.data.ifShipping;
  1740. res.data.data.orderStatus = "录入";
  1741. res.data.data.orderItemsList.forEach(e => {
  1742. delete e.id;
  1743. delete e.pid;
  1744. delete e.createTime;
  1745. delete e.createUser;
  1746. delete e.updateTime;
  1747. delete e.updateUser;
  1748. delete e.orgOrderNo;
  1749. delete e.srcId;
  1750. delete e.status;
  1751. delete e.isDeleted;
  1752. });
  1753. res.data.data.orderFeesList.forEach(e => {
  1754. delete e.id;
  1755. delete e.pid;
  1756. delete e.createTime;
  1757. delete e.createUser;
  1758. delete e.updateTime;
  1759. delete e.updateUser;
  1760. delete e.status;
  1761. delete e.isDeleted;
  1762. });
  1763. res.data.data.orderFilesList.forEach(e => {
  1764. delete e.id;
  1765. delete e.pid;
  1766. delete e.createTime;
  1767. delete e.createUser;
  1768. delete e.updateTime;
  1769. delete e.updateUser;
  1770. delete e.status;
  1771. delete e.isDeleted;
  1772. });
  1773. }
  1774. this.form = res.data.data;
  1775. this.data = res.data.data.orderItemsList;
  1776. this.orderFeesList = res.data.data.orderFeesList;
  1777. this.orderFilesList = res.data.data.orderFilesList;
  1778. this.oldform = res.data.data;
  1779. this.olddata = this.deepClone(res.data.data.orderItemsList);
  1780. this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
  1781. this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
  1782. this.oldExchange = this.deepClone(this.form.exchangeRate);
  1783. })
  1784. .finally(() => {
  1785. this.showBut = true;
  1786. this.pageLoading = false;
  1787. });
  1788. },
  1789. //修改提交触发
  1790. editCustomer(status) {
  1791. this.$refs["form"].validate((valid, done) => {
  1792. done();
  1793. if (valid) {
  1794. let amountSum = 0;
  1795. let reSum = 0;
  1796. let costSum = 0;
  1797. let paySum = 0;
  1798. if (this.data.length > 0) {
  1799. for (let i = 0; i < this.data.length; i++) {
  1800. if (this.data[i].corpId == null) {
  1801. return this.$message.error(`请输入第${i + 1}行的供应商`);
  1802. }
  1803. amountSum = _.add(
  1804. amountSum,
  1805. _.multiply(
  1806. numCal(this.data[i].amount),
  1807. numCal(this.data[i].exchangeRate)
  1808. )
  1809. );
  1810. costSum = _.add(
  1811. costSum,
  1812. _.multiply(
  1813. _.add(
  1814. numCal(this.data[i].purchaseAmount),
  1815. numCal(this.data[i].partsPrice)
  1816. ),
  1817. numCal(this.data[i].orderQuantity)
  1818. )
  1819. );
  1820. }
  1821. }
  1822. const orderFeesList = this.$refs.feeInfo.submitData();
  1823. for (let i = 0; i < orderFeesList.length; i++) {
  1824. if (orderFeesList[i].corpId == null) {
  1825. return this.$message.error(`请输入第${i + 1}行的结算中心`);
  1826. }
  1827. if (orderFeesList[i].price == 0) {
  1828. return this.$message.error(`请正确输入第${i + 1}行的价格`);
  1829. }
  1830. if (orderFeesList[i].quantity == 0) {
  1831. return this.$message.error(`请正确输入第${i + 1}行的数量`);
  1832. }
  1833. if (!orderFeesList[i].currency) {
  1834. return this.$message.error(`请正确选择第${i + 1}行的币别`);
  1835. }
  1836. if (!orderFeesList[i].exchangeRate) {
  1837. return this.$message.error(`请正确输入第${i + 1}行的汇率`);
  1838. }
  1839. if (orderFeesList[i].feesType == 1) {
  1840. reSum = _.add(
  1841. reSum,
  1842. _.multiply(
  1843. numCal(orderFeesList[i].amount),
  1844. numCal(orderFeesList[i].exchangeRate)
  1845. )
  1846. );
  1847. }
  1848. if (orderFeesList[i].feesType == 2) {
  1849. paySum = _.add(
  1850. paySum,
  1851. _.multiply(
  1852. numCal(orderFeesList[i].amount),
  1853. numCal(orderFeesList[i].exchangeRate)
  1854. )
  1855. );
  1856. }
  1857. }
  1858. this.form.singleTicketMargin = STGPCal(
  1859. amountSum,
  1860. reSum,
  1861. costSum,
  1862. paySum
  1863. );
  1864. const orderFilesList = this.$refs.uploadFile.submitData();
  1865. this.subLoading = true;
  1866. submit({
  1867. ...this.form,
  1868. orderItemsList: this.data,
  1869. orderFeesList: orderFeesList,
  1870. orderFilesList: orderFilesList
  1871. })
  1872. .then(res => {
  1873. this.form = res.data.data;
  1874. this.data = res.data.data.orderItemsList;
  1875. this.orderFeesList = res.data.data.orderFeesList;
  1876. this.orderFilesList = res.data.data.orderFilesList;
  1877. this.$message.success("保存成功");
  1878. this.oldform = res.data.data;
  1879. this.olddata = this.deepClone(res.data.data.orderItemsList);
  1880. this.oldorderFeesList = this.deepClone(
  1881. res.data.data.orderFeesList
  1882. );
  1883. this.oldorderFilesList = this.deepClone(
  1884. res.data.data.orderFilesList
  1885. );
  1886. this.oldExchange = this.deepClone(this.form.exchangeRate);
  1887. if (status == "goBack") {
  1888. this.$emit("goBack");
  1889. }
  1890. })
  1891. .finally(() => {
  1892. this.subLoading = false;
  1893. });
  1894. } else {
  1895. return false;
  1896. }
  1897. });
  1898. },
  1899. generateBill() {
  1900. this.financialAccountDialog = true;
  1901. this.billData = {
  1902. srcOrderno: this.form.orgOrderNo,
  1903. itemType: "销售",
  1904. corpsName: this.form.corpName,
  1905. corpId: this.form.corpId,
  1906. srcParentId: this.form.id,
  1907. currency: "CNY",
  1908. exchangeRate: "1",
  1909. taxRate: "0",
  1910. accDate: this.form.businesDate,
  1911. srcType: 1,
  1912. tradeType: "GN",
  1913. optionType: "GN"
  1914. };
  1915. },
  1916. choceFun() {
  1917. this.financialAccountDialog = false;
  1918. },
  1919. viewBill() {
  1920. this.applicationDialog = true;
  1921. },
  1922. //关闭记录
  1923. choceApplication() {
  1924. this.applicationDialog = false;
  1925. },
  1926. // 请核
  1927. pleaseCheck() {
  1928. this.$confirm("您确定提交此次申请吗?", {
  1929. confirmButtonText: "确定",
  1930. cancelButtonText: "取消",
  1931. type: "warning"
  1932. }).then(() => {
  1933. const data = {
  1934. id: this.form.id,
  1935. checkType: "xsqh",
  1936. url: "/exportTrade/salesContract/index",
  1937. pageStatus: "this.$store.getters.domSaleStatus",
  1938. pageLabel: "销售(E)",
  1939. checkFlag: 2
  1940. };
  1941. pleaseCheck(data)
  1942. .then(res => {
  1943. this.$message.success("请核成功");
  1944. this.getDetail(this.form.id)
  1945. })
  1946. });
  1947. },
  1948. //返回列表
  1949. backToList() {
  1950. let orderFeesList = this.$refs.feeInfo.submitData();
  1951. let orderFilesList = this.$refs.uploadFile.submitData();
  1952. if (
  1953. contrastObj(this.form, this.oldform) ||
  1954. contrastList(this.data, this.olddata) ||
  1955. contrastList(orderFeesList, this.oldorderFeesList) ||
  1956. contrastList(orderFilesList, this.oldorderFilesList)
  1957. ) {
  1958. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  1959. confirmButtonText: "确定",
  1960. cancelButtonText: "取消",
  1961. type: "warning"
  1962. })
  1963. .then(() => {
  1964. this.editCustomer("goBack");
  1965. })
  1966. .catch(() => {
  1967. this.$emit("goBack");
  1968. });
  1969. } else {
  1970. this.$emit("goBack");
  1971. }
  1972. },
  1973. openReport() {
  1974. this.switchDialog = !this.switchDialog;
  1975. },
  1976. openProperty(row, index) {
  1977. this.$refs.property.init(row, index);
  1978. },
  1979. onClose(val) {
  1980. this.switchDialog = val;
  1981. },
  1982. getInvoice() {
  1983. if (this.$store.getters.outStatus) {
  1984. this.$alert("出口发货单存在,请保存发货单再进行操作", "温馨提示", {
  1985. confirmButtonText: "确定",
  1986. type: "warning",
  1987. callback: action => {
  1988. console.log(action);
  1989. }
  1990. });
  1991. } else {
  1992. this.inInvoice();
  1993. }
  1994. },
  1995. inInvoice() {
  1996. const data = { id: this.form.id, orderItemIds: this.orderItemIds };
  1997. deliverGoods(data).then(res => {
  1998. if (res.data.code == 200) {
  1999. this.$message.success("生成成功");
  2000. if (data) {
  2001. const data = res.data.data;
  2002. data.orderItemsList.forEach(e => {
  2003. e.actualQuantity = e.orderQuantity;
  2004. e.contractAmount = e.amount;
  2005. e.srcId = e.id;
  2006. e.specificationAndModel = e.itemType;
  2007. e.productDesc = e.itemDescription;
  2008. e.exRate0 = e.exchangeRate;
  2009. delete e.id;
  2010. delete e.version;
  2011. delete e.status;
  2012. delete e.createUser;
  2013. delete e.createTime;
  2014. delete e.updateUser;
  2015. delete e.updateTime;
  2016. delete e.isDeleted;
  2017. });
  2018. const obj = {
  2019. corpId: data.corpId,
  2020. deliveryStatus: "录入",
  2021. srcOrderNo: data.sysNo,
  2022. orgOrderNo: data.orgOrderNo,
  2023. orderItemsList: data.orderItemsList,
  2024. orderFeesList: data.deliveryFeesList
  2025. };
  2026. this.$router.$avueRouter.closeTag("/exportTrade/invoice/index");
  2027. this.$router.push({
  2028. path: "/exportTrade/invoice/index",
  2029. query: {
  2030. pageType: "Generate",
  2031. data: JSON.stringify(obj)
  2032. }
  2033. });
  2034. }
  2035. }
  2036. });
  2037. },
  2038. openEdit() {
  2039. this.detailData.status = 2;
  2040. this.option = this.$options.data().option;
  2041. },
  2042. async saveColumn() {
  2043. const inSave = await this.saveColumnData(
  2044. this.getColumnName(5),
  2045. this.tableOption
  2046. );
  2047. if (inSave) {
  2048. this.$message.success("保存成功");
  2049. //关闭窗口
  2050. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  2051. }
  2052. },
  2053. async resetColumn() {
  2054. this.tableOption = tableOption;
  2055. const inSave = await this.delColumnData(
  2056. this.getColumnName(5),
  2057. tableOption
  2058. );
  2059. if (inSave) {
  2060. this.$message.success("重置成功");
  2061. this.$refs.crud.$refs.dialogColumn.columnBox = false;
  2062. }
  2063. },
  2064. summaryMethod({ columns, data }) {
  2065. const sums = [];
  2066. if (columns.length > 0) {
  2067. columns.forEach((item, index) => {
  2068. sums[0] = "合计";
  2069. if (item.property == "orderQuantity" || item.property == "amount") {
  2070. let qtySum = 0;
  2071. let amountSum = 0;
  2072. data.forEach(e => {
  2073. qtySum = _.add(qtySum, Number(e.orderQuantity));
  2074. amountSum = _.add(amountSum, Number(e.amount));
  2075. });
  2076. //数量总计
  2077. if (item.property == "orderQuantity") {
  2078. sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
  2079. }
  2080. //金额总计
  2081. if (item.property == "amount") {
  2082. sums[index] = micrometerFormat(amountSum);
  2083. }
  2084. }
  2085. });
  2086. }
  2087. return sums;
  2088. },
  2089. async saveGoodsColumn() {
  2090. const inSave = await this.saveColumnData(
  2091. this.getColumnName(28),
  2092. this.goodsOption
  2093. );
  2094. if (inSave) {
  2095. this.$message.success("保存成功");
  2096. //关闭窗口
  2097. this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
  2098. }
  2099. },
  2100. async resetGoodsColumn() {
  2101. this.goodsOption = goodsOption;
  2102. const inSave = await this.delColumnData(
  2103. this.getColumnName(28),
  2104. goodsOption
  2105. );
  2106. if (inSave) {
  2107. this.$message.success("重置成功");
  2108. //关闭窗口
  2109. setTimeout(() => {
  2110. this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
  2111. }, 1000);
  2112. }
  2113. }
  2114. }
  2115. };
  2116. </script>
  2117. <style lang="scss" scoped>
  2118. .trading-form ::v-deep .el-form-item {
  2119. margin-bottom: 8px !important;
  2120. }
  2121. ::v-deep .el-form-item__error {
  2122. display: none !important;
  2123. }
  2124. ::v-deep .select-component {
  2125. display: flex !important;
  2126. }
  2127. </style>