editSaleOrder.vue 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080
  1. <template>
  2. <!-- 修改销售订单 -->
  3. <div class="addSalePlan">
  4. <page-title>钢材订单修改</page-title>
  5. <!-- 订单基础信息 -->
  6. <el-form
  7. :inline="true"
  8. style="margin-top: 1rem;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)"
  9. >
  10. <el-form-item>
  11. <label class="el-form-item__label" style="width: auto;">发货单位</label>
  12. <el-autocomplete
  13. class="inline-input"
  14. v-model="shipperName"
  15. :fetch-suggestions="querySearchCarrier"
  16. placeholder="请输入发货单位名称"
  17. :trigger-on-focus="false"
  18. @select="handleSelectCarrier"
  19. style="width:245px"
  20. disabled
  21. >
  22. <template slot-scope="{ item }">
  23. <div class="name">{{ item.shipperName }}</div>
  24. </template>
  25. </el-autocomplete>
  26. </el-form-item>
  27. <el-form-item>
  28. <label class="el-form-item__label" style="width: auto;">下单客户</label>
  29. <el-autocomplete
  30. class="inline-input"
  31. v-model="consigneeName"
  32. :fetch-suggestions="querySearchConsignee"
  33. placeholder="请输入下单客户名称"
  34. :trigger-on-focus="false"
  35. @select="handleSelectConsignee"
  36. style="width:300px"
  37. >
  38. <template slot-scope="{ item }">
  39. <div class="name">{{ item.consigneeCompanyName }}</div>
  40. </template>
  41. </el-autocomplete>
  42. </el-form-item>
  43. <el-form-item>
  44. <label class="el-form-item__label" style="width: auto;">是否自提</label>
  45. <el-select v-model="values" placeholder="请选择" style="width:60px">
  46. <el-option
  47. v-for="item in options"
  48. :key="item.values"
  49. :label="item.label"
  50. :value="item.values"
  51. >
  52. </el-option>
  53. </el-select>
  54. </el-form-item>
  55. <el-form-item>
  56. <label class="el-form-item__label" style="width: auto;">收款公司</label>
  57. <el-select v-model="values1" placeholder="请选择" style="width: 255px">
  58. <el-option
  59. v-for="item in receivingCompany"
  60. :key="item.values1"
  61. :label="item.label1"
  62. :value="item.values1"
  63. >
  64. </el-option>
  65. </el-select>
  66. </el-form-item>
  67. <el-form-item>
  68. <label class="el-form-item__label" style="width: auto;">业务员</label>
  69. <el-select v-model="saleMan" placeholder="请选择" style="width: 90px">
  70. <el-option
  71. v-for="item in saleMans"
  72. :key="item.value"
  73. :label="item.label"
  74. :value="item.value"
  75. >
  76. </el-option>
  77. </el-select>
  78. </el-form-item>
  79. <el-form-item>
  80. <label
  81. class="el-form-item__label"
  82. style="width: auto;margin-top: 0.3rem;"
  83. >摘要</label
  84. >
  85. </el-form-item>
  86. <el-form-item>
  87. <el-input
  88. v-model="remarks"
  89. placeholder="(非必填)"
  90. style="width: 180px"
  91. ></el-input>
  92. </el-form-item>
  93. </el-form>
  94. <!-- 车序号基础信息 -->
  95. <el-form :inline="true" style="margin-top: 1rem;">
  96. <el-form-item>
  97. <label class="el-form-item__label" style="width: auto;">收货地址</label>
  98. <el-autocomplete
  99. style="width:400px"
  100. v-model="saleShipperAddressName"
  101. :fetch-suggestions="querySearchAddress"
  102. placeholder="请输入内容"
  103. @select="handleSelectAddress"
  104. >
  105. <template slot-scope="{ item }">
  106. <span class="addr">{{ item.addressPlace }}</span>
  107. </template>
  108. </el-autocomplete>
  109. <el-button type="primary" @click="ondrawerOut">选择</el-button>
  110. </el-form-item>
  111. <el-form-item>
  112. <label class="el-form-item__label" style="width: auto;"
  113. >可装货时间</label
  114. >
  115. <el-date-picker
  116. class="textinput3"
  117. v-model.number="saleDateOfReceipt"
  118. type="datetime"
  119. placeholder="选择日期时间"
  120. disabled
  121. >
  122. </el-date-picker>
  123. </el-form-item>
  124. <el-form-item>
  125. <label
  126. class="el-form-item__label"
  127. style="width: auto;margin-top: 0.4rem;"
  128. >收货客户电话</label
  129. >
  130. </el-form-item>
  131. <el-form-item>
  132. <el-input
  133. style="width: 150px"
  134. v-model="saleOrderConsigneeTel"
  135. placeholder="(非必填)"
  136. ></el-input>
  137. </el-form-item>
  138. <el-form-item>
  139. <label
  140. class="el-form-item__label"
  141. style="width: auto;margin-top: 0.4rem;"
  142. >备注</label
  143. >
  144. </el-form-item>
  145. <el-form-item>
  146. <el-input
  147. style="width: 180px"
  148. v-model="truckRemark"
  149. placeholder="(非必填)"
  150. ></el-input>
  151. </el-form-item>
  152. </el-form>
  153. <div class="button-box">
  154. <el-button type="primary" class="btn" @click="addMaterial"
  155. ><i class="el-icon-circle-plus-outline"></i>新增物资</el-button
  156. >
  157. </div>
  158. <!-- 车辆拼装物资信息table1 -->
  159. <div class="selectionTable from">
  160. <el-table
  161. :data="materialList"
  162. border
  163. style="width: 100%"
  164. highlight-current-row
  165. >
  166. <el-table-column
  167. v-for="(item, i) in materialTableTop"
  168. :key="i"
  169. :prop="item.prop"
  170. :label="item.label"
  171. align="center"
  172. show-overflow-tooltip
  173. >
  174. <!-- 插入输入框 -->
  175. <template slot-scope="scope">
  176. <template v-if="item.slot">
  177. <!-- 物资件数 -->
  178. <template v-if="item.prop == 'orderPlanWeight'">
  179. <el-input
  180. class="textinput111"
  181. v-model.number="scope.row.orderPlanWeight"
  182. placeholder="(必填)"
  183. ></el-input>
  184. </template>
  185. <!-- 米数 -->
  186. <template v-if="item.prop == 'meterNumber'">
  187. <el-input
  188. v-if="scope.row.haveMeter == 1"
  189. class="textinput111"
  190. v-model.number="scope.row.meterNumber"
  191. :disabled="scope.row.isDisable == 1"
  192. placeholder="(必填)"
  193. ></el-input>
  194. </template>
  195. <!-- 分装车数 -->
  196. <template v-if="item.prop == 'carNumber'">
  197. <el-input
  198. v-if="materialList.length == 1"
  199. class="textinput111"
  200. v-model.number="scope.row.carNumber"
  201. placeholder="(非必填)"
  202. ></el-input>
  203. </template>
  204. <!-- 是否磅重销售 -->
  205. <template v-if="item.prop == 'isPound'">
  206. <el-select
  207. v-model="scope.row.isPound"
  208. placeholder="请选择"
  209. style="width:65px"
  210. >
  211. <el-option
  212. v-for="item in options2"
  213. :key="item.values2"
  214. :label="item.label2"
  215. :value="item.values2"
  216. >
  217. </el-option>
  218. </el-select>
  219. </template>
  220. </template>
  221. <template v-else>
  222. <span>{{ scope.row[item.prop] }}</span>
  223. </template>
  224. </template>
  225. </el-table-column>
  226. <!-- 操作列 -->
  227. <el-table-column fixed="right" label="操作" width="100">
  228. <template slot-scope="scope">
  229. <el-button
  230. @click.native.prevent="
  231. deleteMaterialRow(scope.$index, materialList)
  232. "
  233. type="text"
  234. icon="el-icon-close"
  235. size="big"
  236. ></el-button>
  237. </template>
  238. </el-table-column>
  239. </el-table>
  240. </div>
  241. <!-- 新增物资和生成一车 -->
  242. <div class="button-box">
  243. <el-input
  244. style="width: 60px;margin-right: 0.3rem;border:2px solid;"
  245. v-model="toCxh"
  246. ></el-input>
  247. <el-button type="primary" class="btn" @click="addToCxh"
  248. >添加到车序号</el-button
  249. >
  250. <el-button type="primary" class="btn" @click="createACar"
  251. >添加到订单</el-button
  252. >
  253. </div>
  254. <div style="margin-left: 0.3rem;color:red">(注:一个车序号代表一辆车)</div>
  255. <!-- 销售订单信息table2 -->
  256. <div class="selectionTable from">
  257. <el-table
  258. :data="selectionList"
  259. border
  260. style="width: 100%"
  261. :span-method="cellMerge"
  262. @cell-click="goclick"
  263. highlight-current-row
  264. >
  265. <el-table-column
  266. v-for="(item, i) in tableTop"
  267. :key="i"
  268. :prop="item.prop"
  269. :label="item.label"
  270. :width="item.width"
  271. align="center"
  272. show-overflow-tooltip
  273. >
  274. <template slot="scope" v-if="item.label !== '物资名称'">
  275. <span>{{ item.label }}</span>
  276. </template>
  277. <template slot="scope" v-if="item.label !== '件数'">
  278. <span>{{ item.label }}</span>
  279. </template>
  280. <template slot="scope" v-if="item.label !== '收货地址'">
  281. <span>{{ item.label }}</span>
  282. </template>
  283. <!-- <template slot="scope" v-if="item.label !== '收货日期'">
  284. <span>{{ item.label }}</span>
  285. </template> -->
  286. <template slot="scope" v-if="item.label !== '收货姓名'">
  287. <span>{{ item.label }}</span>
  288. </template>
  289. <template slot="scope" v-if="item.label !== '收货方电话'">
  290. <span>{{ item.label }}</span>
  291. </template>
  292. <template slot="scope" v-if="item.label !== '备注'">
  293. <span>{{ item.label }}</span>
  294. </template>
  295. <!-- 插入输入框 -->
  296. <template slot-scope="scope">
  297. <template v-if="item.slot">
  298. <!-- 物资名称 -->
  299. <template v-if="item.prop == 'materialName'">
  300. <el-input
  301. style="width: 200px"
  302. v-model="scope.row.materialName"
  303. disabled
  304. >
  305. </el-input>
  306. <el-button
  307. type="primary"
  308. @click="changeMaterial(scope.$index)"
  309. v-if="isCellClick == 1"
  310. >更改</el-button
  311. >
  312. </template>
  313. <!-- 物资件数 -->
  314. <template v-if="item.prop == 'orderPlanWeight'">
  315. <el-input
  316. class="textinput"
  317. v-model.number="scope.row.orderPlanWeight"
  318. ></el-input>
  319. </template>
  320. <!-- 米数 -->
  321. <template v-if="item.prop == 'meterNumber'">
  322. <el-input
  323. v-if="scope.row.haveMeter == 1"
  324. class="textinput"
  325. v-model.number="scope.row.meterNumber"
  326. :disabled="scope.row.isDisable == 1"
  327. ></el-input>
  328. </template>
  329. <!-- 是否磅重销售 -->
  330. <template v-if="item.prop == 'isPound'">
  331. <el-select
  332. v-model="scope.row.isPound"
  333. placeholder="请选择"
  334. style="width:65px"
  335. >
  336. <el-option
  337. v-for="item in options2"
  338. :key="item.values2"
  339. :label="item.label2"
  340. :value="item.values2"
  341. >
  342. </el-option>
  343. </el-select>
  344. </template>
  345. <!-- 收货地址id -->
  346. <template
  347. style="width: 380px"
  348. v-if="item.prop == 'saleShipperAddressName'"
  349. >
  350. <el-input
  351. style="width: 310px"
  352. v-model="scope.row.saleShipperAddressName"
  353. disabled
  354. >
  355. </el-input>
  356. <el-button
  357. type="primary"
  358. @click="ondrawer(scope.row, scope.$index)"
  359. v-if="isCellClick == 1"
  360. >选择</el-button
  361. >
  362. </template>
  363. <!-- 收货客户电话号码 -->
  364. <template v-if="item.prop == 'saleOrderConsigneeTel'">
  365. <el-input
  366. class="textinput5"
  367. placeholder="(必填)"
  368. v-model.number="scope.row.saleOrderConsigneeTel"
  369. @change="batchUpdateValue(scope.row, scope.$index)"
  370. ></el-input>
  371. </template>
  372. <!-- 备注 -->
  373. <template v-if="item.prop == 'truckRemark'">
  374. <el-input
  375. class="textinput5"
  376. placeholder="(必填)"
  377. v-model="scope.row.truckRemark"
  378. ></el-input>
  379. </template>
  380. </template>
  381. <template v-else>
  382. <span>{{ scope.row[item.prop] }}</span>
  383. </template>
  384. </template>
  385. </el-table-column>
  386. <!-- 操作列 -->
  387. <el-table-column fixed="right" label="操作" width="200">
  388. <template slot-scope="scope">
  389. <el-button
  390. @click.native.prevent="deleteRow(scope.$index, selectionList)"
  391. type="text"
  392. icon="el-icon-close"
  393. size="big"
  394. ></el-button>
  395. <el-button
  396. @click.native.prevent="copyRow(scope.$index, scope.row)"
  397. type="text"
  398. size="big"
  399. >复制为一车</el-button
  400. >
  401. <el-button
  402. @click.native.prevent="copyRowflu(scope.$index, scope.row)"
  403. type="text"
  404. size="big"
  405. >复制为分录</el-button
  406. >
  407. </template>
  408. </el-table-column>
  409. <el-table-column fixed="right" width="80">
  410. <template slot-scope="scope">
  411. <el-button
  412. @click.native.prevent="copyRowfluAll(scope.$index, scope.row)"
  413. type="text"
  414. size="big"
  415. >复制整车</el-button
  416. >
  417. </template>
  418. </el-table-column>
  419. </el-table>
  420. </div>
  421. <!-- 收货地址弹出框 -->
  422. <el-dialog title="收货地址" :visible.sync="drawer1" width="90%">
  423. <el-form :inline="true">
  424. <el-form-item>
  425. <label class="el-form-item__label" style="width: auto;">省</label>
  426. <el-select
  427. v-model="province"
  428. filterable
  429. placeholder="请选择"
  430. @change="onchangeProvince"
  431. >
  432. <el-option
  433. v-for="item in provinceList"
  434. :key="item.id"
  435. :label="item.addressProvince"
  436. :value="item.id"
  437. ></el-option>
  438. </el-select>
  439. </el-form-item>
  440. <el-form-item>
  441. <label class="el-form-item__label" style="width: auto;">市</label>
  442. <el-select
  443. v-model="city"
  444. filterable
  445. placeholder="请选择"
  446. @change="onchangeCity"
  447. >
  448. <el-option
  449. v-for="item in cityList"
  450. :key="item.id"
  451. :label="item.addressDistrict"
  452. :value="item.id"
  453. ></el-option>
  454. </el-select>
  455. </el-form-item>
  456. <el-form-item>
  457. <label class="el-form-item__label" style="width: auto;">县(区)</label>
  458. <el-select
  459. v-model="county"
  460. filterable
  461. placeholder="请选择"
  462. @change="onchangeCounty"
  463. >
  464. <el-option
  465. v-for="item in countyList"
  466. :key="item.id"
  467. :label="item.addressTown"
  468. :value="item.id"
  469. ></el-option>
  470. </el-select>
  471. </el-form-item>
  472. <el-form-item>
  473. <label class="el-form-item__label" style="width: auto;"
  474. >具体收货地址</label
  475. >
  476. <el-autocomplete
  477. class="inline-input"
  478. v-model="place"
  479. :fetch-suggestions="querySearch1"
  480. placeholder="请输入具体收货地址"
  481. :trigger-on-focus="false"
  482. @select="handleSelect1"
  483. >
  484. </el-autocomplete>
  485. </el-form-item>
  486. </el-form>
  487. <div slot="footer" class="button-box">
  488. <el-button @click="drawer1 = false">取 消</el-button>
  489. <el-button type="primary" @click="addAddressClick">确定</el-button>
  490. </div>
  491. </el-dialog>
  492. <!-- 物资选择模态框 -->
  493. <el-drawer
  494. title="选择物资信息"
  495. :visible.sync="table1"
  496. direction="rtl"
  497. size="90%"
  498. :show-close="true"
  499. >
  500. <el-form :inline="true" style="margin-top: 0.5rem;">
  501. <el-form-item>
  502. <label class="el-form-item__label" style="width: auto;"
  503. >物资名称/型号</label
  504. >
  505. </el-form-item>
  506. <el-form-item>
  507. <el-input
  508. placeholder="请输入物资名称/型号"
  509. v-model="materialNameText"
  510. clearable
  511. ></el-input>
  512. </el-form-item>
  513. <el-form-item>
  514. <label class="el-form-item__label" style="width: auto;">规格</label>
  515. </el-form-item>
  516. <el-form-item>
  517. <el-input
  518. placeholder="请输入内容"
  519. v-model="materialSpecificationText"
  520. clearable
  521. ><template slot="prepend">Φ</template></el-input
  522. >
  523. </el-form-item>
  524. <el-button
  525. type="primary"
  526. class="btn"
  527. @click="onclick"
  528. style="margin-left: 4px;"
  529. ><i class="el-icon-search"></i>查询</el-button
  530. >
  531. <el-button type="primary" @click="makeSureMaterial"
  532. ><i class="el-icon-check"></i>确定</el-button
  533. >
  534. </el-form>
  535. <div class="tablecls">
  536. <!-- 查询所有的物资 -->
  537. <dilTable
  538. v-bind.sync="option"
  539. @selection-change="selectionChange"
  540. @rowDbClick="rowDbClick"
  541. >
  542. </dilTable>
  543. </div>
  544. </el-drawer>
  545. <!-- 更改行物资 -->
  546. <el-dialog title="更改物资" :visible.sync="drawer" width="80%">
  547. <el-form :inline="true" style="margin-top: 0.5rem;">
  548. <el-form-item>
  549. <label class="el-form-item__label" style="width: auto;"
  550. >物资名称</label
  551. >
  552. </el-form-item>
  553. <el-form-item>
  554. <el-input
  555. placeholder="请输入内容"
  556. v-model="materialNameText"
  557. clearable
  558. ></el-input>
  559. </el-form-item>
  560. <el-form-item>
  561. <label class="el-form-item__label" style="width: auto;">规格</label>
  562. </el-form-item>
  563. <el-button
  564. type="primary"
  565. class="btn"
  566. @click="onclick"
  567. style="margin-left: 4px;"
  568. ><i class="el-icon-search"></i>查询</el-button
  569. >
  570. </el-form>
  571. <div class="tablecls">
  572. <!-- 查询所有的物资 -->
  573. <dilTable
  574. v-bind.sync="option1"
  575. @radio-change="currentRadioChange"
  576. :drawer="drawer"
  577. >
  578. </dilTable>
  579. </div>
  580. <div class="button-box">
  581. <el-button @click="closeChangeMaterial">取消更改</el-button>
  582. <el-button type="primary" @click="makeSureChange">确认更改</el-button>
  583. </div>
  584. </el-dialog>
  585. <!-- 订单确认 -->
  586. <el-dialog
  587. title="订单明细 (注*: 请仔细确认订单物资和件数后再提交)"
  588. :visible.sync="orderMakeSure"
  589. width="94%"
  590. >
  591. <el-form :inline="true" style="margin-top: 0.5rem;">
  592. <el-form-item>
  593. <label class="el-form-item__label" style="width: auto;"
  594. >发货单位:</label
  595. >
  596. <el-tag size="big">{{ shipperName }}</el-tag>
  597. </el-form-item>
  598. <el-form-item>
  599. <label class="el-form-item__label" style="width: auto;"
  600. >下单客户:</label
  601. >
  602. <el-tag size="big">{{ consigneeName }}</el-tag>
  603. </el-form-item>
  604. <el-form-item>
  605. <label class="el-form-item__label" style="width: auto;"
  606. >是否自提:</label
  607. >
  608. <el-tag size="big">{{ saleOrderIsselfMention }}</el-tag>
  609. </el-form-item>
  610. <el-form-item>
  611. <label class="el-form-item__label" style="width: auto;"
  612. >收款公司:</label
  613. >
  614. <el-tag size="big">{{ saleOrderReceiveCustomer }}</el-tag>
  615. </el-form-item>
  616. <el-form-item>
  617. <label class="el-form-item__label" style="width: auto;"
  618. >业务员:</label
  619. >
  620. <el-tag size="big">{{ saleManText }}</el-tag>
  621. </el-form-item>
  622. <el-form-item>
  623. <label class="el-form-item__label" style="width: auto;">摘要:</label>
  624. <el-tag size="big" v-if="remarks != null">{{ remarks }}</el-tag>
  625. </el-form-item>
  626. </el-form>
  627. <!-- 物资明细信息 -->
  628. <el-table
  629. :data="selectionList"
  630. border
  631. style="width: 100%;margin-top: 0.5rem;"
  632. :span-method="cellMerge"
  633. highlight-current-row
  634. >
  635. <el-table-column
  636. v-for="(item, i) in tableTop"
  637. :key="i"
  638. :prop="item.prop"
  639. :label="item.label"
  640. :width="item.width"
  641. align="center"
  642. show-overflow-tooltip
  643. >
  644. </el-table-column>
  645. </el-table>
  646. <div class="button-box">
  647. <el-button @click="orderMakeSure = false">返回编辑</el-button>
  648. <el-button type="primary" @click="sendRequest">提交订单</el-button>
  649. </div>
  650. </el-dialog>
  651. <div class="button-box">
  652. <el-button @click="cancel">取消</el-button>
  653. <el-button type="primary" @click="makeSure">确定</el-button>
  654. </div>
  655. </div>
  656. </template>
  657. <script>
  658. import PageTitle from "@/components/Page/Title";
  659. import { sjTime, isIntegerNumber } from "@/utils/sharedJsFile";
  660. export default {
  661. components: { PageTitle },
  662. data() {
  663. return {
  664. isCellClick: null,
  665. truckRemark: "",
  666. shipperName: "四川省达州钢铁集团有限责任公司",
  667. shipperId: 1,
  668. consigneeName: null,
  669. consigneeId: null,
  670. remarks: null,
  671. saleShipperAddressName: null,
  672. saleShipperAddressId: null,
  673. saleDateOfReceipt: null,
  674. saleOrderConsigneeTel: null,
  675. //加载
  676. selectLineLoading: false,
  677. //物资选中暂存
  678. materialList1: [],
  679. //物资信息查询内容
  680. materialNameText: null,
  681. materialSpecificationText: null,
  682. materialModelText: null,
  683. //物资选中表格
  684. materialList: [],
  685. materialTableTop: [
  686. {
  687. prop: "materialName",
  688. label: "物资名称",
  689. width: "140"
  690. },
  691. {
  692. prop: "meterNumber",
  693. label: "米数",
  694. slot: true
  695. },
  696. {
  697. prop: "Specification",
  698. label: "规格型号",
  699. width: "140"
  700. },
  701. {
  702. prop: "orderPlanWeight",
  703. label: "件数",
  704. slot: true
  705. },
  706. {
  707. prop: "carNumber",
  708. label: "分装车数",
  709. slot: true
  710. },
  711. {
  712. prop: "isPound",
  713. label: "是否磅重销售",
  714. slot: true
  715. }
  716. ],
  717. truckRemark: "",
  718. table1: false,
  719. //添加到那个车序号
  720. toCxh: null,
  721. //最大车序号数
  722. maxCxh: 1,
  723. //存放每一行记录的合并数
  724. spanArr: [],
  725. //pos是spanArr的索引
  726. pos: 0,
  727. //判断是内层还是外层点击的收货地址浏览
  728. inOrOut: 0,
  729. //地址输入框的值
  730. addresText: "",
  731. //已选中省市县
  732. address: null,
  733. //具体地址
  734. place: null,
  735. //暂存具体地址
  736. place1: null,
  737. //省市县Id
  738. addressId: null,
  739. // input: "",
  740. //物资表格多选
  741. option: {
  742. // 表格请求数据的地址
  743. requestUrl: "/api/v1/uc/getSteelMaterial?apiId=244",
  744. // 控制显示多选列
  745. selectionType: "select"
  746. },
  747. //物资表格单选
  748. option1: {
  749. // 表格请求数据的地址
  750. requestUrl: "/api/v1/uc/getSteelMaterial?apiId=244",
  751. // 控制显示单选列
  752. selectionType: "radio"
  753. },
  754. selectionList: [],
  755. selectionList1: [],
  756. drawer1: false,
  757. direction: "rtl",
  758. form1: {},
  759. value: undefined,
  760. frist: {
  761. requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
  762. selectionType: "radio",
  763. mapList: []
  764. },
  765. //所有省
  766. provinceList: [],
  767. //选中的省
  768. province: "",
  769. //所有市
  770. cityList: [],
  771. //选中的市
  772. city: "",
  773. //所有的县(区)
  774. countyList: [],
  775. //选中的县
  776. county: "",
  777. options: [
  778. {
  779. values: "yes",
  780. label: "是"
  781. },
  782. {
  783. values: "no",
  784. label: "否"
  785. }
  786. ],
  787. values: "no",
  788. //是否磅重销售
  789. options2: [
  790. {
  791. values2: 0,
  792. label2: "是"
  793. },
  794. {
  795. values2: 1,
  796. label2: "否"
  797. }
  798. ],
  799. values2: 1,
  800. receivingCompany: [
  801. {
  802. values1: "dzgt",
  803. label1: "四川省达州钢铁集团有限责任公司"
  804. },
  805. {
  806. values1: "dgsm",
  807. label1: "四川达钢商贸有限公司"
  808. }
  809. ],
  810. values1: "dzgt",
  811. saleMan: null,
  812. saleManText: null,
  813. saleMans: [],
  814. tableTop: [
  815. {
  816. prop: "cxh",
  817. label: "车序号",
  818. width: "50"
  819. },
  820. {
  821. prop: "materialName",
  822. label: "物资名称",
  823. width: "300",
  824. slot: true
  825. },
  826. {
  827. prop: "meterNumber",
  828. label: "米数",
  829. width: "60",
  830. slot: true
  831. },
  832. {
  833. prop: "Specification",
  834. label: "规格型号",
  835. width: "140"
  836. },
  837. {
  838. prop: "orderPlanWeight",
  839. label: "件数",
  840. width: "60",
  841. slot: true
  842. },
  843. {
  844. prop: "isPound",
  845. label: "是否磅重销售",
  846. width: "80",
  847. slot: true
  848. },
  849. {
  850. prop: "saleShipperAddressName",
  851. label: "收货地址",
  852. width: "400",
  853. slot: true
  854. },
  855. {
  856. prop: "saleOrderConsigneeTel",
  857. label: "收货客户电话",
  858. width: "140",
  859. slot: true
  860. },
  861. {
  862. prop: "truckRemark",
  863. label: "备注",
  864. width: "140",
  865. slot: true
  866. }
  867. ],
  868. row: {},
  869. //打开更改改物资弹出框
  870. drawer: false,
  871. //记录为内层打开
  872. isOpenDrawer: 0,
  873. //记录修改物资单选行的位置
  874. indexChangeMaterial: null,
  875. //记录单选物资Id
  876. selectedMaterialId: null,
  877. //记录单选物资名称
  878. selectedMaterialName: null,
  879. //记录单选物资规格
  880. selectedMaterialSpecification: null,
  881. //记录单选物资型号
  882. selectedMaterialModel: null,
  883. //记录单选物资编码
  884. selectedMaterialCode: null,
  885. //订单确认
  886. orderMakeSure: false,
  887. //是否自提记录字段
  888. saleOrderIsselfMention: null,
  889. //收款公司
  890. saleOrderReceiveCustomer: null,
  891. //是否忽视收货客户电话字段
  892. ignoreSaleOrderConsigneeTel: 0
  893. };
  894. },
  895. created() {
  896. let loadTime1 = new Date(
  897. new Date(new Date().toLocaleDateString()).getTime() +
  898. (3600 * 1000 * 8 - 1)
  899. ); // 当天8点前
  900. let loadTime2 = new Date(
  901. new Date(new Date().toLocaleDateString()).getTime() +
  902. (3600 * 1000 * 32 - 1)
  903. ); // 次天8点前
  904. if (new Date().getTime() - loadTime1 > 0) {
  905. this.saleDateOfReceipt = loadTime2;
  906. } else {
  907. this.saleDateOfReceipt = loadTime1;
  908. }
  909. //获取所有的省
  910. this.getAllProvince();
  911. //获取所有的业务员
  912. this.getAllsaleMan();
  913. //获取所有的销售订单信息
  914. this.getAllSaleMessages();
  915. },
  916. methods: {
  917. handleSelectAddress(item) {
  918. this.saleShipperAddressName = item.addressPlace;
  919. this.province = item.addressProvince;
  920. this.city = item.addressDistrict;
  921. this.county = item.addressTown;
  922. this.saleShipperAddressId = item.shipperAddressId;
  923. this.addressId = item.shipperAddressId;
  924. this.place1 = item.place;
  925. this.saleOrderConsigneeTel = item.saleOrderConsigneeTel;
  926. },
  927. querySearchAddress(queryString, cb) {
  928. if (this.consigneeId != null) {
  929. this.axios
  930. .post(
  931. "/api/v1/ams/matchingAddressRecently?receiveId=" + this.consigneeId
  932. )
  933. .then(res => {
  934. var restaurants = res.data.data;
  935. console.log(restaurants);
  936. var results = queryString
  937. ? restaurants.filter(this.createStateFilter(queryString))
  938. : restaurants;
  939. cb(results);
  940. });
  941. }
  942. },
  943. createStateFilter(queryString) {
  944. return restaurants => {
  945. return (
  946. restaurants.addressPlace
  947. .toLowerCase()
  948. .indexOf(queryString.toLowerCase()) > -1
  949. );
  950. };
  951. },
  952. copyRow(index, row) {
  953. let copyRow = new Object();
  954. Object.keys(row).forEach(key => {
  955. copyRow[key] = row[key];
  956. });
  957. copyRow.cxh = this.maxCxh;
  958. this.selectionList.push(copyRow);
  959. this.getSpanArr(this.selectionList);
  960. this.maxCxh++;
  961. },
  962. copyRowflu(index, row) {
  963. console.log(index);
  964. let copyRowflu = new Object();
  965. Object.keys(row).forEach(key => {
  966. copyRowflu[key] = row[key];
  967. });
  968. this.selectionList.splice(index + 1, 0, copyRowflu);
  969. // this.selectionList.push(copyRowflu);
  970. this.getSpanArr(this.selectionList);
  971. },
  972. copyRowfluAll(index, row) {
  973. let arr = [];
  974. //复制整车,根据车序号去寻找相同的列
  975. arr = this.selectionList.concat([]).filter((item, index) => {
  976. return item.cxh == row.cxh;
  977. });
  978. arr.forEach(e => {
  979. let copyRow = new Object();
  980. Object.keys(e).forEach(key => {
  981. copyRow[key] = e[key];
  982. });
  983. copyRow.cxh = this.maxCxh;
  984. this.selectionList.push(copyRow);
  985. });
  986. this.getSpanArr(this.selectionList);
  987. this.maxCxh++;
  988. },
  989. onblur() {
  990. this.isCellClick = 0;
  991. console.log("我这里值也变化了");
  992. },
  993. goclick() {
  994. this.isCellClick = 1;
  995. console.log("我这里值变化了");
  996. },
  997. rowDbClick(row) {
  998. this.materialList1 = [];
  999. this.materialList1.push(row);
  1000. this.makeSureMaterial();
  1001. },
  1002. //获取所有的销售订单信息
  1003. getAllSaleMessages() {
  1004. this.axios
  1005. .post(
  1006. "/api/v1/ams/getAllSaleMessages?saleOrderId=" +
  1007. this.$route.params.saleOrderId
  1008. )
  1009. .then(res => {
  1010. //销售订单基础数据
  1011. console.log(res.data.data);
  1012. this.shipperName = res.data.data.shipperName;
  1013. this.shipperId = res.data.data.shipperId;
  1014. this.consigneeName = res.data.data.receiveName;
  1015. this.consigneeId = res.data.data.receiveId;
  1016. this.remarks = res.data.data.saleRemark;
  1017. if (res.data.data.isSelfMention == "否") {
  1018. this.values = "no";
  1019. } else {
  1020. this.values = "yes";
  1021. }
  1022. if (
  1023. res.data.data.saleOrderReceiveCustomer ==
  1024. "四川省达州钢铁集团有限责任公司"
  1025. ) {
  1026. this.values1 = "dzgt";
  1027. } else {
  1028. this.values1 = "dgsm";
  1029. }
  1030. this.salerId = res.data.data.salerId;
  1031. this.saleMan = res.data.data.salerId;
  1032. this.saleRemark = res.data.data.saleRemark;
  1033. //下方车序号数据
  1034. res.data.data.mapList.forEach(e => {
  1035. var haveMeter;
  1036. if (e.steelMeters) {
  1037. haveMeter = 1;
  1038. } else {
  1039. haveMeter = 0;
  1040. }
  1041. if (e.materialName.includes("米")) {
  1042. var addmap = {
  1043. cxh: e.truckNo,
  1044. materialName: e.materialName,
  1045. Specification: e.Specification,
  1046. materialCode: e.materialCode,
  1047. orderPlanWeight: e.materialNumber,
  1048. isPound: e.isPoundSale,
  1049. saleShipperAddressId: e.shipperAddressId,
  1050. place: e.place,
  1051. saleShipperAddressName: e.saleShipperAddressName + e.place,
  1052. saleDateOfReceipt: e.saleDateOfReceipt,
  1053. saleOrderConsigneeTel: e.saleOrderConsigneeTel,
  1054. materialId: e.materialId,
  1055. truckRemark: e.truckRemark,
  1056. haveMeter: haveMeter,
  1057. meterNumber: Number(e.materialName.replace(/[^0-9]/gi, "")),
  1058. //有米数
  1059. haveMeter: 1,
  1060. isDisable: 1
  1061. };
  1062. } else {
  1063. var addmap = {
  1064. cxh: e.truckNo,
  1065. materialName: e.materialName,
  1066. Specification: e.Specification,
  1067. materialCode: e.materialCode,
  1068. orderPlanWeight: e.materialNumber,
  1069. meterNumber: e.steelMeters,
  1070. isPound: e.isPoundSale,
  1071. saleShipperAddressId: e.shipperAddressId,
  1072. place: e.place,
  1073. saleShipperAddressName: e.saleShipperAddressName + e.place,
  1074. saleDateOfReceipt: e.saleDateOfReceipt,
  1075. saleOrderConsigneeTel: e.saleOrderConsigneeTel,
  1076. materialId: e.materialId,
  1077. truckRemark: e.truckRemark,
  1078. haveMeter: haveMeter
  1079. };
  1080. }
  1081. this.selectionList.push(addmap);
  1082. });
  1083. //调用记录每一行的合并数的方法
  1084. this.getSpanArr(this.selectionList);
  1085. //确定有多少车序号
  1086. this.spanArr.forEach(item => {
  1087. if (item > 0) {
  1088. //最大车序号加1
  1089. this.maxCxh += 1;
  1090. }
  1091. });
  1092. });
  1093. },
  1094. //获取所有的业务员数据
  1095. getAllsaleMan() {
  1096. this.axios.get("/api/v1/uc/getSalerList").then(res => {
  1097. this.saleMans = res.data.data;
  1098. });
  1099. },
  1100. //获取所有省数据
  1101. getAllProvince() {
  1102. this.axios.post("/api/v1/uc/getAllProvince").then(res => {
  1103. this.provinceList = res.data.data;
  1104. });
  1105. },
  1106. //省改变
  1107. onchangeProvince() {
  1108. this.axios
  1109. .post(
  1110. "/api/v1/uc/getDistrictByProvince?addressProvince=" + this.province
  1111. )
  1112. .then(res => {
  1113. this.cityList = res.data.data;
  1114. });
  1115. },
  1116. //市改变
  1117. onchangeCity() {
  1118. this.axios
  1119. .post("/api/v1/uc/getTownByDistrict?addressDistrict=" + this.city)
  1120. .then(res => {
  1121. this.countyList = res.data.data;
  1122. });
  1123. },
  1124. //县(区)改变
  1125. onchangeCounty() {
  1126. let mapValue = {
  1127. addressProvince: this.province,
  1128. addressDistrict: this.city,
  1129. addressTown: this.county
  1130. };
  1131. this.axios.post("/api/v1/uc/getPlaceByAllAddress", mapValue).then(res => {
  1132. this.addressId = res.data.data[0].addressId;
  1133. });
  1134. },
  1135. //发货单位弹出层
  1136. handleSelectCarrier(item) {
  1137. this.shipperName = item.shipperName;
  1138. this.shipperId = item.shipperId;
  1139. },
  1140. //以下是发货单位边输边查搜索
  1141. querySearchCarrier(queryString, cb) {
  1142. this.axios
  1143. .post("/api/v1/uc/getRequireUnitName?index=" + queryString)
  1144. .then(res => {
  1145. if (res.data.code == "200") {
  1146. var restaurantsCarrier = res.data.data;
  1147. var results = queryString
  1148. ? restaurantsCarrier.filter(this.createFilterCarrier(queryString))
  1149. : restaurantsCarrier;
  1150. // 调用 callback 返回建议列表的数据
  1151. cb(results);
  1152. }
  1153. });
  1154. },
  1155. createFilterCarrier(queryString) {
  1156. return restaurantsCarrier => {
  1157. return (
  1158. restaurantsCarrier.shipperName
  1159. .toLowerCase()
  1160. .indexOf(queryString.toLowerCase()) > -1
  1161. );
  1162. };
  1163. },
  1164. //以上是发货单位边输边查搜索
  1165. //下单客户弹出层
  1166. handleSelectConsignee(item) {
  1167. this.consigneeName = item.consigneeCompanyName;
  1168. this.consigneeId = item.consigneeId;
  1169. //带出摘要
  1170. this.axios
  1171. .post("/api/v1/uc/getSaleArea?receiveId=" + this.consigneeId)
  1172. .then(res => {
  1173. this.remarks = res.data.data;
  1174. });
  1175. this.axios
  1176. .post(
  1177. "/api/v1/ams/matchingAddressRecently?receiveId=" + this.consigneeId
  1178. )
  1179. .then(res => {
  1180. const place = res.data.data;
  1181. console.log(place);
  1182. this.saleShipperAddressName =
  1183. place[0].addressProvince +
  1184. place[0].addressDistrict +
  1185. place[0].addressTown +
  1186. place[0].place;
  1187. this.saleShipperAddressId = place[0].shipperAddressId;
  1188. this.place1 = place[0].place;
  1189. this.saleMan = place[0].salerId;
  1190. this.saleOrderConsigneeTel = place[0].saleOrderConsigneeTel;
  1191. });
  1192. },
  1193. //以下是下单客户边输边查搜索
  1194. querySearchConsignee(queryString, cb) {
  1195. this.axios
  1196. .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
  1197. .then(res => {
  1198. if (res.data.code == "200") {
  1199. var restaurantsConsignee = res.data.data;
  1200. var results = queryString
  1201. ? restaurantsConsignee.filter(
  1202. this.createFilterConsignee(queryString)
  1203. )
  1204. : restaurantsConsignee;
  1205. // 调用 callback 返回建议列表的数据
  1206. cb(results);
  1207. }
  1208. });
  1209. },
  1210. createFilterConsignee(queryString) {
  1211. return restaurantsConsignee => {
  1212. return (
  1213. restaurantsConsignee.value
  1214. .toLowerCase()
  1215. .indexOf(queryString.toLowerCase()) > -1
  1216. );
  1217. };
  1218. },
  1219. //以上是下单客户边输边查搜索
  1220. //新增物资
  1221. addMaterial() {
  1222. if (!this.shipperName) {
  1223. this.$message.warning("发货单位未填写!");
  1224. } else if (!this.consigneeName) {
  1225. this.$message.warning("下单客户未填写!");
  1226. } else if (!this.consigneeId) {
  1227. this.$message.error("请选择一个下单客户下拉框中的选项!");
  1228. } else if (!this.saleMan) {
  1229. this.$message.warning("业务员未选择!");
  1230. } else {
  1231. this.option.requestUrl =
  1232. "/api/v1/uc/getSteelMaterial?apiId=244&i=" + new Date();
  1233. this.table1 = true;
  1234. }
  1235. },
  1236. //返回选中的物资信息
  1237. selectionChange(selection) {
  1238. this.materialList1 = [];
  1239. this.materialList1 = selection;
  1240. },
  1241. //确认新增物资
  1242. makeSureMaterial() {
  1243. this.onblur();
  1244. //记录是理重还是磅重
  1245. var getisPound = 1;
  1246. this.materialList1.forEach(e => {
  1247. if (!e.materialSpecification) {
  1248. e.materialSpecification = "";
  1249. }
  1250. if (!e.materialModel) {
  1251. e.materialModel = "";
  1252. }
  1253. //判断物资是否为盘螺或非定尺
  1254. if (
  1255. e.materialName.includes("盘螺") ||
  1256. e.materialName.includes("乱尺") ||
  1257. e.materialName.includes("盘元") ||
  1258. e.materialName.includes("盘圆")
  1259. ) {
  1260. getisPound = 0;
  1261. } else {
  1262. getisPound = 1;
  1263. }
  1264. //若物资为带有盘螺、盘圆、盘元,默认无米数
  1265. if (
  1266. e.materialName.includes("盘螺") ||
  1267. e.materialName.includes("盘圆") ||
  1268. e.materialName.includes("盘元")
  1269. ) {
  1270. var addmap = {
  1271. materialName: e.materialName,
  1272. Specification: e.materialSpecification + e.materialModel,
  1273. materialCode: e.materialCode,
  1274. orderPlanWeight: null,
  1275. meterNumber: null,
  1276. isPound: getisPound,
  1277. //物资Id
  1278. materialId: e.materialId,
  1279. //无米数
  1280. haveMeter: 0
  1281. };
  1282. } else {
  1283. if (e.materialName.includes("米")) {
  1284. console.log(e.materialName.replace(/[^0-9]/gi, ""));
  1285. var addmap = {
  1286. materialName: e.materialName,
  1287. Specification: e.materialSpecification + e.materialModel,
  1288. materialCode: e.materialCode,
  1289. orderPlanWeight: null,
  1290. meterNumber: Number(e.materialName.replace(/[^0-9]/gi, "")),
  1291. isPound: getisPound,
  1292. //物资Id
  1293. materialId: e.materialId,
  1294. //有米数
  1295. haveMeter: 1,
  1296. isDisable: 1
  1297. };
  1298. } else {
  1299. var addmap = {
  1300. materialName: e.materialName,
  1301. Specification: e.materialSpecification + e.materialModel,
  1302. materialCode: e.materialCode,
  1303. orderPlanWeight: null,
  1304. meterNumber: null,
  1305. isPound: getisPound,
  1306. //物资Id
  1307. materialId: e.materialId,
  1308. //有米数
  1309. haveMeter: 1
  1310. };
  1311. }
  1312. }
  1313. this.materialList.push(addmap);
  1314. });
  1315. this.materialList1 = [];
  1316. this.table1 = false;
  1317. //初始化查询数据
  1318. (this.materialNameText = null),
  1319. (this.materialSpecificationText = null),
  1320. (this.materialModelText = null);
  1321. },
  1322. //删除物资行数据
  1323. deleteMaterialRow(index, rows) {
  1324. rows.splice(index, 1);
  1325. this.onblur();
  1326. },
  1327. //删除一车数据
  1328. deleteRow(index, rows) {
  1329. this.onblur();
  1330. //删除车序号相同的行
  1331. if (this.spanArr[index] == 1) {
  1332. //动态调整车序号
  1333. rows.forEach(e => {
  1334. if (rows[index].cxh < e.cxh) {
  1335. e.cxh -= 1;
  1336. }
  1337. });
  1338. //最大车序号减1
  1339. this.maxCxh -= 1;
  1340. }
  1341. rows.splice(index, 1);
  1342. //调用记录每一行的合并数的方法
  1343. this.getSpanArr(this.selectionList);
  1344. },
  1345. //准备生成部分订单
  1346. createACar() {
  1347. this.onblur();
  1348. let i = 0;
  1349. this.materialList.forEach(e => {
  1350. if (!/(^[1-9]\d*$)/.test(e.orderPlanWeight)) {
  1351. e.orderPlanWeight = null;
  1352. i++;
  1353. }
  1354. });
  1355. if (i != 0) {
  1356. this.$message.error("件数必填且请输入正整数");
  1357. return;
  1358. }
  1359. this.materialList.forEach(e => {
  1360. if (e.materialName.includes("定尺")) {
  1361. if (!e.meterNumber) {
  1362. i++;
  1363. }
  1364. }
  1365. });
  1366. if (i != 0) {
  1367. this.$message.error("定尺必须填写米数");
  1368. return;
  1369. }
  1370. if (
  1371. !this.saleOrderConsigneeTel &&
  1372. this.ignoreSaleOrderConsigneeTel == 0
  1373. ) {
  1374. this.$confirm(
  1375. "收货客户电话未填写会导致无法接收车辆发货短信, 是否继续?",
  1376. "提示",
  1377. {
  1378. confirmButtonText: "确定",
  1379. cancelButtonText: "取消",
  1380. type: "warning"
  1381. }
  1382. )
  1383. .then(() => {
  1384. this.ignoreSaleOrderConsigneeTel = 1;
  1385. this.addMaterialToSaleOrder();
  1386. })
  1387. .catch(() => {
  1388. this.$message.info("已取消!");
  1389. });
  1390. } else {
  1391. this.addMaterialToSaleOrder();
  1392. }
  1393. },
  1394. //添加物资到订单
  1395. addMaterialToSaleOrder() {
  1396. this.onblur();
  1397. if (this.materialList.length == 0) {
  1398. this.$message.warning("请至少为这一车添加一个物资!");
  1399. } else if (!this.saleShipperAddressName && this.values == "no") {
  1400. this.$message.warning("收货地址未填写!");
  1401. } else if (
  1402. this.materialList.length == 1 &&
  1403. this.materialList[0].carNumber != null
  1404. ) {
  1405. var eachOrderPlanWeight =
  1406. this.materialList[0].orderPlanWeight / this.materialList[0].carNumber;
  1407. if (isIntegerNumber(eachOrderPlanWeight)) {
  1408. var e = this.materialList[0];
  1409. for (var i = 0; i < this.materialList[0].carNumber; i++) {
  1410. var addmap = {
  1411. cxh: this.maxCxh,
  1412. materialName: e.materialName,
  1413. Specification: e.Specification,
  1414. materialCode: e.materialCode,
  1415. orderPlanWeight: eachOrderPlanWeight,
  1416. meterNumber: e.meterNumber,
  1417. isPound: e.isPound,
  1418. saleShipperAddressId: this.saleShipperAddressId,
  1419. place: this.place1,
  1420. saleShipperAddressName: this.saleShipperAddressName,
  1421. saleDateOfReceipt: this.saleDateOfReceipt,
  1422. saleOrderConsigneeTel: this.saleOrderConsigneeTel,
  1423. truckRemark: this.truckRemark,
  1424. materialId: e.materialId,
  1425. haveMeter: e.haveMeter,
  1426. isDisable: e.isDisable
  1427. };
  1428. this.selectionList.push(addmap);
  1429. //最大车序号加1
  1430. this.maxCxh += 1;
  1431. }
  1432. //清空materialList
  1433. this.materialList = [];
  1434. //调用记录每一行的合并数的方法
  1435. this.getSpanArr(this.selectionList);
  1436. } else {
  1437. this.$message.warning("分配件数不是整数!");
  1438. }
  1439. } else {
  1440. this.materialList.forEach(e => {
  1441. var addmap = {
  1442. cxh: this.maxCxh,
  1443. materialName: e.materialName,
  1444. Specification: e.Specification,
  1445. materialCode: e.materialCode,
  1446. orderPlanWeight: e.orderPlanWeight,
  1447. meterNumber: e.meterNumber,
  1448. isPound: e.isPound,
  1449. saleShipperAddressId: this.saleShipperAddressId,
  1450. place: this.place1,
  1451. saleShipperAddressName: this.saleShipperAddressName,
  1452. saleDateOfReceipt: this.saleDateOfReceipt,
  1453. saleOrderConsigneeTel: this.saleOrderConsigneeTel,
  1454. truckRemark: this.truckRemark,
  1455. materialId: e.materialId,
  1456. haveMeter: e.haveMeter,
  1457. isDisable: e.isDisable
  1458. };
  1459. this.selectionList.push(addmap);
  1460. });
  1461. //清空materialList
  1462. this.materialList = [];
  1463. //最大车序号加1
  1464. this.maxCxh += 1;
  1465. //调用记录每一行的合并数的方法
  1466. this.getSpanArr(this.selectionList);
  1467. }
  1468. },
  1469. // 添加物资到某个车序号
  1470. addToCxh() {
  1471. this.onblur();
  1472. console.log("wkk");
  1473. if (!this.toCxh) {
  1474. this.$message.warning("请先在左侧输入要添加物资的车序号!");
  1475. } else {
  1476. this.addMaterialToCxh(this.toCxh);
  1477. }
  1478. },
  1479. //添加物资到某个车序号
  1480. addMaterialToCxh(toCxh) {
  1481. this.onblur();
  1482. let i = 0;
  1483. this.materialList.forEach(e => {
  1484. if (!/(^[1-9]\d*$)/.test(e.orderPlanWeight)) {
  1485. e.orderPlanWeight = null;
  1486. i++;
  1487. }
  1488. });
  1489. if (i != 0) {
  1490. this.$message.error("件数必填且请输入正整数");
  1491. return;
  1492. }
  1493. this.materialList.forEach(e => {
  1494. if (e.materialName.includes("定尺")) {
  1495. if (!e.meterNumber) {
  1496. i++;
  1497. }
  1498. }
  1499. });
  1500. if (i != 0) {
  1501. this.$message.error("定尺必须填写米数");
  1502. return;
  1503. }
  1504. if (this.materialList.length == 0) {
  1505. this.$message.warning("请至少为这车序号添加一个物资!");
  1506. } else {
  1507. //保存当前车序号数据
  1508. var arr = this.selectionList;
  1509. //清空原车序号数据
  1510. this.selectionList = [];
  1511. //记录是否已经执行了新增物资插入操作
  1512. var alreadyAdd = 0;
  1513. //获取新增物资应当插入的位置并插入
  1514. arr.forEach((item, index) => {
  1515. if (item.cxh <= toCxh) {
  1516. //插入到新增物资之前
  1517. this.selectionList.push(item);
  1518. } else {
  1519. //插入新增物资
  1520. if (alreadyAdd == 0) {
  1521. this.materialList.forEach(e => {
  1522. var addmap = {
  1523. cxh: this.selectionList[index - 1].cxh,
  1524. materialName: e.materialName,
  1525. Specification: e.Specification,
  1526. materialCode: e.materialCode,
  1527. orderPlanWeight: e.orderPlanWeight,
  1528. meterNumber: e.meterNumber,
  1529. isPound: e.isPound,
  1530. saleShipperAddressId: this.selectionList[index - 1]
  1531. .saleShipperAddressId,
  1532. place: this.selectionList[index - 1].place,
  1533. saleShipperAddressName: this.selectionList[index - 1]
  1534. .saleShipperAddressName,
  1535. saleDateOfReceipt: this.selectionList[index - 1]
  1536. .saleDateOfReceipt,
  1537. saleOrderConsigneeTel: this.selectionList[index - 1]
  1538. .saleOrderConsigneeTel,
  1539. materialId: e.materialId,
  1540. haveMeter: e.haveMeter,
  1541. isDisable: e.isDisable
  1542. };
  1543. this.selectionList.push(addmap);
  1544. });
  1545. //清空materialList
  1546. this.materialList = [];
  1547. //设定为已经执行了车序号物资新增操作
  1548. alreadyAdd = 1;
  1549. }
  1550. //插入到新增物资之后
  1551. this.selectionList.push(item);
  1552. }
  1553. });
  1554. //若添加的车序号为最后一个车序号
  1555. if (alreadyAdd == 0) {
  1556. //插入新增物资
  1557. console.log("1345wjj");
  1558. this.materialList.forEach(e => {
  1559. var addmap = {
  1560. cxh: arr[this.selectionList.length - 1].cxh,
  1561. materialName: e.materialName,
  1562. Specification: e.Specification,
  1563. materialCode: e.materialCode,
  1564. orderPlanWeight: e.orderPlanWeight,
  1565. meterNumber: e.meterNumber,
  1566. isPound: e.isPound,
  1567. saleShipperAddressId:
  1568. arr[this.selectionList.length - 1].saleShipperAddressId,
  1569. place: arr[this.selectionList.length - 1].place,
  1570. saleShipperAddressName:
  1571. arr[this.selectionList.length - 1].saleShipperAddressName,
  1572. saleDateOfReceipt:
  1573. arr[this.selectionList.length - 1].saleDateOfReceipt,
  1574. saleOrderConsigneeTel:
  1575. arr[this.selectionList.length - 1].saleOrderConsigneeTel,
  1576. materialId: e.materialId,
  1577. haveMeter: e.haveMeter,
  1578. isDisable: e.isDisable
  1579. };
  1580. this.selectionList.push(addmap);
  1581. });
  1582. //清空materialList
  1583. this.materialList = [];
  1584. }
  1585. //调用记录每一行的合并数的方法
  1586. this.getSpanArr(this.selectionList);
  1587. }
  1588. },
  1589. //更改行物资
  1590. changeMaterial(index) {
  1591. this.option1.requestUrl =
  1592. "/api/v1/uc/getSteelMaterial?apiId=244&i=" + new Date();
  1593. this.drawer = true;
  1594. this.isOpenDrawer = 1;
  1595. this.indexChangeMaterial = index;
  1596. },
  1597. //关闭更改行物资
  1598. closeChangeMaterial() {
  1599. this.drawer = false;
  1600. this.isOpenDrawer = 0;
  1601. this.$message.info("取消更改!");
  1602. },
  1603. //单选一行物资
  1604. currentRadioChange(row) {
  1605. this.selectedMaterialId = row.materialId;
  1606. this.selectedMaterialName = row.materialName;
  1607. this.selectedMaterialSpecification = row.materialSpecification;
  1608. this.selectedMaterialModel = row.materialModel;
  1609. this.selectedMaterialCode = row.materialCode;
  1610. },
  1611. //确认物资修改
  1612. makeSureChange() {
  1613. this.onblur();
  1614. if (!this.selectedMaterialId) {
  1615. this.$message.warning("请先选择一个物资!");
  1616. } else {
  1617. if (!this.selectedMaterialSpecification) {
  1618. this.selectedMaterialSpecification = "";
  1619. }
  1620. if (!this.selectedMaterialModel) {
  1621. this.selectedMaterialModel = "";
  1622. }
  1623. //记录是理重还是磅重
  1624. var getisPound = 1;
  1625. //判断物资是否为盘螺或非定尺
  1626. if (
  1627. this.selectedMaterialName.includes("盘螺") ||
  1628. this.selectedMaterialName.includes("乱尺") ||
  1629. this.selectedMaterialName.includes("盘元") ||
  1630. this.selectedMaterialName.includes("盘圆")
  1631. ) {
  1632. getisPound = 0;
  1633. } else {
  1634. getisPound = 1;
  1635. }
  1636. this.selectionList[
  1637. this.indexChangeMaterial
  1638. ].materialId = this.selectedMaterialId;
  1639. this.selectionList[
  1640. this.indexChangeMaterial
  1641. ].materialName = this.selectedMaterialName;
  1642. this.selectionList[this.indexChangeMaterial].Specification =
  1643. this.selectedMaterialSpecification + this.selectedMaterialModel;
  1644. this.selectionList[
  1645. this.indexChangeMaterial
  1646. ].materialCode = this.selectedMaterialModel;
  1647. this.selectionList[this.indexChangeMaterial].isPound = getisPound;
  1648. //确定更改的物资有无米数
  1649. if (
  1650. this.selectedMaterialName.includes("盘螺") ||
  1651. this.selectedMaterialName.includes("盘圆") ||
  1652. this.selectedMaterialName.includes("盘元")
  1653. ) {
  1654. this.selectionList[this.indexChangeMaterial].haveMeter = 0;
  1655. this.selectionList[this.indexChangeMaterial].meterNumber = null;
  1656. } else {
  1657. this.selectionList[this.indexChangeMaterial].haveMeter = 1;
  1658. }
  1659. //重新初始化
  1660. this.indexChangeMaterial = null;
  1661. this.selectedMaterialId = null;
  1662. this.selectedMaterialName = null;
  1663. this.selectedMaterialSpecification = null;
  1664. this.selectedMaterialModel = null;
  1665. this.selectedMaterialCode = null;
  1666. //关闭弹出框
  1667. this.drawer = false;
  1668. this.isOpenDrawer = 0;
  1669. //初始化查询数据
  1670. (this.materialNameText = null),
  1671. (this.materialSpecificationText = null),
  1672. (this.materialModelText = null);
  1673. this.$message.success("成功更改!");
  1674. }
  1675. },
  1676. //记录每一行的合并数
  1677. getSpanArr(data) {
  1678. //每次调用方法初始化
  1679. this.spanArr = [];
  1680. for (var i = 0; i < data.length; i++) {
  1681. if (i === 0) {
  1682. this.spanArr.push(1);
  1683. this.pos = 0;
  1684. } else {
  1685. // 判断当前元素与上一个元素是否相同
  1686. if (data[i].cxh === data[i - 1].cxh) {
  1687. this.spanArr[this.pos] += 1;
  1688. this.spanArr.push(0);
  1689. } else {
  1690. this.spanArr.push(1);
  1691. this.pos = i;
  1692. }
  1693. }
  1694. }
  1695. },
  1696. //根据条件合并行
  1697. cellMerge({ row, column, rowIndex, columnIndex }) {
  1698. if (columnIndex === 0) {
  1699. const _row = this.spanArr[rowIndex];
  1700. const _col = _row > 0 ? 1 : 0;
  1701. return {
  1702. rowspan: _row,
  1703. colspan: _col
  1704. };
  1705. }
  1706. if (columnIndex === 6) {
  1707. const _row = this.spanArr[rowIndex];
  1708. const _col = _row > 0 ? 1 : 0;
  1709. return {
  1710. rowspan: _row,
  1711. colspan: _col
  1712. };
  1713. }
  1714. if (columnIndex === 7) {
  1715. const _row = this.spanArr[rowIndex];
  1716. const _col = _row > 0 ? 1 : 0;
  1717. return {
  1718. rowspan: _row,
  1719. colspan: _col
  1720. };
  1721. }
  1722. if (columnIndex === 8) {
  1723. const _row = this.spanArr[rowIndex];
  1724. const _col = _row > 0 ? 1 : 0;
  1725. return {
  1726. rowspan: _row,
  1727. colspan: _col
  1728. };
  1729. }
  1730. if (columnIndex === 10) {
  1731. const _row = this.spanArr[rowIndex];
  1732. const _col = _row > 0 ? 1 : 0;
  1733. return {
  1734. rowspan: _row,
  1735. colspan: _col
  1736. };
  1737. }
  1738. },
  1739. //点击外层收货地址浏览事件
  1740. ondrawerOut() {
  1741. if (this.inOrOut % 2 == 0) {
  1742. this.inOrOut += 1;
  1743. }
  1744. this.frist.requestUrl =
  1745. "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
  1746. this.drawer1 = true;
  1747. },
  1748. //点击内层收货地址浏览事件
  1749. ondrawer(row, index) {
  1750. if (this.inOrOut % 2 == 1) {
  1751. this.inOrOut += 1;
  1752. }
  1753. this.row = row;
  1754. this.row.index = index;
  1755. this.frist.requestUrl =
  1756. "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
  1757. this.drawer1 = true;
  1758. },
  1759. //查询全国省市县
  1760. selectAddresClick() {
  1761. if (this.addresText) {
  1762. this.frist.requestUrl =
  1763. "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
  1764. this.addresText;
  1765. } else {
  1766. this.frist.requestUrl =
  1767. "/api/v1/ams/getAddressDeliveryAddress?apiId=255&i=" + new Date();
  1768. }
  1769. },
  1770. //收货地址弹出层
  1771. handleSelect1(item) {
  1772. console.log("获取所有下拉值!");
  1773. },
  1774. //以下是收货地址边输边查搜索
  1775. querySearch1(queryString, cb) {
  1776. this.axios
  1777. .post(
  1778. "/api/v1/ams/getRealAddressByLike?addressId=" +
  1779. this.addressId +
  1780. "&index=" +
  1781. queryString
  1782. )
  1783. .then(res => {
  1784. if (res.data.code == "200") {
  1785. var restaurants = res.data.data;
  1786. var results = queryString
  1787. ? restaurants.filter(this.createFilter1(queryString))
  1788. : restaurants;
  1789. // 调用 callback 返回建议列表的数据
  1790. cb(results);
  1791. }
  1792. });
  1793. },
  1794. createFilter1(queryString) {
  1795. return restaurants => {
  1796. return (
  1797. restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
  1798. -1
  1799. );
  1800. };
  1801. },
  1802. //以上是收货地址边输边查搜索
  1803. //监听收货地址模态框点击事件
  1804. currentRadioChange1(radioList) {
  1805. this.addressId = radioList.addressId;
  1806. this.address = radioList.address;
  1807. },
  1808. //确定收货地址事件
  1809. addAddressClick() {
  1810. if (this.inOrOut % 2 == 0) {
  1811. for (
  1812. var i = this.row.index;
  1813. i < this.spanArr[this.row.index] + this.row.index;
  1814. i++
  1815. ) {
  1816. this.selectionList[i].saleShipperAddressId = this.addressId;
  1817. this.selectionList[i].place = this.place;
  1818. this.selectionList[i].saleShipperAddressName =
  1819. this.province + this.city + this.county + this.place;
  1820. }
  1821. this.drawer1 = false;
  1822. } else {
  1823. this.saleShipperAddressId = this.addressId;
  1824. this.saleShipperAddressName =
  1825. this.province + this.city + this.county + this.place;
  1826. this.drawer1 = false;
  1827. }
  1828. //初始化
  1829. this.addressId = null;
  1830. this.province = null;
  1831. this.cityList = [];
  1832. this.city = null;
  1833. this.countyList = [];
  1834. this.county = null;
  1835. //暂存具体地址
  1836. this.place1 = this.place;
  1837. this.place = null;
  1838. this.addresText = null;
  1839. },
  1840. //批量修改内层值
  1841. batchUpdateValue(row, index) {
  1842. for (var i = index; i < this.spanArr[index] + index; i++) {
  1843. this.selectionList[i].saleOrderConsigneeTel = row.saleOrderConsigneeTel;
  1844. }
  1845. },
  1846. //物资模态框查询
  1847. onclick() {
  1848. if (this.isOpenDrawer == 0) {
  1849. this.option.requestUrl =
  1850. "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
  1851. this.materialNameText +
  1852. "&materialSpecificationText=" +
  1853. this.materialSpecificationText +
  1854. "&materialModelText=" +
  1855. this.materialModelText;
  1856. } else {
  1857. this.option1.requestUrl =
  1858. "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
  1859. this.materialNameText +
  1860. "&materialSpecificationText=" +
  1861. this.materialSpecificationText +
  1862. "&materialModelText=" +
  1863. this.materialModelText;
  1864. }
  1865. },
  1866. // 确定
  1867. makeSure() {
  1868. if (this.selectionList.length == 0) {
  1869. this.$message.warning("请先填写具体信息");
  1870. return;
  1871. }
  1872. let i = 0;
  1873. this.selectionList.forEach(e => {
  1874. if (!/(^[1-9]\d*$)/.test(e.orderPlanWeight)) {
  1875. e.orderPlanWeight = null;
  1876. i++;
  1877. }
  1878. });
  1879. if (i != 0) {
  1880. this.$message.error("件数必填且请输入正整数");
  1881. return;
  1882. }
  1883. this.selectionList.forEach(e => {
  1884. if (e.materialName.includes("定尺")) {
  1885. if (!e.meterNumber) {
  1886. i++;
  1887. }
  1888. }
  1889. });
  1890. if (i != 0) {
  1891. this.$message.error("定尺必须填写米数");
  1892. return;
  1893. }
  1894. //获取是否自提字段
  1895. this.options.forEach(e => {
  1896. if (this.values == e.values) {
  1897. this.saleOrderIsselfMention = e.label;
  1898. }
  1899. });
  1900. //获取收款公司字段
  1901. this.receivingCompany.forEach(f => {
  1902. if (this.values1 == f.values1) {
  1903. this.saleOrderReceiveCustomer = f.label1;
  1904. }
  1905. });
  1906. //获取业务员姓名
  1907. this.saleMans.forEach(g => {
  1908. if (this.saleMan == g.value) {
  1909. this.saleManText = g.label;
  1910. }
  1911. });
  1912. this.orderMakeSure = true;
  1913. },
  1914. //发送请求
  1915. sendRequest() {
  1916. //先调删除订单接口
  1917. this.axios
  1918. .post(
  1919. "/api/v1/ams/deleteSaleOrderById?saleOrderId=" +
  1920. this.$route.params.saleOrderId
  1921. )
  1922. .then(res => {
  1923. if (res.data.code == "200") {
  1924. this.orderMakeSure = false;
  1925. //是否还有件数未填写
  1926. var orderPlanWeightAllFill = 0;
  1927. //初始化maplist
  1928. var mapList = [];
  1929. console.log(this.selectionList);
  1930. this.selectionList.forEach(item => {
  1931. if (!item.orderPlanWeight) {
  1932. orderPlanWeightAllFill++;
  1933. }
  1934. //初始化mapItem
  1935. var mapItem = {
  1936. //车序号
  1937. truckNo: 0,
  1938. //省市县id
  1939. shipperAddressId: 0,
  1940. //具体地址
  1941. place: null,
  1942. //截止日期
  1943. saleDateOfReceipt: null,
  1944. //收货方电话
  1945. saleOrderConsigneeTel: "",
  1946. //车序号物资ID
  1947. materialId: 0,
  1948. //物资件数
  1949. materialNumber: 0,
  1950. //米数
  1951. steelMeters: 0,
  1952. //是否磅重销售
  1953. isPoundSale: 0,
  1954. truckRemark: null
  1955. };
  1956. mapItem.truckNo = item.cxh;
  1957. mapItem.shipperAddressId = item.saleShipperAddressId;
  1958. mapItem.place = item.place;
  1959. mapItem.saleDateOfReceipt = sjTime(item.saleDateOfReceipt);
  1960. mapItem.saleOrderConsigneeTel = item.saleOrderConsigneeTel;
  1961. mapItem.materialId = item.materialId;
  1962. mapItem.materialNumber = item.orderPlanWeight;
  1963. mapItem.steelMeters = item.meterNumber;
  1964. mapItem.isPoundSale = item.isPound;
  1965. mapItem.truckRemark = item.truckRemark;
  1966. mapList.push(mapItem);
  1967. });
  1968. let mapValue = {
  1969. shipperId: this.shipperId,
  1970. receiveId: this.consigneeId,
  1971. isSelfMention: this.saleOrderIsselfMention,
  1972. saleOrderReceiveCustomer: this.saleOrderReceiveCustomer,
  1973. salerId: this.saleMan,
  1974. saleRemark: this.remarks,
  1975. mapList: mapList
  1976. };
  1977. //所有列件数都填写
  1978. if (orderPlanWeightAllFill == 0) {
  1979. this.axios
  1980. .post("/api/v1/ams/addSteelSaleOrder", mapValue)
  1981. .then(res => {
  1982. if (res.data.code == "200") {
  1983. this.$router.go(-1);
  1984. }
  1985. this.$message.success("修改订单成功!");
  1986. });
  1987. } else {
  1988. this.$message.error("还有物资件数未填写!");
  1989. }
  1990. } else {
  1991. this.$message.error("修改订单失败,请联系管理员!");
  1992. }
  1993. });
  1994. },
  1995. // 取消
  1996. cancel() {
  1997. this.$router.go(-1);
  1998. },
  1999. //关闭事件
  2000. handleClose(done) {
  2001. this.$confirm("确认关闭?")
  2002. .then(_ => {
  2003. done();
  2004. })
  2005. .catch(_ => {});
  2006. },
  2007. CloseClick() {}
  2008. }
  2009. };
  2010. </script>
  2011. <style lang="scss" scoped>
  2012. .addSalePlan {
  2013. width: 100%;
  2014. }
  2015. .el-drawer__body {
  2016. overflow: auto;
  2017. }
  2018. .el-drawer__container ::-webkit-scrollbar {
  2019. display: none;
  2020. }
  2021. .form-box,
  2022. .from {
  2023. display: flex;
  2024. align-items: center;
  2025. justify-content: center;
  2026. margin-top: 5px;
  2027. margin-bottom: 20px;
  2028. }
  2029. .button-box {
  2030. display: flex;
  2031. text-align: center;
  2032. align-items: center;
  2033. justify-content: center;
  2034. margin-top: 0.3125rem;
  2035. margin-bottom: 1.25rem;
  2036. }
  2037. .select {
  2038. margin-left: -10rem;
  2039. }
  2040. .demo-form-inline {
  2041. margin-left: 2rem;
  2042. }
  2043. .table_form {
  2044. margin-left: -16rem;
  2045. }
  2046. .textinput111 {
  2047. width: 83px;
  2048. }
  2049. .textinput {
  2050. width: 50px;
  2051. }
  2052. .textinput1 {
  2053. width: 50px;
  2054. text-align: center;
  2055. size: small;
  2056. }
  2057. .textinput2 {
  2058. width: 50px;
  2059. margin-right: 30px;
  2060. }
  2061. .textinput3 {
  2062. width: 190px;
  2063. }
  2064. .textinput4 {
  2065. width: 60px;
  2066. }
  2067. .textinput5 {
  2068. width: 120px;
  2069. }
  2070. </style>