detailsPageEdit.vue 66 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912
  1. <template>
  2. <div class="borderless" v-loading="pageLoading">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <!-- <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
  6. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  7. @click="backToList">返回列表
  8. </el-button>
  9. </div>
  10. <div class="add-customer-btn">
  11. <el-button
  12. v-if="detailData.seeDisabled"
  13. size="small"
  14. @click="detailData.seeDisabled = false"
  15. type="primary"
  16. >编辑</el-button>
  17. <el-button
  18. class="el-button--small-yh"
  19. type="primary"
  20. size="small"
  21. :disabled="detailData.seeDisabled || arrivalDisabled"
  22. v-if="form.deliveryStatus == '已到货'"
  23. @click="cancelArrival"
  24. >撤销到货</el-button>
  25. <el-button
  26. class="el-button--small-yh"
  27. type="primary"
  28. size="small"
  29. :disabled="detailData.seeDisabled || arrivalDisabled"
  30. v-if="form.deliveryStatus == '已发货'"
  31. @click="confirmArrival"
  32. >确认到货</el-button>
  33. <el-button
  34. class="el-button--small-yh"
  35. type="primary"
  36. @click="revokeOutGoods"
  37. size="small"
  38. v-if="form.deliveryStatus == '已发货'"
  39. :disabled="detailData.seeDisabled || arrivalDisabled"
  40. >撤销发货</el-button>
  41. <el-button
  42. class="el-button--small-yh"
  43. type="primary"
  44. @click="sendOutGoods"
  45. size="small"
  46. v-if="form.deliveryStatus == '录入'"
  47. :disabled="detailData.seeDisabled || !form.id || arrivalDisabled"
  48. >确认发货</el-button>
  49. <el-button
  50. class="el-button--small-yh"
  51. size="small"
  52. type="success" @click="copyOrder"
  53. :disabled="detailData.seeDisabled || !form.id || arrivalDisabled">
  54. 复制单据
  55. </el-button>
  56. <el-button
  57. class="el-button--small-yh"
  58. type="primary"
  59. :disabled="disabled || detailData.seeDisabled || arrivalDisabled"
  60. @click="editCustomer(false)"
  61. :loading="saveLoading"
  62. size="small"
  63. >保 存
  64. </el-button>
  65. </div>
  66. </div>
  67. <div class="customer-main">
  68. <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
  69. <containerTitle title="基础资料"></containerTitle>
  70. <basic-container style="margin-bottom: 10px">
  71. <el-row>
  72. <el-col v-for="(item,index) in basicData.column" :key="index" :span="item.span?item.span:8">
  73. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  74. <!-- <avue-input-tree v-if="item.prop === 'corpsTypeId'" leaf-only multiple :props="{label:'title'}" v-model="form[item.prop]" placeholder="请选择内容" type="tree" :dic="dic"-->
  75. <!-- ></avue-input-tree>-->
  76. <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
  77. size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="item.disabled || detailData.seeDisabled || arrivalDisabled"/>
  78. <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
  79. size="small" type="date" placeholder="选择日期"
  80. :disabled="detailData.seeDisabled || arrivalDisabled"/>
  81. <crop-select
  82. v-else-if="item.prop === 'corpId'"
  83. v-model="form[item.prop]"
  84. corpType="KH"
  85. :disabled="detailData.seeDisabled || arrivalDisabled"
  86. style="width: 100%"
  87. ></crop-select>
  88. <crop-select
  89. v-else-if="item.prop === 'salesCompany'"
  90. v-model="form[item.prop]"
  91. corpType="GS"
  92. :disabled="detailData.seeDisabled || arrivalDisabled"
  93. ></crop-select>
  94. <!-- <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"-->
  95. <!-- :configuration="configuration" style="width: 100%" :disabled="detailData.seeDisabled"/>-->
  96. <!-- <selectComponent v-else-if="item.prop === 'salesCompany'" v-model="form[item.prop]" typeData="GS"-->
  97. <!-- :configuration="companyConfiguration" style="width: 100%" :disabled="detailData.seeDisabled"/>-->
  98. <el-select v-else-if="item.prop === 'deliveryStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="item.disabled || detailData.seeDisabled || arrivalDisabled">
  99. <el-option v-for="(item,index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue" size="small"></el-option>
  100. </el-select>
  101. <el-select v-else-if="item.prop === 'warehouseType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || arrivalDisabled">
  102. <el-option v-for="(item,index) in warehouseTypeOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
  103. </el-select>
  104. <!-- <avue-input-tree-->
  105. <!-- v-else-if="item.prop === 'warehouseType'"-->
  106. <!-- leaf-only-->
  107. <!-- placeholder="请选择内容"-->
  108. <!-- :dic="warehouseType"-->
  109. <!-- type="tree"-->
  110. <!-- v-model="form[item.prop]"-->
  111. <!-- style="width: 100%"-->
  112. <!-- size="small"-->
  113. <!-- @change="warehouseTreeChange"-->
  114. <!-- >-->
  115. <!-- </avue-input-tree>-->
  116. <warehouse-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]"
  117. :configuration="configurationWarehouse" style="width: 100%" :disabled="detailData.seeDisabled || arrivalDisabled"/>
  118. <el-input
  119. v-else-if="item.type == 'number'"
  120. placeholder="请输入"
  121. v-input-limit="2"
  122. size="small"
  123. :disabled="item.disabled || detailData.seeDisabled || arrivalDisabled"
  124. v-model.trim="form[item.prop]"
  125. />
  126. <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled || arrivalDisabled"></el-input>
  127. <el-input type="age" v-else v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled || arrivalDisabled"></el-input>
  128. </el-form-item>
  129. </el-col>
  130. </el-row>
  131. </basic-container>
  132. <containerTitle title="商品信息"></containerTitle>
  133. <basic-container style="margin-bottom: 10px">
  134. <avue-crud
  135. :option="customerContact"
  136. v-model="contactsForm"
  137. :data="goodsShowData"
  138. ref="crudContact"
  139. @row-save="rowSave"
  140. @row-click="handleRowClick"
  141. @row-update="rowUpdate"
  142. @row-del="rowDel"
  143. @saveColumn="saveColumn('goods')"
  144. :cell-style="goodsRowClassName"
  145. >
  146. <template slot="code" slot-scope="{row,index}">
  147. <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="commodityChoice(row)" :disabled="detailData.seeDisabled || !row.$cellEdit || arrivalDisabled">选择</el-button>
  148. <span>{{ row.code }}</span>
  149. </template>
  150. <template slot-scope="{row,index}" slot="menu">
  151. <el-button
  152. type="text"
  153. size="small"
  154. @click="rowCell(row,index)"
  155. :disabled="detailData.seeDisabled || arrivalDisabled"
  156. >{{ row.$cellEdit ? '保存' : '修改' }}
  157. </el-button>
  158. <el-button
  159. size="small"
  160. icon="el-icon-delete"
  161. type="text"
  162. @click="rowDel(row, index)"
  163. :disabled="detailData.seeDisabled || arrivalDisabled"
  164. v-if="!row.$cellEdit"
  165. >删 除</el-button>
  166. </template>
  167. <template slot="menuLeft" slot-scope="{size}">
  168. <el-tabs v-model="goodsActives" @tab-click="handleClick">
  169. <el-tab-pane label="商品" name="goods" :key="'first'" :disabled="goodsDisabled || goodsActives == 'goods'">
  170. </el-tab-pane>
  171. <el-tab-pane label="赠品" name="gift" :key="'second'" :disabled="goodsDisabled || goodsActives == 'gift'">
  172. </el-tab-pane>
  173. </el-tabs>
  174. <el-button type="primary"
  175. icon="el-icon-plus"
  176. size="small"
  177. @click="marketDialog = true"
  178. :disabled="detailData.seeDisabled || arrivalDisabled"
  179. v-if="goodsActives == 'goods'"
  180. >录入明细
  181. </el-button>
  182. <el-button type="primary"
  183. icon="el-icon-plus"
  184. size="small"
  185. @click="commoditySelection"
  186. :disabled="detailData.seeDisabled || arrivalDisabled"
  187. v-if="goodsActives == 'gift'"
  188. >录入明细
  189. </el-button>
  190. <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
  191. <el-button
  192. type="warning"
  193. icon="el-icon-refresh"
  194. size="small"
  195. :disabled="detailData.seeDisabled || arrivalDisabled"
  196. @click="resetStock"
  197. >库存刷新</el-button>
  198. </template>
  199. <template slot="actualQuantity" slot-scope="{ row }">
  200. <el-input
  201. v-if="row.$cellEdit"
  202. v-model.trim="row.actualQuantity"
  203. v-input-limit="0"
  204. @change="actualQuantityChange(row)"
  205. ></el-input>
  206. <span v-else>{{ row.actualQuantity }}</span>
  207. </template>
  208. <!-- 到货数量-->
  209. <template slot="arrivalQuantity" slot-scope="{ row }">
  210. <el-input
  211. v-if="row.$cellEdit"
  212. v-model.trim="row.arrivalQuantity"
  213. v-input-limit="0"
  214. @change="arrivalQuantityChange(row)"
  215. ></el-input>
  216. <span v-else>{{ row.arrivalQuantity }}</span>
  217. </template>
  218. <template slot="corpId" slot-scope="{ row, index }">
  219. <crop-select
  220. v-if="row.$cellEdit"
  221. v-model="row.corpId"
  222. :cropIndex="index"
  223. corpType="GYS"
  224. @getCorpData="getcorpId"
  225. :disabled="detailData.seeDisabled || arrivalDisabled"
  226. ></crop-select>
  227. <span v-else>{{ row.corpName }}</span>
  228. </template>
  229. </avue-crud>
  230. </basic-container>
  231. <fee-info
  232. ref="feeInfo"
  233. :orderFeesList="advantageProjectData"
  234. :disabled="detailData.seeDisabled || arrivalDisabled"
  235. feeUrl="/blade-deliver-goods/deliveryfees/update"
  236. />
  237. <!-- <containerTitle title="费用明细"></containerTitle>-->
  238. <!-- <basic-container style="margin-bottom: 10px">-->
  239. <!-- <avue-crud-->
  240. <!-- :option="advantageProject"-->
  241. <!-- v-model="advantageProjectForm"-->
  242. <!-- :data="advantageProjectData"-->
  243. <!-- ref="crudProject"-->
  244. <!-- @row-save="rowSaveProject"-->
  245. <!-- @row-update="rowUpdateProject"-->
  246. <!-- @row-del="rowDelProject"-->
  247. <!-- @saveColumn="saveColumn('fees')"-->
  248. <!-- >-->
  249. <!-- <template slot="code" slot-scope="{row,index}">-->
  250. <!-- <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="choice(row)" :disabled="detailData.seeDisabled || !row.$cellEdit">选择</el-button>-->
  251. <!-- <span>{{ row.code }}</span>-->
  252. <!-- </template>-->
  253. <!-- <template slot="corpId" slot-scope="{ row }">-->
  254. <!-- <selectComponent v-if="row.$cellEdit" v-model="row.corpId"-->
  255. <!-- :configuration="configuration" @receiveList="receiveList"/>-->
  256. <!-- <span v-else>-->
  257. <!-- <span v-for="item in configuration.dicData" v-if="item.id == row.corpId">{{ item.cname }}</span>-->
  258. <!-- </span>-->
  259. <!-- </template>-->
  260. <!-- <template slot="amount" slot-scope="{ row }">-->
  261. <!-- <el-input v-if="row.$cellEdit" v-model.trim="row.amount"-->
  262. <!-- size="small" v-input-limit="2"-->
  263. <!-- ></el-input>-->
  264. <!-- <span v-else>{{ row.amount }}</span>-->
  265. <!-- </template>-->
  266. <!-- <template slot="settlmentAmount" slot-scope="{ row }">-->
  267. <!-- <el-input v-if="row.$cellEdit" v-model.trim="row.settlmentAmount"-->
  268. <!-- size="small" v-input-limit="2"-->
  269. <!-- ></el-input>-->
  270. <!-- <span v-else>{{ row.settlmentAmount }}</span>-->
  271. <!-- </template>-->
  272. <!-- <template slot-scope="{row,index}" slot="menu">-->
  273. <!-- <el-button-->
  274. <!-- type="text"-->
  275. <!-- size="small"-->
  276. <!-- @click="rowCellTwo(row,index)"-->
  277. <!-- :disabled="detailData.seeDisabled"-->
  278. <!-- >{{ row.$cellEdit ? '保存' : '修改' }}-->
  279. <!-- </el-button>-->
  280. <!-- <el-button-->
  281. <!-- size="small"-->
  282. <!-- icon="el-icon-delete"-->
  283. <!-- type="text"-->
  284. <!-- @click="rowDelProject(row, index)"-->
  285. <!-- :disabled="detailData.seeDisabled"-->
  286. <!-- v-if="!row.$cellEdit"-->
  287. <!-- >删 除</el-button>-->
  288. <!-- </template>-->
  289. <!-- <template slot="menuLeft" slot-scope="{size}">-->
  290. <!-- <el-button type="primary"-->
  291. <!-- icon="el-icon-plus"-->
  292. <!-- size="small"-->
  293. <!-- @click="costIncrease"-->
  294. <!-- :disabled="detailData.seeDisabled"-->
  295. <!-- >录入明细-->
  296. <!-- </el-button>-->
  297. <!-- </template>-->
  298. <!-- </avue-crud>-->
  299. <!-- </basic-container>-->
  300. <containerTitle title="附件上传"></containerTitle>
  301. <basic-container style="margin-bottom: 40px">
  302. <avue-crud
  303. :option="bankOfDeposit"
  304. v-model="bankOfDepositForm"
  305. :data="bankOfDepositData"
  306. @row-save="rowSaveBankOfDeposit"
  307. @row-update="rowUpdateBankOfDeposit"
  308. @row-del="rowDelBankOfDeposit"
  309. :upload-after="uploadAfter"
  310. ref="uploadCrud"
  311. >
  312. <template slot="menuLeft">
  313. <el-button
  314. type="primary"
  315. icon="el-icon-plus"
  316. size="small"
  317. @click.stop="$refs.uploadCrud.rowAdd()"
  318. :disabled="detailData.seeDisabled || arrivalDisabled"
  319. >上传</el-button
  320. >
  321. </template>
  322. <template slot="menu" slot-scope="{ row, index }">
  323. <el-button
  324. size="small"
  325. icon="el-icon-edit"
  326. type="text"
  327. @click="$refs.uploadCrud.rowEdit(row, index)"
  328. :disabled="detailData.seeDisabled || arrivalDisabled"
  329. >编 辑</el-button
  330. >
  331. <el-button
  332. size="small"
  333. icon="el-icon-delete"
  334. type="text"
  335. @click="rowDelBankOfDeposit(row, index)"
  336. :disabled="detailData.seeDisabled || arrivalDisabled"
  337. >删 除</el-button
  338. >
  339. </template>
  340. </avue-crud>
  341. </basic-container>
  342. </el-form>
  343. </div>
  344. <el-dialog
  345. title="导入商品"
  346. append-to-body
  347. class="el-dialogDeep"
  348. :visible.sync="dialogVisible"
  349. width="80%"
  350. :close-on-click-modal="false"
  351. :destroy-on-close="true"
  352. :close-on-press-escape="false"
  353. @close="closeGoods">
  354. <el-row :style="{height: rowHeight}">
  355. <el-col :span="5" style="height: 100%;overflow-y: auto">
  356. <div>
  357. <el-scrollbar>
  358. <basic-container>
  359. <avue-tree :option="treeOption" :data="treeDataGoods" @node-click="nodeClick"/>
  360. </basic-container>
  361. </el-scrollbar>
  362. </div>
  363. </el-col>
  364. <el-col :span="19">
  365. <basic-container>
  366. <avue-crud :option="optionTwo"
  367. :table-loading="loading"
  368. :data="data"
  369. ref="crud"
  370. @refresh-change="refreshChange"
  371. @selection-change="selectionChange"
  372. :page.sync="page"
  373. @search-change="goodsSearch"
  374. @on-load="onLoad"></avue-crud>
  375. </basic-container>
  376. </el-col>
  377. </el-row>
  378. <span slot="footer" class="dialog-footer">
  379. <el-button @click="dialogVisible = false">取 消</el-button>
  380. <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
  381. <el-button type="primary" @click="importChoice" v-if="commodityData === true"
  382. :disabled="tableData.length !== 1">导入</el-button>
  383. </span>
  384. </el-dialog>
  385. <el-dialog
  386. title="导入费用"
  387. append-to-body
  388. class="el-dialogDeep"
  389. :visible.sync="dialogCost"
  390. width="80%"
  391. :close-on-click-modal="false"
  392. :destroy-on-close="true"
  393. :close-on-press-escape="false"
  394. @close="closeFees">
  395. <el-row :style="{height: rowHeight}">
  396. <el-col :span="5" style="height: 100%;overflow-y: auto">
  397. <div>
  398. <el-scrollbar>
  399. <basic-container>
  400. <avue-tree :option="treeOptionCost" :data="treeData" @node-click="nodeClickCost"/>
  401. </basic-container>
  402. </el-scrollbar>
  403. </div>
  404. </el-col>
  405. <el-col :span="19">
  406. <basic-container>
  407. <avue-crud :option="optionTwoCost"
  408. :table-loading="loadingCost"
  409. :data="dataCost"
  410. ref="crud"
  411. @refresh-change="refreshChangeCost"
  412. @selection-change="selectionChangeCost"
  413. :page.sync="pageCost"
  414. @searchChange="feesSearch"
  415. @on-load="onLoadCost">
  416. </avue-crud>
  417. </basic-container>
  418. </el-col>
  419. </el-row>
  420. <span slot="footer" class="dialog-footer">
  421. <el-button @click="dialogCost = false">取 消</el-button>
  422. <el-button type="primary" @click="importCost" v-if="choiceData !== true">导入</el-button>
  423. <el-button type="primary" @click="choiceCost" v-if="choiceData === true"
  424. :disabled="tableDataCost.length !== 1">导入</el-button>
  425. </span>
  426. </el-dialog>
  427. <!-- 导入销售明细-->
  428. <el-dialog
  429. title="导入销售"
  430. append-to-body
  431. class="el-dialogDeep"
  432. :visible.sync="marketDialog"
  433. width="60%"
  434. :close-on-click-modal="false"
  435. :destroy-on-close="true"
  436. :modal-append-to-body='false'
  437. :close-on-press-escape="false"
  438. v-dialog-drag>
  439. <market-detail
  440. @importMarket="importMarket"
  441. @close="closeMarkeDialog"
  442. systemType="GN"
  443. >
  444. </market-detail>
  445. </el-dialog>
  446. </div>
  447. </template>
  448. <script>
  449. import {
  450. typeSave, detail,
  451. corpstypeTree,
  452. corpsattn,
  453. corpsbank,
  454. corpsitem,
  455. getList,
  456. sendOutGoods,
  457. revokeOutGoods,
  458. confirmArrival,
  459. cancelArrival
  460. } from "@/api/basicData/deliveryNotice"
  461. import customerContact from "./configuration/customerContact.json"
  462. import advantageProject from "./configuration/advantageProject.json"
  463. import bankOfDeposit from "./configuration/bankOfDeposit.json"
  464. import commodity from "./configuration/commodity.json"
  465. import optionTwoCost from "./configuration/mainListCost.json"
  466. import {getDeptLazyTree,getDeptLazyTreeTwo, customerList} from "@/api/basicData/basicFeesDesc";
  467. import {customerList as wareHouseType} from "@/api/basicData/basicStorageType"
  468. import {customerList as selectWareHouse} from "@/api/basicData/basicStorageDesc"
  469. import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
  470. import { contrastObj, contrastList } from "@/util/contrastData";
  471. import marketDetail from "@/components/procurement/market";
  472. import feeInfo from "@/components/fee-info/main";
  473. export default {
  474. name: "detailsPage",
  475. props: {
  476. detailData: {
  477. type: Object
  478. }
  479. },
  480. components: {
  481. marketDetail,
  482. feeInfo,
  483. },
  484. data() {
  485. return {
  486. configuration: {
  487. multipleChoices: false,
  488. multiple: false,
  489. collapseTags: false,
  490. placeholder: '请点击右边按钮选择',
  491. dicData: []
  492. },
  493. companyConfiguration: {
  494. multipleChoices: false,
  495. multiple: false,
  496. collapseTags: false,
  497. placeholder: '请点击右边按钮选择',
  498. dicData: []
  499. },
  500. configurationWarehouse: {
  501. multipleChoices: false,
  502. multiple: false,
  503. collapseTags: false,
  504. placeholder: "请点击右边按钮选择",
  505. dicData: [],
  506. },
  507. form: {},
  508. data: [],
  509. loadingCost: false,
  510. choiceData: false,
  511. commodityData: false,
  512. dataCost: [],
  513. treeDataGoods: [],
  514. treeData: [],
  515. choiceIndex: '',
  516. dialogCost: false,
  517. treeDeptId: '',
  518. treeDeptIdCost: '',
  519. pageCost: {
  520. pageSize: 10,
  521. currentPage: 1,
  522. total: 0
  523. },
  524. page: {
  525. pageSize: 10,
  526. currentPage: 1,
  527. total: 0
  528. },
  529. loading: false,
  530. contactsForm: {},
  531. optionTwo: commodity,
  532. optionTwoCost: optionTwoCost,
  533. treeOptionCost: {
  534. nodeKey: 'id',
  535. lazy: true,
  536. treeLoad: function (node, resolve) {
  537. const parentId = (node.level === 0) ? 0 : node.data.id;
  538. getDeptLazyTree(parentId).then(res => {
  539. resolve(res.data.data.map(item => {
  540. return {
  541. ...item,
  542. leaf: !item.hasChildren
  543. }
  544. }))
  545. });
  546. },
  547. addBtn: false,
  548. menu: false,
  549. size: 'small',
  550. props: {
  551. labelText: '标题',
  552. label: 'title',
  553. value: 'value',
  554. children: 'children'
  555. }
  556. },
  557. treeOption: {
  558. nodeKey: 'id',
  559. lazy: true,
  560. treeLoad: function (node, resolve) {
  561. const parentId = (node.level === 0) ? 0 : node.data.id;
  562. getDeptLazyTreeTwo(parentId).then(res => {
  563. resolve(res.data.data.map(item => {
  564. return {
  565. ...item,
  566. leaf: !item.hasChildren
  567. }
  568. }))
  569. });
  570. },
  571. addBtn: false,
  572. menu: false,
  573. size: 'small',
  574. props: {
  575. labelText: '标题',
  576. label: 'title',
  577. value: 'value',
  578. children: 'children'
  579. }
  580. },
  581. dialogVisible: false,
  582. advantageProjectForm: {},
  583. bankOfDepositForm: {},
  584. contactsData: [],
  585. advantageProjectData: [],
  586. disabled: false,
  587. saveLoading: false,
  588. bankOfDepositData: [],
  589. tableDataCost: [],
  590. dic: [],
  591. tableData: [],
  592. customerContact: {},
  593. advantageProject: {},
  594. bankOfDeposit: bankOfDeposit,
  595. basicData: {
  596. column: [
  597. {
  598. label: '系统编号',//发货通知(点击)
  599. prop: 'sysNo',
  600. disabled: true,
  601. rules: [
  602. {
  603. required: false,
  604. message: ' ',
  605. trigger: 'blur'
  606. }
  607. ]
  608. }, {
  609. label: '客户名称',
  610. prop: 'corpId',
  611. span: 16,
  612. rules: [
  613. {
  614. required: true,
  615. message: ' ',
  616. trigger: 'blur'
  617. }
  618. ]
  619. }, {
  620. label: '单据状态',
  621. prop: 'deliveryStatus',
  622. disabled: true,
  623. rules: [
  624. {
  625. required: true,
  626. message: ' ',
  627. trigger: 'blur'
  628. }
  629. ]
  630. }, {
  631. label: '所属公司',
  632. prop: 'salesCompany', //salesCompany
  633. span: 16,
  634. rules: [
  635. {
  636. required: true,
  637. message: ' ',
  638. trigger: 'blur'
  639. }
  640. ]
  641. }, {
  642. label: '仓库类型',
  643. prop: 'warehouseType',//字典表
  644. rules: [
  645. {
  646. required: true,
  647. message: ' ',
  648. trigger: 'blur'
  649. }
  650. ]
  651. }, {
  652. label: '仓库名称',
  653. prop: 'storageId',
  654. span: 16,
  655. rules: [
  656. {
  657. required: true,
  658. message: ' ',
  659. trigger: 'blur'
  660. }
  661. ]
  662. },{
  663. label: '匹配订单号',
  664. prop: 'srcOrderNo',
  665. rules: [
  666. {
  667. required: false,
  668. message: ' ',
  669. trigger: 'blur'
  670. }
  671. ]
  672. }, {
  673. label: '出库金额',
  674. prop: 'deliveryAmount',
  675. disabled: false,
  676. rules: [
  677. {
  678. required: false,
  679. message: ' ',
  680. trigger: 'blur'
  681. }
  682. ]
  683. }, {
  684. label: '出库数量',
  685. prop: 'totalQuantity',
  686. disabled: false,
  687. rules: [
  688. {
  689. required: false,
  690. message: ' ',
  691. trigger: 'blur'
  692. }
  693. ]
  694. }, {
  695. label: '出库日期',
  696. prop: 'businessDate',
  697. type: 'datetime',
  698. rules: [
  699. {
  700. required: true,
  701. message: ' ',
  702. trigger: 'blur'
  703. }
  704. ]
  705. }, {
  706. label: '制单时间',
  707. type: 'datetime',
  708. prop: 'createTime',
  709. disabled: true,
  710. rules: [
  711. {
  712. required: false,
  713. message: ' ',
  714. trigger: 'blur'
  715. }
  716. ]
  717. }, {
  718. label: '费用合计',
  719. prop: 'totalCost',
  720. rules: [
  721. {
  722. required: false,
  723. message: ' ',
  724. trigger: 'blur'
  725. }
  726. ]
  727. },{
  728. label: '收货地址',
  729. prop: 'arrivalAddress',
  730. rules: [
  731. {
  732. required: false,
  733. message: ' ',
  734. trigger: 'blur'
  735. }
  736. ]
  737. }, {
  738. label: '收货人',
  739. prop: 'arrivalContact',
  740. rules: [
  741. {
  742. required: false,
  743. message: ' ',
  744. trigger: 'blur'
  745. }
  746. ]
  747. }, {
  748. label: '收货电话',
  749. prop: 'arrivalTel',
  750. rules: [
  751. {
  752. required: false,
  753. message: ' ',
  754. trigger: 'blur'
  755. }
  756. ]
  757. }, {
  758. label: '包装要求',
  759. prop: 'packageRemarks',
  760. rules: [
  761. {
  762. required: false,
  763. message: ' ',
  764. trigger: 'blur'
  765. }
  766. ]
  767. },{
  768. label: '赠送积分',
  769. prop: 'presenterIntegral',
  770. disabled: true,
  771. rules: [
  772. {
  773. required: false,
  774. message: ' ',
  775. trigger: 'blur'
  776. }
  777. ]
  778. },{
  779. label: '兑换积分',
  780. prop: 'convertIntegral',
  781. disabled: true,
  782. rules: [
  783. {
  784. required: false,
  785. message: ' ',
  786. trigger: 'blur'
  787. }
  788. ]
  789. }, {
  790. label: "备注",
  791. span: 24,
  792. type: 'textarea',
  793. prop: "otherRemarks",
  794. mock: {
  795. type: 'county'
  796. }
  797. }
  798. ]
  799. },
  800. statusOption: [],
  801. warehouseTypeOption: [],
  802. // 仓库类型
  803. warehouseType: [],
  804. // 仓库名称
  805. warehouseName: [],
  806. maxFeeNum: 0,
  807. maxGoodsNum: 0,
  808. oldForm: {
  809. orderStatus: "录入"
  810. },
  811. oldGoodsList: [],
  812. oldFeesList: [],
  813. oldUploadList: [],
  814. // 导入销售订单明细
  815. marketDialog: false,
  816. // 弹窗高度
  817. rowHeight: '',
  818. // 查询时loading页面
  819. pageLoading: false,
  820. goodsActives: 'goods',
  821. goodsDisabled: false,
  822. // 赠品信息数据
  823. giftData: [],
  824. // 商品信息展示数据
  825. goodsShowData: [],
  826. // 确认收货禁用
  827. deliverDisabled: false,
  828. // 确认到货禁用
  829. arrivalDisabled: false,
  830. }
  831. },
  832. mounted() {
  833. this.$nextTick(() => {
  834. // 监听浏览器高度变化,改变表格高度
  835. window.onresize = () => {
  836. this.rowHeight = (window.innerHeight - 130) + 'px'
  837. }
  838. })
  839. },
  840. //初始化查询
  841. async created() {
  842. this.rowHeight = (window.innerHeight - 130) + 'px'
  843. this.customerContact = await this.getColumnData(this.getColumnName(21), customerContact);
  844. this.advantageProject = await this.getColumnData(this.getColumnName(22), advantageProject);
  845. this.getWorkDicts("order_status").then(res => {
  846. this.statusOption = res.data.data
  847. })
  848. this.getWorkDicts("warehouseType").then(res => {
  849. this.warehouseTypeOption = res.data.data
  850. })
  851. this.$set(this.form,'deliveryStatus','录入')
  852. this.$set(this.form, 'presenterIntegral' , 0)
  853. this.$set(this.form, 'convertIntegral' , 0)
  854. wareHouseType().then(res => {
  855. this.warehouseType = res.data.data.records
  856. this.warehouseType.forEach(item => {
  857. this.$set(item, 'label', item.cname)
  858. this.$set(item, 'value', item.id)
  859. if (item.hasChildren) {
  860. this.$set(item, 'children', [])
  861. }
  862. })
  863. let result = [], temp = {}
  864. for(let i = 0; i < this.warehouseType.length;i++) {
  865. temp[this.warehouseType[i].id] = this.warehouseType[i]
  866. }
  867. for (let j = 0;j < this.warehouseType.length;j++) {
  868. let current = this.warehouseType[j]
  869. let tempCurrentParent = temp[current.parentId]
  870. if (tempCurrentParent) {
  871. if (!tempCurrentParent["children"]) {
  872. tempCurrentParent["children"] = []
  873. }
  874. tempCurrentParent["children"].push(current)
  875. } else {
  876. result.push(current)
  877. }
  878. }
  879. this.warehouseType = result
  880. });
  881. selectWareHouse().then(res => {
  882. this.warehouseName = res.data.data.records
  883. })
  884. if (this.detailData.id) {
  885. let id = this.detailData.id
  886. this.queryData(id)
  887. }else if (this.detailData.form){
  888. this.form = JSON.parse(this.detailData.form);
  889. delete this.form.createTime
  890. delete this.form.id
  891. delete this.form.sysNo
  892. this.form.orderItemsList.forEach(item => {
  893. this.$set(item, 'contractNumber', this.form.orgOrderNo)
  894. })
  895. this.contactsData = this.form.orderItemsList.filter(item => {
  896. return item.goodType == 0
  897. })
  898. this.giftData = this.form.orderItemsList.filter(item => {
  899. return item.goodType == 1
  900. })
  901. this.giftData.forEach(item => {
  902. this.$set(item, 'deliveryAmount', item.amount)
  903. this.$set(item, 'specificationAndModel', item.itemType)
  904. this.$set(item, 'orgOrderNo', this.form.orgOrderNo)
  905. this.$set(item, 'srcOrderNo', this.form.srcOrderNo)
  906. this.$set(item, "srcId", item.id)
  907. delete item.id
  908. delete item.pid
  909. delete item.createTime
  910. delete item.createUser
  911. delete item.status
  912. delete item.updateTime
  913. delete item.updateUser
  914. })
  915. this.goodsShowData = this.giftData;
  916. this.goodsActives = 'goods';
  917. this.handleClick({name: this.goodsActives})
  918. // this.contactsData = this.form.orderItemsList
  919. delete this.form.orderItemsList
  920. this.configuration.dicData = this.form.corpName
  921. delete this.form.corpName
  922. this.$set(this.form, 'deliveryStatus', '录入')
  923. this.$set(this.form, 'srcOrderNo', this.form.orgOrderNo)
  924. if (this.form.belongToCorpList) {
  925. this.$set(this.form, 'salesCompany', this.form.belongToCorpId)
  926. delete this.form.belongToCorpId
  927. this.companyConfiguration.dicData = this.companyConfiguration.dicData.concat(this.form.belongToCorpList)
  928. }
  929. delete this.form.belongToCorpList
  930. this.$set(this.form, 'deliveryAmount', 0)
  931. this.$set(this.form, 'totalQuantity', 0)
  932. this.$set(this.form, 'totalCost', 0)
  933. this.advantageProjectData = this.form.orderFeesList;
  934. delete this.form.orderFeesList
  935. this.advantageProjectData.forEach(item => {
  936. delete item.createDept
  937. delete item.createTime
  938. delete item.createUser
  939. delete item.id
  940. delete item.isDeleted
  941. delete item.pid
  942. delete item.status
  943. delete item.tenantId
  944. delete item.updateTime
  945. delete item.updateUser
  946. })
  947. this.contactsData.forEach(item => {
  948. this.$set(item, 'specificationAndModel', item.itemType)
  949. this.$set(item, 'orgOrderNo', this.form.orgOrderNo)
  950. this.$set(item, 'srcOrderNo', this.form.srcOrderNo)
  951. this.$set(item, "srcId", item.id)
  952. this.$set(item, "actualQuantity", (Number(item.orderQuantity) - Number(item.actualQuantity)))
  953. this.$set(item, "deliveryAmount", item.amount)
  954. this.$set(item, "inventoryNumber", item.storageQuantity)
  955. this.$set(item, "inventoryAmount", 0)
  956. this.form.deliveryAmount += Number(item.deliveryAmount)
  957. this.form.totalQuantity += Number(item.actualQuantity)
  958. this.form.totalCost += Number(item.deliveryAmount)
  959. // 出库数量和出库金额的比例
  960. this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
  961. delete item.id
  962. delete item.pid
  963. delete item.createTime
  964. delete item.createUser
  965. delete item.status
  966. delete item.updateTime
  967. delete item.updateUser
  968. })
  969. } else if (this.detailData.copyId) {
  970. let id = this.detailData.copyId
  971. this.queryData(id, true)
  972. }
  973. this.oldForm = Object.assign({}, this.form)
  974. },
  975. watch: {
  976. },
  977. methods: {
  978. queryData(id, isCopy = false, type) {
  979. detail(id).then(res => {
  980. this.form = res.data.data;
  981. if (this.form.deliveryStatus == '已发货') {
  982. this.deliverDisabled = true;
  983. this.arrivalDisabled = false;
  984. } else if (this.form.deliveryStatus == '已到货') {
  985. this.arrivalDisabled = true;
  986. this.deliverDisabled = false;
  987. } else {
  988. this.arrivalDisabled = false;
  989. this.deliverDisabled = false;
  990. }
  991. // this.contactsData = this.form.deliveryItemsList
  992. this.contactsData = this.form.deliveryItemsList.filter(item => {
  993. return item.goodType == 0
  994. })
  995. this.giftData = this.form.deliveryItemsList.filter(item => {
  996. return item.goodType == 1
  997. })
  998. this.giftData.forEach(item => {
  999. this.$set(item, 'deliveryAmount', item.amount)
  1000. })
  1001. this.goodsShowData = this.giftData;
  1002. this.goodsActives = 'goods';
  1003. this.handleClick({name: this.goodsActives})
  1004. this.advantageProjectData = this.form.deliveryFeesList
  1005. this.bankOfDepositData = this.form.deliveryFilesList
  1006. this.configuration.dicData = this.form.corpName
  1007. this.form.deliveryAmount = 0
  1008. this.form.totalQuantity = 0
  1009. this.contactsData.forEach(item => {
  1010. this.form.deliveryAmount += Number(item.deliveryAmount)
  1011. this.form.totalQuantity += Number(item.actualQuantity)
  1012. // 出库金额和出库数量的比例
  1013. this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
  1014. })
  1015. if (this.form.companyName) {
  1016. this.companyConfiguration.dicData = this.companyConfiguration.dicData.concat(this.form.companyName)
  1017. }
  1018. if (this.form.storageMap) {
  1019. this.configurationWarehouse.dicData = this.form.storageMap
  1020. }
  1021. let feesData = []
  1022. this.form.deliveryFeesList.forEach(item => {
  1023. let a = {
  1024. cname: item.corpName,
  1025. id: item.corpId
  1026. }
  1027. feesData.push(a)
  1028. })
  1029. this.configuration.dicData = this.configuration.dicData.concat(feesData)
  1030. // 去重
  1031. this.removeRepeat()
  1032. delete this.form.deliveryItemsList
  1033. delete this.form.deliveryFeesList
  1034. delete this.form.deliveryFilesList
  1035. delete this.form.corpName
  1036. delete this.form.companyName
  1037. // 获取最大值
  1038. let num = []
  1039. this.advantageProjectData.forEach(item => {
  1040. num.push(item.sort)
  1041. })
  1042. if (num.length == 0) {
  1043. this.maxFeeNum = 0;
  1044. } else {
  1045. this.maxFeeNum = num.reduce((a, b) => {
  1046. return b > a? b: a;
  1047. })
  1048. }
  1049. let goodsNum = []
  1050. this.contactsData.forEach(item => {
  1051. goodsNum.push(item.sort)
  1052. })
  1053. if (goodsNum.length == 0) {
  1054. this.maxGoodsNum = 0;
  1055. } else {
  1056. this.maxGoodsNum = goodsNum.reduce((a, b) => {
  1057. return b > a? b: a;
  1058. })
  1059. }
  1060. this.oldGoodsList = []
  1061. this.oldFeesList = []
  1062. this.oldUploadList = []
  1063. this.oldForm = Object.assign({}, this.form)
  1064. this.oldGoodsList = this.deepClone(this.goodsShowData)
  1065. this.oldFeesList = this.deepClone(this.advantageProjectData)
  1066. this.oldUploadList = this.deepClone(this.bankOfDepositData)
  1067. if (isCopy) {
  1068. delete this.form.sysNo
  1069. delete this.form.id
  1070. this.contactsData.forEach(item => {
  1071. delete item.id
  1072. delete item.pid
  1073. })
  1074. this.advantageProjectData.forEach(item => {
  1075. delete item.id
  1076. delete item.pid
  1077. })
  1078. this.bankOfDepositData.forEach(item => {
  1079. delete item.id
  1080. delete item.pid
  1081. })
  1082. this.form.deliveryStatus == '录入'
  1083. }
  1084. if (type == '发货') {
  1085. this.$nextTick(() => {
  1086. this.form.deliveryItemsList = this.contactsData.concat(this.giftData)
  1087. this.form.deliveryFeesList = this.advantageProjectData
  1088. this.form.deliveryFilesList = this.bankOfDepositData
  1089. if (typeof this.form.corpsTypeId == 'object') {
  1090. this.form.corpsTypeId = this.form.corpsTypeId.join(",")
  1091. }
  1092. this.pageLoading = true
  1093. sendOutGoods(this.form).then(res => {
  1094. this.$message.success('发货成功')
  1095. this.queryData(res.data.data.id)
  1096. }).finally(() => {
  1097. this.pageLoading = false
  1098. })
  1099. })
  1100. } else if (type == '到货') {
  1101. if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
  1102. this.form.deliveryItemsList = this.goodsShowData.concat(this.contactsData)
  1103. } else {
  1104. this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
  1105. }
  1106. this.pageLoading = true
  1107. confirmArrival(this.form).then(res => {
  1108. this.$message.success('已确认到货')
  1109. this.queryData(this.form.id)
  1110. }).catch(() => {
  1111. this.pageLoading = false
  1112. })
  1113. }
  1114. }).finally(() => {
  1115. this.saveLoading = false
  1116. });
  1117. },
  1118. getcorpId(row) {
  1119. this.contactsData[row.index].corpId = row.id;
  1120. this.contactsData[row.index].corpName = row.cname;
  1121. },
  1122. // 出库数量变化时调用
  1123. actualQuantityChange(row) {
  1124. // if (row.scale) {
  1125. // row.deliveryAmount = Number(row.actualQuantity) * Number(row.scale)
  1126. // }
  1127. if (this.goodsActives == 'goods') {
  1128. row.deliveryAmount = Number(row.actualQuantity) * Number(row.price)
  1129. this.form.deliveryAmount = 0
  1130. this.form.totalQuantity = 0
  1131. this.contactsData.forEach(item => {
  1132. this.form.deliveryAmount += Number(item.deliveryAmount)
  1133. this.form.totalQuantity += Number(item.actualQuantity)
  1134. })
  1135. } else {
  1136. row.integral = Number(row.integralMultiples) * Number(row.actualQuantity)
  1137. this.$set(this.form, 'convertIntegral' , 0)
  1138. this.goodsShowData.forEach(item => {
  1139. this.form.convertIntegral = (Number(this.form.convertIntegral) + Number(item.integral)).toFixed(2)
  1140. })
  1141. }
  1142. },
  1143. // 到货数量变化计算
  1144. arrivalQuantityChange(row) {
  1145. if (this.goodsActives == 'goods') {
  1146. row.integral = Number(row.integralMultiples) * Number(row.arrivalQuantity)
  1147. this.$set(this.form, 'presenterIntegral' , 0)
  1148. this.goodsShowData.forEach(item => {
  1149. this.form.presenterIntegral = (Number(this.form.presenterIntegral) + Number(item.integral)).toFixed(2)
  1150. })
  1151. } else {
  1152. }
  1153. },
  1154. // 类别变换时触发
  1155. warehouseTreeChange(id) {
  1156. this.warehouseName = []
  1157. if (this.firstComing) {
  1158. if (!this.form.storageId) {
  1159. this.$set(this.form, 'storageId', null)
  1160. } else {
  1161. this.form.storageId = null
  1162. }
  1163. }
  1164. let data = {
  1165. storageTypeId: id
  1166. }
  1167. selectWareHouse(data).then(res => {
  1168. this.warehouseName = res.data.data.records
  1169. })
  1170. this.firstComing = true
  1171. },
  1172. //点击行可编辑
  1173. handleRowClick(row, event, column) {
  1174. console.log(row.$index)
  1175. },
  1176. //商品编辑
  1177. rowCell(row, index) {
  1178. console.log(row)
  1179. this.$refs.crudContact.rowCell(row, index)
  1180. },
  1181. //费用编辑
  1182. rowCellTwo(row, index) {
  1183. console.log(row)
  1184. this.$refs.crudProject.rowCell(row, index)
  1185. },
  1186. //费用新增触发
  1187. costIncrease() {
  1188. this.dialogCost = !this.dialogCost
  1189. this.choiceData = false
  1190. },
  1191. //商品新增触发
  1192. commoditySelection() {
  1193. this.dialogVisible = !this.dialogVisible
  1194. this.tableData = []
  1195. this.commodityData = false
  1196. },
  1197. //点击费用明细选择触发
  1198. choice(row) {
  1199. this.dialogCost = !this.dialogCost
  1200. this.choiceData = true
  1201. console.log(row)
  1202. this.choiceIndex = row.$index
  1203. },
  1204. //点击商品明细选择触发
  1205. commodityChoice(row) {
  1206. this.dialogVisible = !this.dialogVisible
  1207. this.commodityData = true
  1208. console.log(row)
  1209. this.choiceIndexT = row.$index
  1210. },
  1211. //导入商品触发
  1212. importChoice() {
  1213. if (this.tableData.length === 1) {
  1214. this.contactsData[this.choiceIndexT].cname = this.tableData[0].cname
  1215. this.contactsData[this.choiceIndexT].code = this.tableData[0].code
  1216. this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
  1217. this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].typeno
  1218. this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
  1219. this.contactsData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
  1220. selectGoodsNum({
  1221. goodsId: this.tableData[0].id,
  1222. itemType: this.tableData[0].typeno
  1223. }).then(res => {
  1224. this.contactsData[this.choiceIndexT].storageQuantity = res.data.data
  1225. })
  1226. }
  1227. this.dialogVisible = !this.dialogVisible
  1228. this.commodityData = false
  1229. },
  1230. //费用编辑导入触发
  1231. choiceCost() {
  1232. console.log('1111')
  1233. if (this.tableDataCost.length === 1) {
  1234. this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
  1235. this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
  1236. this.advantageProjectData[this.choiceIndex].code = this.tableDataCost[0].code
  1237. }
  1238. this.dialogCost = !this.dialogCost
  1239. this.choiceData = false
  1240. },
  1241. //费用导入触发
  1242. importCost() {
  1243. // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
  1244. if (this.tableDataCost.length > 0) {
  1245. for (let item in this.tableDataCost) {
  1246. console.log(this.tableDataCost[item])
  1247. this.tableDataCost[item].itemId = this.tableDataCost[item].id
  1248. this.tableDataCost[item].feeName = this.tableDataCost[item].cname
  1249. this.tableDataCost[item].sort = this.maxFeeNum + 1
  1250. this.maxFeeNum++
  1251. delete this.tableDataCost[item].id
  1252. this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
  1253. this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length - 1)
  1254. }
  1255. }
  1256. this.tableDataCost = []
  1257. this.dialogCost = false
  1258. },
  1259. //确认导入触发
  1260. importGoods() {
  1261. // this.contactsData = this.contactsData.concat(this.tableData)
  1262. if (this.tableData.length > 0) {
  1263. for (let item in this.tableData) {
  1264. console.log(this.tableData[item])
  1265. selectGoodsNum({
  1266. goodsId: this.tableData[item].id,
  1267. itemType: this.tableData[item].typeno
  1268. }).then(res =>{
  1269. this.tableData[item].storageQuantity = res.data.data
  1270. this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].typeno)
  1271. this.tableData[item].itemId = this.tableData[item].id
  1272. this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
  1273. delete this.tableData[item].goodsTypeName
  1274. delete this.tableData[item].id
  1275. delete this.tableData[item].status
  1276. delete this.tableData[item].isDeleted
  1277. this.$set(this.tableData[item], 'inventoryNumber', 0)
  1278. this.$set(this.tableData[item], 'actualQuantity', 0)
  1279. this.$set(this.tableData[item], 'inventoryAmount', 0)
  1280. this.$set(this.tableData[item], 'deliveryAmount', 0)
  1281. this.tableData[item].price = 0
  1282. this.tableData[item].amount = 0
  1283. if (this.goodsActives == "goods") {
  1284. this.$set(this.tableData[item], 'goodType', 0)
  1285. } else {
  1286. this.$set(this.tableData[item], 'goodType', 1)
  1287. }
  1288. this.tableData[item].sort = this.maxGoodsNum + 1
  1289. this.maxGoodsNum++
  1290. this.$refs.crudContact.rowCellAdd(this.tableData[item]);
  1291. this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
  1292. })
  1293. }
  1294. }
  1295. this.dialogVisible = false
  1296. },
  1297. closeGoods() {
  1298. this.treeDataGoods = [];
  1299. this.treeDeptId = "";
  1300. },
  1301. closeFees() {
  1302. this.treeDeptIdCost = "";
  1303. this.treeData = [];
  1304. },
  1305. //选中触发
  1306. selectionChange(list) {
  1307. console.log(list);
  1308. this.tableData = list
  1309. },
  1310. //费用选中触发
  1311. selectionChangeCost(list) {
  1312. console.log(list);
  1313. this.tableDataCost = list
  1314. },
  1315. //导入页左商品类型查询
  1316. nodeClick(data) {
  1317. this.treeDeptId = data.id;
  1318. this.page.currentPage = 1;
  1319. this.onLoad(this.page);
  1320. },
  1321. //导入页左费用类型查询
  1322. nodeClickCost(data) {
  1323. this.treeDeptIdCost = data.id;
  1324. this.pageCost.currentPage = 1;
  1325. this.onLoadCost(this.pageCost);
  1326. },
  1327. //刷新触发
  1328. refreshChange() {
  1329. this.treeDeptId = '';
  1330. this.page.currentPage = 1;
  1331. this.onLoad(this.page);
  1332. },
  1333. //费用刷新触发
  1334. refreshChangeCost() {
  1335. this.treeDeptIdCost = '';
  1336. this.pageCost.currentPage = 1;
  1337. this.onLoadCost(this.pageCost);
  1338. },
  1339. //新增商品信息保存触发
  1340. rowSave(row, done, loading) {
  1341. console.log(row)
  1342. console.log(this.contactsData)
  1343. // this.contactsData.push(row)
  1344. done()
  1345. },
  1346. //修改商品信息触发
  1347. rowUpdate(row, index, done, loading) {
  1348. done(row);
  1349. },
  1350. //删除商品信息触发
  1351. rowDel(row, index, donerowDel) {
  1352. this.$confirm("确定将选择数据删除?", {
  1353. confirmButtonText: "确定",
  1354. cancelButtonText: "取消",
  1355. type: "warning"
  1356. }).then(() => {
  1357. //商品判断是否需要调用删除接口
  1358. if (row.id) {
  1359. corpsattn(row.id).then(res => {
  1360. this.$message({
  1361. type: "success",
  1362. message: "操作成功!"
  1363. });
  1364. this.goodsShowData.splice(index, 1);
  1365. })
  1366. } else {
  1367. this.$message({
  1368. type: "success",
  1369. message: "操作成功!"
  1370. });
  1371. this.goodsShowData.splice(index, 1);
  1372. }
  1373. })
  1374. },
  1375. //新增费用明细保存触发
  1376. rowSaveProject(row, done, loading) {
  1377. // this.advantageProjectData.push(row)
  1378. done()
  1379. },
  1380. //修改费用明细触发
  1381. rowUpdateProject(row, index, done, loading) {
  1382. done(row);
  1383. },
  1384. goodsSearch(params, done) {
  1385. this.treeDeptId = '';
  1386. this.onLoad(this.page, params);
  1387. done()
  1388. },
  1389. //商品列表查询
  1390. onLoad(page, params = {}) {
  1391. this.loading = true;
  1392. getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
  1393. console.log(res)
  1394. const data = res.data.data;
  1395. this.page.total = data.total;
  1396. this.data = data.records;
  1397. this.loading = false;
  1398. });
  1399. },
  1400. // 费用查询按钮
  1401. feesSearch(params, done) {
  1402. this.treeDeptIdCost = '';
  1403. this.onLoadCost(this.pageCost, params)
  1404. done()
  1405. },
  1406. //费用查询
  1407. onLoadCost(page, params = {}) {
  1408. this.loadingCost = true;
  1409. let queryParams = Object.assign({}, params, {
  1410. pageSize: page.pageSize,
  1411. pageNum: page.currentPage,
  1412. parentId: 0,
  1413. feesTypeId: this.treeDeptIdCost
  1414. })
  1415. customerList(queryParams).then(res => {
  1416. console.log(res)
  1417. const data = res.data.data;
  1418. this.pageCost.total = data.total;
  1419. this.dataCost = data.records;
  1420. this.loadingCost = false;
  1421. });
  1422. },
  1423. //删除费用明细触发
  1424. rowDelProject(row, index, donerowDel) {
  1425. this.$confirm("确定将选择数据删除?", {
  1426. confirmButtonText: "确定",
  1427. cancelButtonText: "取消",
  1428. type: "warning"
  1429. }).then(() => {
  1430. //费用判断是否需要调用删除接口
  1431. if (row.id) {
  1432. corpsitem(row.id).then(res => {
  1433. this.$message({
  1434. type: "success",
  1435. message: "操作成功!"
  1436. });
  1437. this.advantageProjectData.splice(index, 1);
  1438. })
  1439. } else {
  1440. this.$message({
  1441. type: "success",
  1442. message: "操作成功!"
  1443. });
  1444. this.advantageProjectData.splice(index, 1);
  1445. }
  1446. })
  1447. },
  1448. //新增附件上传保存触发
  1449. rowSaveBankOfDeposit(row, done, loading) {
  1450. this.bankOfDepositData.push(row)
  1451. done()
  1452. },
  1453. //修改附件上传触发
  1454. rowUpdateBankOfDeposit(row, index, done, loading) {
  1455. done(row);
  1456. },
  1457. //删除附件上传触发
  1458. rowDelBankOfDeposit(row, index, donerowDel) {
  1459. this.$confirm("确定将选择数据删除?", {
  1460. confirmButtonText: "确定",
  1461. cancelButtonText: "取消",
  1462. type: "warning"
  1463. }).then(() => {
  1464. //附件判断是否需要调用删除接口
  1465. if (row.id) {
  1466. corpsbank(row.id).then(res => {
  1467. this.$message({
  1468. type: "success",
  1469. message: "操作成功!"
  1470. });
  1471. this.bankOfDepositData.splice(index, 1);
  1472. })
  1473. } else {
  1474. this.$message({
  1475. type: "success",
  1476. message: "操作成功!"
  1477. });
  1478. this.bankOfDepositData.splice(index, 1);
  1479. }
  1480. })
  1481. },
  1482. uploadAfter(res, done) {
  1483. if (res.originalName) {
  1484. this.bankOfDepositForm.fileName = this.bankOfDepositForm.fileName
  1485. ? this.bankOfDepositForm.fileName
  1486. : res.originalName;
  1487. }
  1488. done();
  1489. },
  1490. // 去重
  1491. removeRepeat() {
  1492. let obj = []
  1493. this.configuration.dicData = this.configuration.dicData.reduce((current,next) => {
  1494. obj[next.id] ? '': obj[next.id] = true && current.push(next)
  1495. return current
  1496. }, [])
  1497. },
  1498. //
  1499. receiveList(data){
  1500. this.configuration.dicData = this.configuration.dicData.concat(data)
  1501. this.removeRepeat()
  1502. },
  1503. //修改提交触发
  1504. editCustomer(isBack = false, type) {
  1505. this.$refs["form"].validate((valid) => {
  1506. if (valid) {
  1507. //商品信息
  1508. this.contactsData.forEach(item => {
  1509. this.$set(item, 'contractAmount', item.deliveryAmount)
  1510. })
  1511. if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
  1512. this.form.deliveryItemsList = this.goodsShowData.concat(this.contactsData)
  1513. } else {
  1514. this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
  1515. }
  1516. this.form.deliveryItemsList.forEach(item => {
  1517. this.$set(item, 'contractNumber', item.orderNo)
  1518. this.$set(item, 'srcOrderNo', item.orderNo)
  1519. this.$set(item, 'contractAmount', item.deliveryAmount)
  1520. })
  1521. this.form.deliveryItemsList = this.contactsData.concat(this.giftData)
  1522. this.form.deliveryFeesList = this.advantageProjectData
  1523. this.form.deliveryFilesList = this.bankOfDepositData
  1524. if (typeof this.form.corpsTypeId == 'object') {
  1525. this.form.corpsTypeId = this.form.corpsTypeId.join(",")
  1526. }
  1527. this.saveLoading = true
  1528. this.form.billType = 'FH'
  1529. typeSave(this.form).then(res => {
  1530. this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
  1531. // this.disabled = false
  1532. if (isBack) {
  1533. //成功关闭此页面回到列表页
  1534. this.$emit("goBack");
  1535. } else {
  1536. this.queryData(res.data.data.id, false, type)
  1537. }
  1538. }).catch(() => {
  1539. this.saveLoading = false
  1540. })
  1541. } else {
  1542. return false;
  1543. }
  1544. });
  1545. },
  1546. //复制新单
  1547. copyOrder() {
  1548. this.queryData(this.form.id, true)
  1549. },
  1550. //返回列表
  1551. backToList() {
  1552. if (contrastObj(this.form, this.oldForm) ||
  1553. contrastList(this.goodsShowData, this.oldGoodsList) ||
  1554. contrastList(this.advantageProjectData, this.oldFeesList) ||
  1555. contrastList(this.bankOfDepositData, this.oldUploadList)
  1556. ) {
  1557. this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
  1558. confirmButtonText: "确定",
  1559. cancelButtonText: "取消",
  1560. type: "warning"
  1561. }).then(() => {
  1562. this.editCustomer(true)
  1563. }).catch(() => {
  1564. this.$emit("goBack");
  1565. })
  1566. } else {
  1567. this.$emit("goBack");
  1568. }
  1569. },
  1570. // 确认发货
  1571. sendOutGoods() {
  1572. this.$refs["form"].validate((valid) => {
  1573. if (valid) {
  1574. if (this.contactsData.length == 0) {
  1575. return this.$message.error('商品信息为空')
  1576. }
  1577. if (contrastObj(this.form, this.oldForm) ||
  1578. contrastList(this.goodsShowData, this.oldGoodsList) ||
  1579. contrastList(this.advantageProjectData, this.oldFeesList) ||
  1580. contrastList(this.bankOfDepositData, this.oldUploadList)
  1581. ) {
  1582. this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
  1583. confirmButtonText: "确定",
  1584. cancelButtonText: "取消",
  1585. type: "warning"
  1586. }).then(async () => {
  1587. await this.editCustomer(false, '发货')
  1588. }).catch(() => {
  1589. this.$message.info('已取消')
  1590. })
  1591. } else {
  1592. //商品信息
  1593. if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
  1594. this.form.deliveryItemsList = this.goodsShowData.concat(this.contactsData)
  1595. } else {
  1596. this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
  1597. }
  1598. this.form.deliveryFeesList = this.advantageProjectData
  1599. this.form.deliveryFilesList = this.bankOfDepositData
  1600. if (typeof this.form.corpsTypeId == 'object') {
  1601. this.form.corpsTypeId = this.form.corpsTypeId.join(",")
  1602. }
  1603. this.pageLoading = true
  1604. sendOutGoods(this.form).then(res => {
  1605. this.$message.success('发货成功')
  1606. this.queryData(res.data.data.id)
  1607. }).finally(() => {
  1608. this.pageLoading = false
  1609. })
  1610. }
  1611. } else {
  1612. return false;
  1613. }
  1614. });
  1615. },
  1616. // 撤销发货
  1617. revokeOutGoods() {
  1618. this.$refs["form"].validate((valid) => {
  1619. if (valid) {
  1620. //商品信息
  1621. this.form.deliveryItemsList = this.contactsData
  1622. this.form.deliveryFeesList = this.advantageProjectData
  1623. this.form.deliveryFilesList = this.bankOfDepositData
  1624. if (typeof this.form.corpsTypeId == 'object') {
  1625. this.form.corpsTypeId = this.form.corpsTypeId.join(",")
  1626. }
  1627. this.pageLoading = true
  1628. revokeOutGoods(this.form).then(res => {
  1629. this.$message.success('撤销成功')
  1630. this.queryData(res.data.data.id)
  1631. }).finally(() => {
  1632. this.pageLoading = false
  1633. })
  1634. } else {
  1635. return false;
  1636. }
  1637. });
  1638. },
  1639. // 确认到货
  1640. confirmArrival() {
  1641. if (contrastObj(this.form, this.oldForm) ||
  1642. contrastList(this.goodsShowData, this.oldGoodsList) ||
  1643. contrastList(this.advantageProjectData, this.oldFeesList) ||
  1644. contrastList(this.bankOfDepositData, this.oldUploadList)
  1645. ) {
  1646. this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
  1647. confirmButtonText: "确定",
  1648. cancelButtonText: "取消",
  1649. type: "warning"
  1650. }).then(() => {
  1651. this.editCustomer(false, '到货')
  1652. }).catch(() => {
  1653. this.$message.info('已取消')
  1654. })
  1655. } else {
  1656. if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
  1657. this.form.deliveryItemsList = this.goodsShowData.concat(this.contactsData)
  1658. } else {
  1659. this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
  1660. }
  1661. this.pageLoading = true
  1662. confirmArrival(this.form).then(res => {
  1663. this.$message.success('已确认到货')
  1664. this.queryData(this.form.id)
  1665. }).catch(() => {
  1666. this.pageLoading = false
  1667. })
  1668. }
  1669. },
  1670. // 撤销到货
  1671. cancelArrival() {
  1672. if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
  1673. this.form.deliveryItemsList = this.goodsShowData.concat(this.contactsData)
  1674. } else {
  1675. this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
  1676. }
  1677. this.pageLoading = true
  1678. cancelArrival(this.form).then(res => {
  1679. this.$message.success('撤销到货成功')
  1680. this.queryData(this.form.id)
  1681. }).catch(() => {
  1682. this.pageLoading = false
  1683. })
  1684. },
  1685. // 导入销售明细
  1686. importMarket(list) {
  1687. list.forEach(item => {
  1688. item.cname = item.cname
  1689. this.$set(item, 'specificationAndModel', item.itemType)
  1690. if (this.goodsActives == 'goods') {
  1691. this.$set(item, 'deliveryAmount', item.amount)
  1692. } else {
  1693. this.$set(item, 'deliveryAmount', 0)
  1694. }
  1695. this.$set(item, 'actualQuantity', item.orderQuantity)
  1696. this.$set(item, 'inventoryNumber', item.storageQuantity)
  1697. this.$set(item, 'integral', 0)
  1698. this.$set(item, 'arrivalQuantity', 0)
  1699. this.$set(item, 'orgOrderNo', this.form.orgOrderNo)
  1700. this.$set(item, 'srcOrderNo', this.form.srcOrderNo)
  1701. this.$set(item, "srcId", item.id)
  1702. if (this.goodsActives == "goods") {
  1703. this.$set(item, 'goodType', 0)
  1704. } else {
  1705. this.$set(item, 'goodType', 1)
  1706. }
  1707. delete item.id
  1708. delete item.createTime
  1709. delete item.createUser
  1710. delete item.pid
  1711. this.$refs.crudContact.rowCellAdd(item);
  1712. })
  1713. this.marketDialog = false;
  1714. },
  1715. // 关闭销售弹窗
  1716. closeMarkeDialog() {
  1717. this.marketDialog = false;
  1718. },
  1719. // 保存列设置
  1720. async saveColumn(name) {
  1721. /**
  1722. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1723. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1724. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1725. */
  1726. if (name == 'goods') {
  1727. const inSave = await this.saveColumnData(
  1728. this.getColumnName(21),
  1729. this.customerContact
  1730. );
  1731. if (inSave) {
  1732. this.$message.success("保存成功");
  1733. //关闭窗口
  1734. this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
  1735. }
  1736. } else if (name === 'fees') {
  1737. const inSave = await this.saveColumnData(
  1738. this.getColumnName(22),
  1739. this.advantageProject
  1740. );
  1741. if (inSave) {
  1742. this.$message.success("保存成功");
  1743. //关闭窗口
  1744. this.$refs.crudProject.$refs.dialogColumn.columnBox = false;
  1745. }
  1746. }
  1747. },
  1748. // 商品表格加色
  1749. goodsRowClassName({row, column, rowIndex, columnIndex}) {
  1750. if (Number(row.actualQuantity) > Number(row.inventoryNumber) && column.property == 'inventoryNumber') {
  1751. return "color: #fff;background:#a4cf57"
  1752. }
  1753. return '';
  1754. },
  1755. // 库存刷新
  1756. resetStock() {
  1757. this.contactsData.forEach(item => {
  1758. selectGoodsNum({
  1759. goodsId: item.itemId,
  1760. itemType: item.itemType
  1761. }).then(res => {
  1762. item.inventoryNumber = res.data.data
  1763. }).finally(() => {
  1764. this.$message.success('刷新成功')
  1765. })
  1766. })
  1767. },
  1768. // 商品信息标签页切换
  1769. handleClick(data) {
  1770. this.goodsDisabled = true
  1771. if (data.name == 'goods') {
  1772. this.giftData = this.goodsShowData
  1773. // 显示
  1774. this.customerContact.column.forEach(item => {
  1775. if (item.prop == 'integralMultiples') item.label = '积分倍数'
  1776. if (item.prop == 'integral') item.label = '赠送积分'
  1777. if (item.prop == 'actualQuantity') item.label = '出库数量'
  1778. if (item.prop == 'priceType' || item.prop == 'code' || item.prop == 'typeno' || item.prop == 'corpId'
  1779. || item.prop == 'packageRemarks' || item.prop == 'invoiceWeight'
  1780. || item.prop == 'inventoryNumber' || item.prop == 'inventoryAmount'
  1781. || item.prop == 'arrivalQuantity'
  1782. ) {
  1783. item.hide = false;
  1784. item.showColumn = true;
  1785. }
  1786. })
  1787. this.goodsShowData = this.contactsData;
  1788. setTimeout(() => {
  1789. this.goodsDisabled = false
  1790. },500)
  1791. } else {
  1792. // 隐藏字段
  1793. this.contactsData = this.goodsShowData
  1794. this.customerContact.column.forEach(item => {
  1795. if (item.prop == 'integralMultiples') item.label = '积分单价'
  1796. if (item.prop == 'integral') item.label = '兑换积分'
  1797. if (item.prop == 'actualQuantity') item.label = '数量'
  1798. if (item.prop == 'priceType' || item.prop == 'code' || item.prop == 'typeno' || item.prop == 'corpId'
  1799. || item.prop == 'packageRemarks' || item.prop == 'invoiceWeight' || item.prop == 'inventoryNumber'
  1800. || item.prop == 'inventoryAmount' || item.prop == 'arrivalQuantity'
  1801. ) {
  1802. item.hide = true;
  1803. item.showColumn = false;
  1804. }
  1805. })
  1806. this.goodsShowData = this.giftData;
  1807. setTimeout(() => {
  1808. this.goodsDisabled = false
  1809. },500)
  1810. }
  1811. },
  1812. }
  1813. }
  1814. </script>
  1815. <style lang="scss" scoped>
  1816. //.customer-head {
  1817. // position: fixed;
  1818. // top: 105px;
  1819. // width: 100%;
  1820. // margin-left: -10px;
  1821. // height: 62px;
  1822. // background: #ffffff;
  1823. // box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
  1824. // z-index: 999;
  1825. //}
  1826. //
  1827. //.customer-back {
  1828. // cursor: pointer;
  1829. // line-height: 62px;
  1830. // font-size: 16px;
  1831. // color: #323233;
  1832. // font-weight: 400;
  1833. //}
  1834. .back-icon {
  1835. line-height: 64px;
  1836. font-size: 20px;
  1837. margin-right: 8px;
  1838. }
  1839. //.add-customer-btn {
  1840. // position: fixed;
  1841. // right: 36px;
  1842. // top: 115px;
  1843. //}
  1844. ::v-deep .el-form-item {
  1845. margin-bottom: 0;
  1846. }
  1847. .el-dialogDeep {
  1848. ::v-deep .el-dialog {
  1849. margin: 1vh auto 0 !important;
  1850. padding-bottom: 10px !important;
  1851. .el-dialog__body, .el-dialog__footer {
  1852. padding-bottom: 0 !important;
  1853. padding-top: 0 !important;
  1854. }
  1855. }
  1856. }
  1857. .print-div {
  1858. color: #000;
  1859. }
  1860. .print_table {
  1861. table {
  1862. border-right: 1px solid #000;
  1863. border-bottom: 1px solid #000;
  1864. font-size: 12px;
  1865. margin-bottom: 5px;
  1866. }
  1867. table td {
  1868. border-left: 1px solid #000;
  1869. border-top: 1px solid #000;
  1870. vertical-align: middle;
  1871. padding: 2px;
  1872. text-align: center;
  1873. }
  1874. }
  1875. .table {
  1876. border-collapse: collapse;
  1877. border-spacing: 0;
  1878. background-color: transparent;
  1879. display: table;
  1880. width: 99%;
  1881. max-width: 100%;
  1882. margin: 0 auto;
  1883. }
  1884. .table td {
  1885. text-align: left;
  1886. vertical-align: middle;
  1887. font-size: 14px;
  1888. color: #000000;
  1889. padding: 10.5px 0 10.5px 30px;
  1890. //border: 1px solid #000;
  1891. }
  1892. ::v-deep .el-form-item {
  1893. margin-bottom: 0;
  1894. }
  1895. ::v-deep .el-form-item__content{
  1896. line-height: 32px;
  1897. }
  1898. </style>