detailsPageEdit.vue 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533
  1. <template>
  2. <div class="borderless">
  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. <el-button
  11. class="el-button--small-yh add-customer-btn"
  12. type="success" style="right: 140px;" @click="copyOrder">
  13. 复制新单
  14. </el-button>
  15. <el-button
  16. class="el-button--small-yh add-customer-btn"
  17. type="primary"
  18. @click="editCustomer"
  19. >{{ form.id ? '确认修改' : '确认新增' }}
  20. </el-button>
  21. </div>
  22. <div style="margin-top: 60px">
  23. <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
  24. <containerTitle title="基础资料"></containerTitle>
  25. <basic-container style="margin-bottom: 10px">
  26. <el-row>
  27. <el-col v-for="(item,index) in basicData.column" :key="index" :span="item.span?item.span:8">
  28. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  29. <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
  30. size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
  31. <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"
  32. :configuration="configuration"/>
  33. <el-select v-else-if="item.prop === 'paymentType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%">
  34. <el-option v-for="(item,index) in paymentOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
  35. </el-select>
  36. <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
  37. </el-form-item>
  38. </el-col>
  39. </el-row>
  40. </basic-container>
  41. <containerTitle title="发货信息"></containerTitle>
  42. <basic-container style="margin-bottom: 10px">
  43. <el-row>
  44. <el-col v-for="(item,index) in contactInformation.column" :key="index" :span="item.span?item.span:8">
  45. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  46. <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
  47. <selectComponent v-else-if="item.prop === 'belongToCorpId'" v-model="form[item.prop]" :configuration="configuration"/>
  48. <el-input v-else-if="(item.prop === 'advancePayment') || (item.prop === 'settlmentAmount')" v-model="form[item.prop]" size="small" autocomplete="off" @change="computedCost"></el-input>
  49. <el-input v-else type="age" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
  50. </el-form-item>
  51. </el-col>
  52. </el-row>
  53. </basic-container>
  54. <containerTitle title="商品信息"></containerTitle>
  55. <basic-container style="margin-bottom: 10px">
  56. <avue-crud
  57. :option="customerContact"
  58. v-model="contactsForm"
  59. :data="contactsData"
  60. ref="crudContact"
  61. @row-save="rowSave"
  62. @row-click="handleRowClick"
  63. @row-update="rowUpdate"
  64. @selection-change="productSelection"
  65. @row-del="rowDel"
  66. >
  67. <template slot="code" slot-scope="{row,index}">
  68. <span style="float: left;padding-top: 2px">{{ row.code }}</span>
  69. <el-button type="text" size="mini" style="float: right" @click="commodityChoice(row)">选择</el-button>
  70. </template>
  71. <template slot="orderQuantity" slot-scope="{ row }">
  72. <el-input
  73. v-if="row.$cellEdit"
  74. v-model="row.orderQuantity"
  75. size="small"
  76. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  77. @change="quantityChange(row)"
  78. ></el-input>
  79. <span v-else>{{ row.orderQuantity }}</span>
  80. </template>
  81. <template slot="price" slot-scope="{ row }">
  82. <el-input
  83. v-if="row.$cellEdit"
  84. v-model="row.price"
  85. size="small"
  86. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  87. @change="priceChange(row)"
  88. ></el-input>
  89. <span v-else>{{ row.price }}</span>
  90. </template>
  91. <template slot-scope="{row,index}" slot="menu">
  92. <el-button
  93. type="text"
  94. size="small"
  95. @click="rowCell(row,index)"
  96. >{{ row.$cellEdit ? '保存' : '修改' }}
  97. </el-button>
  98. </template>
  99. <template slot="menuLeft" slot-scope="{size}">
  100. <el-button type="primary"
  101. icon="el-icon-plus"
  102. size="small"
  103. @click="commoditySelection">录入明细
  104. </el-button>
  105. <el-button type="primary"
  106. icon="el-icon-plus"
  107. size="small"
  108. @click="policy">政策
  109. </el-button>
  110. <el-button type="warning"
  111. icon="el-icon-plus"
  112. size="small"
  113. :disabled="selection.length < 1"
  114. @click="generateShipmentD">生成发货单
  115. </el-button>
  116. </template>
  117. </avue-crud>
  118. </basic-container>
  119. <containerTitle title="费用明细"></containerTitle>
  120. <basic-container style="margin-bottom: 10px">
  121. <avue-crud
  122. :option="advantageProject"
  123. v-model="advantageProjectForm"
  124. :data="advantageProjectData"
  125. ref="crudProject"
  126. @row-save="rowSaveProject"
  127. @row-update="rowUpdateProject"
  128. @row-del="rowDelProject"
  129. >
  130. <template slot="code" slot-scope="{row,index}">
  131. <span style="float: left;padding-top: 2px">{{ row.code }}</span>
  132. <el-button type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
  133. </template>
  134. <template slot-scope="{row,index}" slot="menu">
  135. <el-button
  136. type="text"
  137. size="small"
  138. @click="rowCellTwo(row,index)"
  139. >{{ row.$cellEdit ? '保存' : '修改' }}
  140. </el-button>
  141. </template>
  142. <template slot="menuLeft" slot-scope="{size}">
  143. <el-button type="primary"
  144. icon="el-icon-plus"
  145. size="small"
  146. @click="costIncrease"
  147. >录入明细
  148. </el-button>
  149. </template>
  150. </avue-crud>
  151. </basic-container>
  152. <containerTitle title="附件上传"></containerTitle>
  153. <basic-container style="margin-bottom: 40px">
  154. <avue-crud
  155. :option="bankOfDeposit"
  156. v-model="bankOfDepositForm"
  157. :data="bankOfDepositData"
  158. @row-save="rowSaveBankOfDeposit"
  159. @row-update="rowUpdateBankOfDeposit"
  160. @row-del="rowDelBankOfDeposit"
  161. ></avue-crud>
  162. </basic-container>
  163. </el-form>
  164. </div>
  165. <el-dialog
  166. title="导入商品"
  167. append-to-body
  168. class="el-dialogDeep"
  169. :visible.sync="dialogVisible"
  170. width="80%"
  171. :close-on-click-modal="false"
  172. :destroy-on-close="true"
  173. :close-on-press-escape="false"
  174. @close="closeGoods">
  175. <el-row style="height: 0;">
  176. <el-col :span="5">
  177. <div>
  178. <el-scrollbar>
  179. <basic-container>
  180. <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
  181. </basic-container>
  182. </el-scrollbar>
  183. </div>
  184. </el-col>
  185. <el-col :span="19">
  186. <basic-container>
  187. <avue-crud :option="optionTwo"
  188. :table-loading="loading"
  189. :data="data"
  190. ref="crud"
  191. @refresh-change="refreshChange"
  192. @selection-change="selectionChange"
  193. :page.sync="page"
  194. @on-load="onLoad"></avue-crud>
  195. </basic-container>
  196. </el-col>
  197. </el-row>
  198. <span slot="footer" class="dialog-footer">
  199. <el-button @click="dialogVisible = false">取 消</el-button>
  200. <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
  201. <el-button type="primary" @click="importChoice" v-if="commodityData === true"
  202. :disabled="tableData.length !== 1">导入</el-button>
  203. </span>
  204. </el-dialog>
  205. <el-dialog
  206. title="导入"
  207. append-to-body
  208. class="el-dialogDeep"
  209. :visible.sync="policyDialog"
  210. width="80%"
  211. :close-on-click-modal="false"
  212. :destroy-on-close="true"
  213. :close-on-press-escape="false"
  214. @close="closePolicy">
  215. <el-row style="height: 0;">
  216. <el-col :span="5">
  217. <div>
  218. <el-scrollbar>
  219. <basic-container>
  220. <avue-tree :option="policyOption" :data="treeDataPolicy" @node-click="policyNodeClick"/>
  221. </basic-container>
  222. </el-scrollbar>
  223. </div>
  224. </el-col>
  225. <el-col :span="19">
  226. <containerTitle title="特价促销"></containerTitle>
  227. <basic-container style="margin-bottom: 10px">
  228. <avue-crud :option="optionPolicy"
  229. :table-loading="loadingPolicy"
  230. :data="dataPolicy"
  231. ref="crud"
  232. @selection-change="selectionChangePolicy"
  233. :page.sync="pagePolicy">
  234. </avue-crud>
  235. </basic-container>
  236. <containerTitle title="买赠促销"></containerTitle>
  237. <basic-container>
  238. <avue-crud
  239. :option="customerBuyFree"
  240. :data="contactsDataBuyFree"
  241. @selection-change="selectionChangePolicyTwo"
  242. ref="crudContactE">
  243. </avue-crud>
  244. </basic-container>
  245. </el-col>
  246. </el-row>
  247. <span slot="footer" class="dialog-footer">
  248. <el-button @click="policyDialog = false">取 消</el-button>
  249. <el-button type="primary" @click="importPolicy">导入</el-button>
  250. </span>
  251. </el-dialog>
  252. <el-dialog
  253. title="导入费用"
  254. append-to-body
  255. class="el-dialogDeep"
  256. :visible.sync="dialogCost"
  257. width="80%"
  258. top="8vh"
  259. :close-on-click-modal="false"
  260. :destroy-on-close="true"
  261. :close-on-press-escape="false"
  262. @close="closeFees">
  263. <el-row style="height: 0;">
  264. <el-col :span="5">
  265. <div>
  266. <el-scrollbar>
  267. <basic-container>
  268. <avue-tree :option="treeOptionCost" :data="treeData" @node-click="nodeClickCost"/>
  269. </basic-container>
  270. </el-scrollbar>
  271. </div>
  272. </el-col>
  273. <el-col :span="19">
  274. <basic-container>
  275. <avue-crud :option="optionTwoCost"
  276. :table-loading="loadingCost"
  277. :data="dataCost"
  278. ref="crud"
  279. @refresh-change="refreshChangeCost"
  280. @selection-change="selectionChangeCost"
  281. :page.sync="pageCost"
  282. @on-load="onLoadCost">
  283. </avue-crud>
  284. </basic-container>
  285. </el-col>
  286. </el-row>
  287. <span slot="footer" class="dialog-footer">
  288. <el-button @click="dialogCost = false">取 消</el-button>
  289. <el-button type="primary" @click="importCost" v-if="choiceData !== true">导入</el-button>
  290. <el-button type="primary" @click="choiceCost" v-if="choiceData === true"
  291. :disabled="tableDataCost.length !== 1">导入</el-button>
  292. </span>
  293. </el-dialog>
  294. <!-- 打印-->
  295. <el-dialog
  296. title="打印单"
  297. append-to-body
  298. class="el-dialogDeep"
  299. :visible.sync="printVisible"
  300. width="100%"
  301. fullscreen
  302. :close-on-click-modal="false"
  303. :close-on-press-escape="false">
  304. <div class="print-div">
  305. <div
  306. style="
  307. display: flex;
  308. flex-direction: column;
  309. justify-content: center;
  310. align-item: center;
  311. font-size: 24px;
  312. margin-bottom: 5px;
  313. width: 100%;
  314. text-align: center;
  315. "
  316. >
  317. <div><b>VITAL INDUSTRIAL GROUP LIMITED</b></div>
  318. <div>NO.37 DONGHAI ROAD, QINGDAO, CHINA</div>
  319. <div>TEL:0086-532-86019080 FAX:0086-532-86019080</div>
  320. <div>
  321. <b>COMMERCIAL INVOICE</b>
  322. <span style="float: right">ORIGINAL</span>
  323. </div>
  324. </div>
  325. <div class="print_table" style="display: flex">
  326. <table
  327. border="0"
  328. cellspacing="0"
  329. cellpadding="0"
  330. style="width: 100%; line-height: 30px"
  331. >
  332. <tr>
  333. <td colspan="5" rowspan="3">MESSERS:</td>
  334. <td colspan="2">INVOICE NO.</td>
  335. <td colspan="3"></td>
  336. </tr>
  337. <tr>
  338. <td colspan="2">DATE</td>
  339. <td colspan="3"></td>
  340. </tr>
  341. <tr>
  342. <td colspan="2">INCOTERM .</td>
  343. <td colspan="3"></td>
  344. </tr>
  345. <tr>
  346. <td colspan="5">PI NO.:</td>
  347. <td colspan="2">DELIVERY PORT</td>
  348. <td colspan="3"></td>
  349. </tr>
  350. <tr>
  351. <td rowspan="2">NO.</td>
  352. <td rowspan="2">DESCRIPTION</td>
  353. <td>THICK</td>
  354. <td>LENGTH</td>
  355. <td>WIDTH</td>
  356. <td rowspan="2">SHEETS</td>
  357. <td rowspan="2">CRATES</td>
  358. <td>UNIT PRICE</td>
  359. <td>TOTAL</td>
  360. <td>T. AMOUNT</td>
  361. </tr>
  362. <tr>
  363. <td>mm</td>
  364. <td>mm</td>
  365. <td>mm</td>
  366. <td>US$/M²</td>
  367. <td>M²</td>
  368. <td>US$</td>
  369. </tr>
  370. <tr>
  371. <td>1</td>
  372. <td></td>
  373. <td></td>
  374. <td></td>
  375. <td></td>
  376. <td></td>
  377. <td></td>
  378. <td></td>
  379. <td></td>
  380. <td></td>
  381. </tr>
  382. <tr>
  383. <td>2</td>
  384. <td></td>
  385. <td></td>
  386. <td></td>
  387. <td></td>
  388. <td></td>
  389. <td></td>
  390. <td></td>
  391. <td></td>
  392. <td></td>
  393. </tr>
  394. <tr>
  395. <td>3</td>
  396. <td></td>
  397. <td></td>
  398. <td></td>
  399. <td></td>
  400. <td></td>
  401. <td></td>
  402. <td></td>
  403. <td></td>
  404. <td></td>
  405. </tr>
  406. <tr>
  407. <td colspan="9" style="text-align: right">FUMIGATION COST:</td>
  408. <td></td>
  409. </tr>
  410. <tr>
  411. <td colspan="9" style="text-align: right">INSURANCE:</td>
  412. <td></td>
  413. </tr>
  414. <tr>
  415. <td colspan="9" style="text-align: right">TOTAL:</td>
  416. <td>0.00</td>
  417. </tr>
  418. </table>
  419. </div>
  420. <div class="print-footer" style="margin-top: 8px">
  421. <div style="font-weight: bold">TOTAL AMOUNT: U.S. DOLLARS NINE THOUSAND FORTY SIX CENTS TWENTY FIVE ONLY.
  422. </div>
  423. </div>
  424. </div>
  425. </el-dialog>
  426. </div>
  427. </template>
  428. <script>
  429. import {
  430. typeSave, detail, deleteDetails,
  431. corpstypeTree,
  432. corpsattn,
  433. corpsbank,
  434. corpsfiles,
  435. corpsitem,
  436. getList,
  437. detailList,
  438. generateShipment
  439. } from "@/api/basicData/configuration"
  440. import customerContact from "./configuration/customerContact.json"
  441. import advantageProject from "./configuration/advantageProject.json"
  442. import bankOfDeposit from "./configuration/bankOfDeposit.json"
  443. import commodity from "./configuration/commodity.json"
  444. import optionTwoCost from "./configuration/mainListCost.json"
  445. import optionPolicy from "./configuration/optionPolicy.json"
  446. import BuyFree from "./configuration/BuyFree.json"
  447. import {
  448. getDeptLazyTree,
  449. getDeptLazyTreeTwo,
  450. customerList,
  451. policyList,
  452. policyColumn
  453. } from "@/api/basicData/basicFeesDesc";
  454. import _ from "lodash";
  455. export default {
  456. name: "detailsPage",
  457. data() {
  458. return {
  459. form: {},
  460. configuration: {
  461. multipleChoices: false,
  462. multiple: false,
  463. collapseTags: false,
  464. placeholder: '请点击右边按钮选择',
  465. dicData: []
  466. },
  467. data: [],
  468. dataPolicy: [],
  469. contactsDataBuyFree: [],
  470. loadingCost: false,
  471. customerDivide: '',
  472. choiceData: false,
  473. commodityData: false,
  474. dataCost: [],
  475. treeDataPolicy: [],
  476. choiceIndex: '',
  477. dialogCost: false,
  478. treeDeptId: '',
  479. treeDeptIdCost: '',
  480. treePolicyId: '',
  481. pageCost: {
  482. pageSize: 10,
  483. currentPage: 1,
  484. total: 0
  485. },
  486. page: {
  487. pageSize: 10,
  488. currentPage: 1,
  489. total: 0
  490. },
  491. pagePolicy: {
  492. pageSize: 10,
  493. currentPage: 1,
  494. total: 0
  495. },
  496. loading: false,
  497. loadingPolicy: false,
  498. contactsForm: {},
  499. optionPolicy: optionPolicy,
  500. optionTwo: commodity,
  501. optionTwoCost: optionTwoCost,
  502. customerBuyFree: BuyFree,
  503. policyOption: {
  504. nodeKey: 'id',
  505. lazy: true,
  506. treeLoad: function (node, resolve) {
  507. const parentId = (node.level === 0) ? 0 : node.data.id;
  508. policyColumn(parentId).then(res => {
  509. resolve(res.data.data.map(item => {
  510. return {
  511. ...item,
  512. leaf: !item.hasChildren
  513. }
  514. }))
  515. });
  516. },
  517. addBtn: false,
  518. menu: false,
  519. size: 'small',
  520. props: {
  521. labelText: '标题',
  522. label: 'title',
  523. value: 'value',
  524. children: 'children'
  525. }
  526. },
  527. treeOptionCost: {
  528. nodeKey: 'id',
  529. lazy: true,
  530. treeLoad: function (node, resolve) {
  531. const parentId = (node.level === 0) ? 0 : node.data.id;
  532. getDeptLazyTree(parentId).then(res => {
  533. resolve(res.data.data.map(item => {
  534. return {
  535. ...item,
  536. leaf: !item.hasChildren
  537. }
  538. }))
  539. });
  540. },
  541. addBtn: false,
  542. menu: false,
  543. size: 'small',
  544. props: {
  545. labelText: '标题',
  546. label: 'title',
  547. value: 'value',
  548. children: 'children'
  549. }
  550. },
  551. treeOption: {
  552. nodeKey: 'id',
  553. lazy: true,
  554. treeLoad: function (node, resolve) {
  555. const parentId = (node.level === 0) ? 0 : node.data.id;
  556. getDeptLazyTreeTwo(parentId).then(res => {
  557. resolve(res.data.data.map(item => {
  558. return {
  559. ...item,
  560. leaf: !item.hasChildren
  561. }
  562. }))
  563. });
  564. },
  565. addBtn: false,
  566. menu: false,
  567. size: 'small',
  568. props: {
  569. labelText: '标题',
  570. label: 'title',
  571. value: 'value',
  572. children: 'children'
  573. }
  574. },
  575. dialogVisible: false,
  576. policyDialog: false,
  577. advantageProjectForm: {},
  578. selection: [],
  579. bankOfDepositForm: {},
  580. contactsData: [],
  581. advantageProjectData: [],
  582. bankOfDepositData: [],
  583. tableDataCost: [],
  584. dic: [],
  585. tableData: [],
  586. policyData: [],
  587. policyDataTwo: [],
  588. customerContact: customerContact,
  589. advantageProject: advantageProject,
  590. bankOfDeposit: bankOfDeposit,
  591. contactInformation: {
  592. column: [
  593. {
  594. label: '销售金额',
  595. prop: 'orderAmount',
  596. rules: [
  597. {
  598. required: false,
  599. message: ' ',
  600. trigger: 'blur'
  601. }
  602. ]
  603. }, {
  604. label: '其他费用',
  605. prop: 'otherAmount',
  606. rules: [
  607. {
  608. required: false,
  609. message: ' ',
  610. trigger: 'blur'
  611. }
  612. ]
  613. }, {
  614. label: '应收账款',
  615. prop: 'debitAmount',
  616. rules: [
  617. {
  618. required: false,
  619. message: ' ',
  620. trigger: 'blur'
  621. }
  622. ]
  623. }, {
  624. label: '单据状态',
  625. prop: 'status',
  626. rules: [
  627. {
  628. required: false,
  629. message: ' ',
  630. trigger: 'blur'
  631. }
  632. ]
  633. }, {
  634. label: '溢付款',
  635. prop: 'overPayment',
  636. rules: [
  637. {
  638. required: false,
  639. message: ' ',
  640. trigger: 'blur'
  641. }
  642. ]
  643. }, {
  644. label: '应收预付款',
  645. prop: 'advancePayment',
  646. rules: [
  647. {
  648. required: false,
  649. message: ' ',
  650. trigger: 'blur'
  651. }
  652. ]
  653. }, {
  654. label: '已收款',
  655. prop: 'settlmentAmount',
  656. rules: [
  657. {
  658. required: false,
  659. message: ' ',
  660. trigger: 'blur'
  661. }
  662. ]
  663. }, {
  664. label: '应收未收款',
  665. prop: 'accountsReceivable',//无
  666. disabled: true,
  667. rules: [
  668. {
  669. required: false,
  670. message: ' ',
  671. trigger: 'blur'
  672. }
  673. ]
  674. }, {
  675. label: '保证金',
  676. prop: 'deposit',
  677. rules: [
  678. {
  679. required: false,
  680. message: ' ',
  681. trigger: 'blur'
  682. }
  683. ]
  684. }, {
  685. label: '逾期账款',
  686. prop: 'overDueAccounts',
  687. rules: [
  688. {
  689. required: false,
  690. message: ' ',
  691. trigger: 'blur'
  692. }
  693. ]
  694. }, {
  695. label: '合同日期',
  696. prop: 'businesDate',
  697. type: 'datetime',
  698. rules: [
  699. {
  700. required: false,
  701. message: ' ',
  702. trigger: 'blur'
  703. }
  704. ]
  705. }, {
  706. label: '实际发货日期',
  707. prop: 'actualDeliveryDate',
  708. type: 'datetime',
  709. rules: [
  710. {
  711. required: false,
  712. message: ' ',
  713. trigger: 'blur'
  714. }
  715. ]
  716. }, {
  717. label: '制单日期',
  718. prop: 'createTime',
  719. type: 'datetime',
  720. rules: [
  721. {
  722. required: false,
  723. message: ' ',
  724. trigger: 'blur'
  725. }
  726. ]
  727. }, {
  728. label: '制单人',
  729. prop: 'createUserName',
  730. rules: [
  731. {
  732. required: false,
  733. message: ' ',
  734. trigger: 'blur'
  735. }
  736. ]
  737. }, {
  738. label: '毛利率',
  739. prop: 'grossProfitRate',
  740. rules: [
  741. {
  742. required: false,
  743. message: ' ',
  744. trigger: 'blur'
  745. }
  746. ]
  747. }, {
  748. label: '毛利额',
  749. prop: 'grossProfit',
  750. rules: [
  751. {
  752. required: false,
  753. message: ' ',
  754. trigger: 'blur'
  755. }
  756. ]
  757. }, {
  758. label: '所属公司',
  759. prop: 'belongToCorpId',
  760. rules: [
  761. {
  762. required: false,
  763. message: ' ',
  764. trigger: 'blur'
  765. }
  766. ]
  767. }, {
  768. label: '历史运费(元/条)',
  769. prop: 'freightAmountHistory',
  770. rules: [
  771. {
  772. required: false,
  773. message: ' ',
  774. trigger: 'blur'
  775. }
  776. ]
  777. }, {
  778. label: '到货日期',
  779. prop: 'arrivalDate',
  780. type: 'datetime',
  781. rules: [
  782. {
  783. required: false,
  784. message: ' ',
  785. trigger: 'blur'
  786. }
  787. ]
  788. }, {
  789. label: '预收款日期',
  790. type: 'datetime',
  791. prop: 'advanceCollectionDate',
  792. rules: [
  793. {
  794. required: false,
  795. message: ' ',
  796. trigger: 'blur'
  797. }
  798. ]
  799. }, {
  800. label: '积分倍数',
  801. prop: 'pointMutiple',
  802. rules: [
  803. {
  804. required: false,
  805. message: ' ',
  806. trigger: 'blur'
  807. }
  808. ]
  809. }, {
  810. label: '特别提醒',
  811. prop: 'specialRemarks',
  812. rules: [
  813. {
  814. required: false,
  815. message: ' ',
  816. trigger: 'blur'
  817. }
  818. ]
  819. }
  820. ]
  821. },
  822. basicData: {
  823. column: [
  824. {
  825. label: '销售订单号',
  826. prop: 'orderNo',
  827. rules: [
  828. {
  829. required: true,
  830. message: ' ',
  831. trigger: 'blur'
  832. }
  833. ]
  834. }, {
  835. label: '主订单号',
  836. prop: 'morderNo',
  837. rules: [
  838. {
  839. required: true,
  840. message: ' ',
  841. trigger: 'blur'
  842. }
  843. ]
  844. }, {
  845. label: '发货地址',
  846. prop: 'shippingAddress',
  847. rules: [
  848. {
  849. required: true,
  850. message: ' ',
  851. trigger: 'blur'
  852. }
  853. ]
  854. }, {
  855. label: '客户全称',
  856. prop: 'corpId',
  857. rules: [
  858. {
  859. required: true,
  860. message: ' ',
  861. trigger: 'blur'
  862. }
  863. ]
  864. }, {
  865. label: '付款方式',
  866. prop: 'paymentType',
  867. rules: [
  868. {
  869. required: true,
  870. message: ' ',
  871. trigger: 'blur'
  872. }
  873. ]
  874. }, {
  875. label: '到货地址',
  876. prop: 'arrivalAddress',
  877. rules: [
  878. {
  879. required: true,
  880. message: ' ',
  881. trigger: 'blur'
  882. }
  883. ]
  884. }, {
  885. label: '包装要求',
  886. prop: 'packageRemarks',
  887. rules: [
  888. {
  889. required: true,
  890. message: ' ',
  891. trigger: 'blur'
  892. }
  893. ]
  894. }, {
  895. label: '运费',
  896. prop: 'oceanFreight',
  897. rules: [
  898. {
  899. required: true,
  900. message: ' ',
  901. trigger: 'blur'
  902. }
  903. ]
  904. }, {
  905. label: '银行帐号',
  906. prop: 'banks',
  907. rules: [
  908. {
  909. required: true,
  910. message: ' ',
  911. trigger: 'blur'
  912. }
  913. ]
  914. }, {
  915. label: '要求发货日期',
  916. prop: 'requiredDeliveryDate',
  917. type: 'datetime',
  918. rules: [
  919. {
  920. required: true,
  921. message: ' ',
  922. trigger: 'blur'
  923. }
  924. ]
  925. }, {
  926. label: '要求到货日期',
  927. prop: 'requiredArrivalDate',
  928. type: 'datetime',
  929. rules: [
  930. {
  931. required: true,
  932. message: ' ',
  933. trigger: 'blur'
  934. }
  935. ]
  936. }, {
  937. label: '公司户头',
  938. prop: 'banksAccountName',
  939. rules: [
  940. {
  941. required: false,
  942. message: ' ',
  943. trigger: 'blur'
  944. }
  945. ]
  946. }, {
  947. label: "订单备注",
  948. span: 24,
  949. prop: "orderRemark",
  950. mock: {
  951. type: 'county'
  952. }
  953. }
  954. ]
  955. },
  956. paymentOption: [],
  957. }
  958. },
  959. //初始化查询
  960. created() {
  961. if (this.$route.query.id) {
  962. let id = this.$route.query.id.replace(/\"/g, "")
  963. this.queryData(id)
  964. }
  965. if (this.$route.query.copyId) {
  966. let id = this.$route.query.copyId.replace(/\"/g, "")
  967. this.queryData(id, true)
  968. }
  969. this.getWorkDicts("payment_term").then(res => {
  970. this.paymentOption = res.data.data
  971. })
  972. },
  973. watch: {
  974. '$route'(to, from) {
  975. console.log(to, from);
  976. if (this.$route.query.id) {
  977. let id = JSON.parse(this.$route.query.id).replace(/\"/g, "")
  978. detail(id).then(res => {
  979. console.log(res.data.data)
  980. this.form = res.data.data;
  981. });
  982. } else {
  983. this.form = {}
  984. }
  985. }
  986. },
  987. methods: {
  988. queryData(id, isCopy = false){
  989. detail(id).then(res => {
  990. console.log(res.data.data)
  991. this.form = res.data.data;
  992. this.contactsData = this.form.orderItemsList
  993. this.advantageProjectData = this.form.orderFeesList
  994. this.bankOfDepositData = this.form.orderFilesList
  995. this.configuration.dicData = this.form.corpName
  996. this.configuration.dicData = this.configuration.dicData.concat(this.form.belongToCorpList)
  997. // delete this.form.orderItemsList
  998. delete this.form.orderFeesList
  999. delete this.form.orderFilesList
  1000. delete this.form.corpName
  1001. delete this.form.belongToCorpList
  1002. if (isCopy) {
  1003. delete this.form.id
  1004. this.contactsData.forEach(item => {
  1005. delete item.id
  1006. delete item.pid
  1007. })
  1008. this.advantageProjectData.forEach(item => {
  1009. delete item.id
  1010. delete item.pid
  1011. })
  1012. this.bankOfDepositData.forEach(item => {
  1013. delete item.id
  1014. delete item.pid
  1015. })
  1016. }
  1017. });
  1018. },
  1019. // 复制新单
  1020. copyOrder() {
  1021. this.queryData(this.form.id, true)
  1022. },
  1023. //点击行可编辑
  1024. handleRowClick(row, event, column) {
  1025. },
  1026. //商品编辑
  1027. rowCell(row, index) {
  1028. console.log(row)
  1029. this.$refs.crudContact.rowCell(row, index)
  1030. },
  1031. //费用编辑
  1032. rowCellTwo(row, index) {
  1033. console.log(row)
  1034. this.$refs.crudProject.rowCell(row, index)
  1035. },
  1036. //费用新增触发
  1037. costIncrease() {
  1038. this.dialogCost = !this.dialogCost
  1039. this.choiceData = false
  1040. },
  1041. //商品新增触发
  1042. commoditySelection() {
  1043. this.dialogVisible = !this.dialogVisible
  1044. this.commodityData = false
  1045. },
  1046. //政策价格导入
  1047. policy() {
  1048. this.policyDialog = !this.policyDialog
  1049. },
  1050. //生成发货单
  1051. generateShipmentD() {
  1052. let lsit = []
  1053. for (let item in this.selection) {
  1054. if (!this.selection[item].id) {
  1055. return this.$confirm('商品信息有未保存数据, 是否立即保存?', '提示', {
  1056. confirmButtonText: '确定',
  1057. cancelButtonText: '取消',
  1058. type: 'warning'
  1059. }).then(() => {
  1060. this.editCustomer()
  1061. }).catch(() => {
  1062. this.$message({
  1063. type: 'info',
  1064. message: '已取消'
  1065. });
  1066. });
  1067. } else {
  1068. lsit.push(this.selection[item].id)
  1069. }
  1070. }
  1071. let data = {
  1072. id: this.form.id,
  1073. orderItemIds: lsit
  1074. }
  1075. generateShipment(data).then(res => {
  1076. console.log(res.data.data)
  1077. this.$router.push({
  1078. path: "deliveryNotice_detailsPageEdit",
  1079. query: {form: JSON.stringify(res.data.data)},
  1080. });
  1081. })
  1082. },
  1083. //商品选中触发
  1084. productSelection(selection) {
  1085. this.selection = selection
  1086. },
  1087. //点击费用明细选择触发
  1088. choice(row) {
  1089. this.dialogCost = !this.dialogCost
  1090. this.choiceData = true
  1091. console.log(row)
  1092. this.choiceIndex = row.$index
  1093. },
  1094. //点击商品明细选择触发
  1095. commodityChoice(row) {
  1096. this.dialogVisible = !this.dialogVisible
  1097. this.commodityData = true
  1098. console.log(row)
  1099. this.choiceIndexT = row.$index
  1100. },
  1101. //导入商品触发
  1102. importChoice() {
  1103. // this.contactsData = this.contactsData.concat(this.tableData)
  1104. if (this.tableData.length === 1) {
  1105. this.contactsData[this.choiceIndexT].cname = this.tableData[0].cname
  1106. this.contactsData[this.choiceIndexT].code = this.tableData[0].code
  1107. this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
  1108. this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
  1109. this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
  1110. this.contactsData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
  1111. }
  1112. this.dialogVisible = !this.dialogVisible
  1113. this.commodityData = false
  1114. },
  1115. //费用编辑导入触发
  1116. choiceCost() {
  1117. if (this.tableDataCost.length === 1) {
  1118. this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
  1119. this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
  1120. this.advantageProjectData[this.choiceIndex].code = this.tableDataCost[0].code
  1121. }
  1122. this.dialogCost = !this.dialogCost
  1123. this.choiceData = false
  1124. },
  1125. //费用导入触发
  1126. importCost() {
  1127. // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
  1128. if (this.tableDataCost.length > 0) {
  1129. for (let item in this.tableDataCost) {
  1130. console.log(this.tableDataCost[item])
  1131. this.tableDataCost[item].itemId = this.tableDataCost[item].id
  1132. this.tableDataCost[item].feeName = this.tableDataCost[item].cname
  1133. delete this.tableDataCost[item].id
  1134. this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
  1135. this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length - 1)
  1136. }
  1137. }
  1138. this.tableDataCost = []
  1139. this.dialogCost = false
  1140. },
  1141. //确认导入触发
  1142. importGoods() {
  1143. // this.contactsData = this.contactsData.concat(this.tableData)
  1144. if (this.tableData.length > 0) {
  1145. for (let item in this.tableData) {
  1146. console.log(this.tableData[item])
  1147. this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
  1148. delete this.tableData[item].goodsTypeName
  1149. this.tableData[item].itemId = this.tableData[item].id
  1150. delete this.tableData[item].id
  1151. this.$refs.crudContact.rowCellAdd(this.tableData[item]);
  1152. this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
  1153. }
  1154. }
  1155. this.tableData = []
  1156. this.dialogVisible = false
  1157. },
  1158. closeGoods() {
  1159. this.tableData = [];
  1160. this.treeDeptId = "";
  1161. },
  1162. closeFees() {
  1163. this.treeDeptIdCost = "";
  1164. this.treeData = [];
  1165. },
  1166. closePolicy() {
  1167. this.treePolicyId = '';
  1168. this.dataPolicy = [];
  1169. this.contactsDataBuyFree = [];
  1170. },
  1171. //选中触发
  1172. selectionChange(list) {
  1173. this.tableData = list
  1174. },
  1175. //费用选中触发
  1176. selectionChangeCost(list) {
  1177. this.tableDataCost = list
  1178. },
  1179. //导入页左商品类型查询
  1180. nodeClick(data) {
  1181. this.treeDeptId = data.id;
  1182. this.page.currentPage = 1;
  1183. this.onLoad(this.page);
  1184. },
  1185. //导入页销售政策查询
  1186. policyNodeClick(data) {
  1187. this.treePolicyId = data.id
  1188. // detailList(data.id).then(res => {
  1189. // //特价促销
  1190. // this.dataPolicy = res.data.data.specialItemList
  1191. // //买赠促销
  1192. // this.contactsDataBuyFree = res.data.data.presentItemList
  1193. // })
  1194. this.policyOnLoad()
  1195. },
  1196. //导入页左费用类型查询
  1197. nodeClickCost(data) {
  1198. this.treeDeptIdCost = data.id;
  1199. this.pageCost.currentPage = 1;
  1200. this.onLoadCost(this.pageCost);
  1201. },
  1202. //刷新触发
  1203. refreshChange() {
  1204. this.page.currentPage = 1;
  1205. this.onLoad(this.page);
  1206. },
  1207. //销售政策特价促销选中触发
  1208. selectionChangePolicy(list) {
  1209. this.policyData = list
  1210. },
  1211. //销售政策买赠促销选中触发
  1212. selectionChangePolicyTwo(list) {
  1213. this.policyDataTwo = list
  1214. },
  1215. //导入商品政策
  1216. importPolicy() {
  1217. let list = this.policyData.concat(this.policyDataTwo)
  1218. for (let item in list) {
  1219. console.log(list[item])
  1220. this.$refs.crudContact.rowCellAdd(list[item]);
  1221. this.$refs.crudContact.rowCell(list[item], this.contactsData.length - 1)
  1222. }
  1223. this.policyDialog = false
  1224. },
  1225. //费用刷新触发
  1226. refreshChangeCost() {
  1227. this.treeDeptIdCost = '';
  1228. this.pageCost.currentPage = 1;
  1229. this.onLoadCost(this.pageCost);
  1230. },
  1231. //新增商品信息保存触发
  1232. rowSave(row, done, loading) {
  1233. console.log(row)
  1234. console.log(this.contactsData)
  1235. // this.contactsData.push(row)
  1236. done()
  1237. },
  1238. //修改商品信息触发
  1239. rowUpdate(row, index, done, loading) {
  1240. done(row);
  1241. },
  1242. //删除商品信息触发
  1243. rowDel(row, index, donerowDel) {
  1244. this.$confirm("确定将选择数据删除?", {
  1245. confirmButtonText: "确定",
  1246. cancelButtonText: "取消",
  1247. type: "warning"
  1248. }).then(() => {
  1249. //商品判断是否需要调用删除接口
  1250. if (row.id) {
  1251. corpsattn(row.id).then(res => {
  1252. this.$message({
  1253. type: "success",
  1254. message: "操作成功!"
  1255. });
  1256. this.contactsData.splice(index, 1);
  1257. })
  1258. } else {
  1259. this.$message({
  1260. type: "success",
  1261. message: "操作成功!"
  1262. });
  1263. this.contactsData.splice(index, 1);
  1264. }
  1265. })
  1266. },
  1267. //新增费用明细保存触发
  1268. rowSaveProject(row, done, loading) {
  1269. // this.advantageProjectData.push(row)
  1270. done()
  1271. },
  1272. //修改费用明细触发
  1273. rowUpdateProject(row, index, done, loading) {
  1274. done(row);
  1275. },
  1276. policyOnLoad(params = {}) {
  1277. // this.policyLoading = true;
  1278. detailList(this.treePolicyId).then(res => {
  1279. //特价促销
  1280. this.dataPolicy = res.data.data.specialItemList
  1281. //买赠促销
  1282. this.contactsDataBuyFree = res.data.data.presentItemList
  1283. })
  1284. },
  1285. //商品列表查询
  1286. onLoad(page, params = {}) {
  1287. this.loading = true;
  1288. getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
  1289. console.log(res)
  1290. const data = res.data.data;
  1291. this.page.total = data.total;
  1292. this.data = data.records;
  1293. this.loading = false;
  1294. });
  1295. },
  1296. //费用查询
  1297. onLoadCost(page, params = {}) {
  1298. this.loadingCost = true;
  1299. let queryParams = Object.assign({}, params, {
  1300. pageSize: page.pageSize,
  1301. pageNum: page.currentPage,
  1302. parentId: 0,
  1303. feesTypeId: this.treeDeptIdCost
  1304. })
  1305. customerList(queryParams).then(res => {
  1306. console.log(res)
  1307. const data = res.data.data;
  1308. this.pageCost.total = data.total;
  1309. this.dataCost = data.records;
  1310. this.loadingCost = false;
  1311. });
  1312. },
  1313. //删除费用明细触发
  1314. rowDelProject(row, index, donerowDel) {
  1315. this.$confirm("确定将选择数据删除?", {
  1316. confirmButtonText: "确定",
  1317. cancelButtonText: "取消",
  1318. type: "warning"
  1319. }).then(() => {
  1320. //费用判断是否需要调用删除接口
  1321. if (row.id) {
  1322. corpsitem(row.id).then(res => {
  1323. this.$message({
  1324. type: "success",
  1325. message: "操作成功!"
  1326. });
  1327. this.advantageProjectData.splice(index, 1);
  1328. })
  1329. } else {
  1330. this.$message({
  1331. type: "success",
  1332. message: "操作成功!"
  1333. });
  1334. this.advantageProjectData.splice(index, 1);
  1335. }
  1336. })
  1337. },
  1338. //新增附件上传保存触发
  1339. rowSaveBankOfDeposit(row, done, loading) {
  1340. this.bankOfDepositData.push(row)
  1341. done()
  1342. },
  1343. //修改附件上传触发
  1344. rowUpdateBankOfDeposit(row, index, done, loading) {
  1345. done(row);
  1346. },
  1347. //删除附件上传触发
  1348. rowDelBankOfDeposit(row, index, donerowDel) {
  1349. this.$confirm("确定将选择数据删除?", {
  1350. confirmButtonText: "确定",
  1351. cancelButtonText: "取消",
  1352. type: "warning"
  1353. }).then(() => {
  1354. //附件判断是否需要调用删除接口
  1355. if (row.id) {
  1356. corpsbank(row.id).then(res => {
  1357. this.$message({
  1358. type: "success",
  1359. message: "操作成功!"
  1360. });
  1361. this.bankOfDepositData.splice(index, 1);
  1362. })
  1363. } else {
  1364. this.$message({
  1365. type: "success",
  1366. message: "操作成功!"
  1367. });
  1368. this.bankOfDepositData.splice(index, 1);
  1369. }
  1370. })
  1371. },
  1372. //修改提交触发
  1373. editCustomer() {
  1374. console.log(this.form)
  1375. this.$refs["form"].validate((valid) => {
  1376. if (valid) {
  1377. //商品信息
  1378. this.form.orderItemsList = this.contactsData
  1379. this.form.orderFeesList = this.advantageProjectData
  1380. this.form.orderFilesList = this.bankOfDepositData
  1381. if (typeof this.form.corpsTypeId == 'object') {
  1382. this.form.corpsTypeId = this.form.corpsTypeId.join(",")
  1383. }
  1384. this.form.billType = 'XS'
  1385. typeSave(this.form).then(res => {
  1386. this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
  1387. this.queryData(res.data.data.id)
  1388. //成功关闭此页面回到列表页
  1389. // this.backToList()
  1390. })
  1391. } else {
  1392. return false;
  1393. }
  1394. });
  1395. },
  1396. // 计算应收未收款
  1397. computedCost() {
  1398. // 应收预付款
  1399. let advancePayment = 0;
  1400. // 已收款
  1401. let settlmentAmount = 0;
  1402. if (this.form.advancePayment) {
  1403. advancePayment = this.form.advancePayment
  1404. }
  1405. if (this.form.settlmentAmount) {
  1406. settlmentAmount = this.form.settlmentAmount
  1407. }
  1408. this.$set(this.form, "accountsReceivable", Number(advancePayment) - Number(settlmentAmount)).toFixed(2);
  1409. },
  1410. quantityChange(row) {
  1411. console.log(row)
  1412. if (!row.orderQuantity) {
  1413. row.orderQuantity = 0;
  1414. } else {
  1415. // row.amount = _.multiply(row.price, row.orderQuantity).toFixed(2);
  1416. this.$set(row,"amount",_.multiply(row.price, row.orderQuantity).toFixed(2))
  1417. }
  1418. },
  1419. priceChange(row) {
  1420. if (!row.price) {
  1421. row.price = 0;
  1422. } else {
  1423. // row.amount = _.multiply(row.price, row.orderQuantity).toFixed(2);
  1424. this.$set(row,"amount",_.multiply(row.price, row.orderQuantity).toFixed(2))
  1425. }
  1426. },
  1427. //返回列表
  1428. backToList() {
  1429. this.$router.$avueRouter.closeTag();
  1430. this.$router.push({
  1431. path: '/businessManagement/salesOrder/index',
  1432. query: {}
  1433. });
  1434. }
  1435. }
  1436. }
  1437. </script>
  1438. <style lang="scss" scoped>
  1439. .customer-head {
  1440. position: fixed;
  1441. top: 105px;
  1442. width: 100%;
  1443. margin-left: -10px;
  1444. height: 62px;
  1445. background: #ffffff;
  1446. box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
  1447. z-index: 999;
  1448. /* display: flex;
  1449. justify-content: left; */
  1450. }
  1451. .customer-back {
  1452. cursor: pointer;
  1453. line-height: 62px;
  1454. font-size: 16px;
  1455. color: #323233;
  1456. font-weight: 400;
  1457. }
  1458. .back-icon {
  1459. line-height: 64px;
  1460. font-size: 20px;
  1461. margin-right: 8px;
  1462. }
  1463. .add-customer-btn {
  1464. position: fixed;
  1465. right: 36px;
  1466. top: 115px;
  1467. }
  1468. ::v-deep .el-form-item {
  1469. margin-bottom: 0;
  1470. }
  1471. .el-dialogDeep {
  1472. ::v-deep .el-dialog {
  1473. margin: 1vh auto 0 !important;
  1474. padding-bottom: 10px !important;
  1475. .el-dialog__body, .el-dialog__footer {
  1476. padding-bottom: 0 !important;
  1477. padding-top: 0 !important;
  1478. }
  1479. }
  1480. }
  1481. .print-div {
  1482. color: #000;
  1483. }
  1484. .print_table {
  1485. table {
  1486. border-right: 1px solid #000;
  1487. border-bottom: 1px solid #000;
  1488. font-size: 12px;
  1489. margin-bottom: 5px;
  1490. }
  1491. table td {
  1492. border-left: 1px solid #000;
  1493. border-top: 1px solid #000;
  1494. vertical-align: middle;
  1495. padding: 2px;
  1496. text-align: center;
  1497. }
  1498. }
  1499. .table {
  1500. border-collapse: collapse;
  1501. border-spacing: 0;
  1502. background-color: transparent;
  1503. display: table;
  1504. width: 99%;
  1505. max-width: 100%;
  1506. margin: 0 auto;
  1507. }
  1508. .table td {
  1509. text-align: left;
  1510. vertical-align: middle;
  1511. font-size: 14px;
  1512. color: #000000;
  1513. padding: 10.5px 0 10.5px 30px;
  1514. //border: 1px solid #000;
  1515. }
  1516. </style>