detail.vue 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055
  1. <template>
  2. <div style="overflow: auto;padding-bottom: 6.6rem;box-sizing: border-box;">
  3. <div >
  4. <div class="home_header">发货</div>
  5. <div class="home_header_line"></div>
  6. <div class="home_con_body">
  7. <div class="home_con_s">
  8. <div v-if="is_show" class="pack_up">
  9. <img @click="handleShow" src="../../../assets/home/collect.png" alt="">
  10. </div>
  11. <div v-if="!is_show" :class="!is_show ? 'pack_up_d' : ''" class="pack_up" style="display: flex;gap: .3125rem;" @click="handleShow">
  12. <div style="font-size: 0.88rem;
  13. color: #ABDFFF;">展开</div>
  14. <img style="width: 0.41rem;height: 0.69rem;" src="../../../assets/home/zk.png" alt="">
  15. </div>
  16. <div v-if="is_show" class="pack_up_con">
  17. <p class="pack_up_name">{{name}}</p>
  18. <div class="pack_up_grid">
  19. <div>
  20. <p>预发总数</p>
  21. <div><span>{{ total_num }}</span><span>张</span></div>
  22. </div>
  23. <div>
  24. <p>已扫总数</p>
  25. <div><span>{{ scan_num }}</span><span>张</span></div>
  26. </div>
  27. <div>
  28. <p>未扫总数</p>
  29. <div><span>{{ total_num - scan_num }}</span><span>张</span></div>
  30. </div>
  31. <div @click="handleErrorShow">
  32. <p>异常总数</p>
  33. <div><span style="color:red !important;">{{error_num}}</span><span>张</span></div>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="send_work" v-if="tableData.length > 0" v-for="(item, index) in tableData" :key="index">
  39. <!-- <div class="check_box">-->
  40. <!-- <div @click="handleChoose(item, index)" :class="item.is_choose ? 'check_box_c_active' : 'check_box_c'">-->
  41. <!-- </div>-->
  42. <!-- </div>-->
  43. <div class="secd_flex" style="margin-top: .8rem">
  44. <div class="secd_title">
  45. <span>发货单号:</span><span> {{ data.data.exe_delivery_note_b.no }}</span>
  46. </div>
  47. <span class="secd_title_d">{{ item.material_name }}</span>
  48. <div class="secd_g"><span>规格型号:</span><span>{{ item.specs }}</span></div>
  49. <div class="secd_flex_w">
  50. <div class="secd_flex_s">
  51. <span>已扫到数量:</span>
  52. <span>{{ item.out_qty }}张</span>
  53. </div>
  54. <div class="secd_flex_s">
  55. <span>未发货数量:</span>
  56. <span>{{ item.this_delivery_qty }}张</span>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <div v-if="tableData.length == 0"
  62. style="display: flex;width: 100%;height: 10rem;justify-content: center;align-items: center;">
  63. <Spin size="small" />
  64. <Spin />
  65. <Spin size="small" />
  66. </div>
  67. <div class="footer">
  68. <div class="return_btn" @click="handleReturn">返回</div>
  69. <div class="confirm_btn" @click="handleSureClick">确认</div>
  70. </div>
  71. </div>
  72. </div>
  73. <Modal
  74. v-model="is_error"
  75. width="80"
  76. footer-hide
  77. :closable="false"
  78. :mask-closable="false"
  79. >
  80. <div style="font-size: 1.2rem; font-weight: bold;">异常数据</div>
  81. <div style="height: 50vh;overflow: auto">
  82. <Form v-for="(item,index) in error_data" :key="index" :label-width="120" style="width:100%;background-color: rgba(79,97,201,0.21);border-radius: 1rem;margin: .7rem 0">
  83. <FormItem label="包装单号:" style="margin-bottom: .2rem !important;">
  84. <span>{{item.box_no}}</span>
  85. </FormItem>
  86. <FormItem label="订单号:" style="margin-bottom: .2rem !important;">
  87. <span>{{item.order_no}}</span>
  88. </FormItem>
  89. <FormItem label="客户名称:" style="margin-bottom: .2rem !important;">
  90. <span>{{item.box_detail.customer_name}}</span>
  91. </FormItem>
  92. <FormItem label="产品名称:" style="margin-bottom: .2rem !important;">
  93. <span>{{item.box_detail.product_title}}</span>
  94. </FormItem>
  95. <FormItem label="规格型号:" style="margin-bottom: .2rem !important;">
  96. <span>{{item.box_detail.product_size}}</span>
  97. </FormItem>
  98. <FormItem label="包装数量:" style="margin-bottom: 0">
  99. <span>{{item.box_num}}</span>
  100. </FormItem>
  101. </Form>
  102. </div>
  103. <div style="text-align: center">
  104. <Button
  105. style="margin-left: 1rem"
  106. type="primary"
  107. @click="is_error = false"
  108. >返回</Button
  109. >
  110. </div>
  111. </Modal>
  112. <Modal
  113. v-model="is_modal"
  114. width="80"
  115. footer-hide
  116. :closable="false"
  117. :mask-closable="false"
  118. >
  119. <div style="font-size: 1.2rem; font-weight: bold">物流信息</div>
  120. <Form :label-width="120">
  121. <FormItem label="司机姓名:">
  122. <Input v-model="modalData.carrier" clearable placeholder="请输入司机姓名"/>
  123. </FormItem>
  124. <FormItem label="司机联系电话:">
  125. <Input v-model="modalData.carrier_phone" clearable placeholder="请输入司机联系电话"/>
  126. </FormItem>
  127. <FormItem label="车牌号码:">
  128. <Input clearable placeholder="请输入车牌号码" v-model="modalData.plate_no"/>
  129. </FormItem>
  130. <FormItem label="司机身份证号码:">
  131. <Input clearable placeholder="请输入司机身份证号码" v-model="modalData.id_number"/>
  132. </FormItem>
  133. <FormItem label="附件">
  134. <div class="total_img">
  135. <div class="img_content" v-for="(item,index) in modalData.attachment.attachFile" :key="index">
  136. <div>{{item.name}}</div>
  137. <Icon
  138. size="20"
  139. @click="handleDelet(index)"
  140. class="delete-img"
  141. type="ios-close-circle"
  142. />
  143. </div>
  144. <Upload
  145. multiple
  146. :headers="headers"
  147. v-show="modalData.attachment.attachFile.length!=3"
  148. :show-upload-list="false"
  149. :on-success="(res, file) => handleSuccess(res, file)"
  150. :before-upload="handleError"
  151. :data="imgData"
  152. :action="$store.state.ip + '/api/upload'"
  153. >
  154. <div class="upd_file">
  155. <Icon type="ios-cloud-upload-outline" class="ico" size="30" />
  156. </div>
  157. </Upload>
  158. </div>
  159. </FormItem>
  160. </Form>
  161. <div style="text-align: center">
  162. <Button
  163. style="margin-right: 1rem"
  164. type="error"
  165. @click="is_modal = false"
  166. >取消</Button
  167. >
  168. <Button
  169. style="margin-left: 1rem"
  170. type="primary"
  171. @click="handelGoSure"
  172. >确认</Button
  173. >
  174. </div>
  175. </Modal>
  176. </div>
  177. <!-- <div>
  178. <div class="header">
  179. <div class="header_top">
  180. <Button type="primary" class="header_btn" ghost @click="handleShow"
  181. :icon="is_show ? 'ios-arrow-dropup' : 'ios-arrow-dropdown'">
  182. <div style="margin-right: 0.6rem">
  183. {{ is_show ? "收起" : "展开" }}
  184. </div>
  185. </Button>
  186. <div style="margin-right: 1rem; color: #66a9f0">王小伟</div>
  187. </div>
  188. <div class="header_middle">
  189. <b-dropdown size="sm" text="产品总数" class="m-2" :disabled="is_use">
  190. <b-dropdown-item-button>Action</b-dropdown-item-button>
  191. <b-dropdown-item-button>Another action</b-dropdown-item-button>
  192. <b-dropdown-item-button>Something else here</b-dropdown-item-button>
  193. </b-dropdown>
  194. <b-dropdown size="sm" text="已扫总数" class="m-2" :disabled="is_use">
  195. <b-dropdown-item-button>Action</b-dropdown-item-button>
  196. <b-dropdown-item-button>Another action</b-dropdown-item-button>
  197. <b-dropdown-item-button>Something else here</b-dropdown-item-button>
  198. </b-dropdown>
  199. <b-dropdown size="sm" text="未扫总数" class="m-2" :disabled="is_use">
  200. <b-dropdown-item-button>Action</b-dropdown-item-button>
  201. <b-dropdown-item-button>Another action</b-dropdown-item-button>
  202. <b-dropdown-item-button>Something else here</b-dropdown-item-button>
  203. </b-dropdown>
  204. </div>
  205. <div class="header_middle1 ot">
  206. <div class="ft">{{ total_num }} &nbsp;</div>
  207. <div class="ft">{{ scan_num }} &nbsp;</div>
  208. <div class="ft">{{ total_num - scan_num }} &nbsp;</div>
  209. </div>
  210. <div class="header_footer">
  211. <div style="margin-left: 1rem">已发货{{ transport_total }}</div>
  212. </div>
  213. </div>
  214. <div class="bdy">
  215. <table>
  216. <tr style="height: 2rem">
  217. <th style="width: 3rem">销售单号</th>
  218. <th style="width: 4rem">产品名称</th>
  219. <th style="width: 3rem">规格型号</th>
  220. <th style="width: 3rem">已扫到数量</th>
  221. <th style="width: 3rem">未发货数量</th>
  222. </tr>
  223. <tr v-for="(item, index) in tableData" :key="index" @click="handleChoose(item, index)">
  224. <td>
  225. {{ item.bus_no }}
  226. </td>
  227. <td>{{ item.product_title }}</td>
  228. <td>{{ item.product_size }}</td>
  229. <td>{{ item.out_qty }}</td>
  230. <td>{{ item.this_delivery_qty - item.out_qty }}</td>
  231. </tr>
  232. </table>
  233. </div>
  234. <div class="footer">
  235. <Button type="primary" class="header_btn" style="margin-right: 3rem; height: 2.6rem" @click="handleReturn">
  236. 返回</Button>
  237. <Button type="primary" class="header_btn" style="margin-left: 3rem; height: 2.6rem" @click="handelGoSure">
  238. 确认</Button>
  239. </div>
  240. </div> -->
  241. </template>
  242. <script>
  243. export default {
  244. data () {
  245. return {
  246. imgData: {
  247. url: 'http://122.112.250.253:7774/jbl/api/file/upload',
  248. header:[]
  249. },
  250. headers: {},
  251. modalData: {
  252. carrier: '',
  253. carrier_phone: '',
  254. plate_no: '',
  255. id_number: '',
  256. attachment:{
  257. attachFile:[]
  258. }
  259. },
  260. is_modal: false,
  261. name: '',
  262. error_num:0,
  263. employee_code: '',
  264. tableData: [],
  265. key_tableData: {},
  266. send_goods_out: {},
  267. data: {},
  268. send_goods_out_product: {},
  269. is_show: true,
  270. is_use: false,
  271. total_num: 0,
  272. scan_num: 0,
  273. saveData: 0,
  274. detail: {},
  275. transport_total: 0,
  276. scan_data: [],
  277. new_table_data: [],
  278. state: true,
  279. is_error: false,
  280. error_data:[],
  281. text1:[]
  282. }
  283. },
  284. mounted() {
  285. const token = localStorage.getItem('token')
  286. const site = JSON.parse(localStorage.getItem('site'))
  287. this.imgData.header = [`Authorization:Bearer ${token}`, 'Content-Type:application/json', `Site:${site.site}`]
  288. this.name=JSON.parse(localStorage.getItem('userDto')).name
  289. this.employee_code = JSON.parse(localStorage.getItem('userDto')).mark1Code
  290. // if (localStorage.getItem('fyy_target')) {
  291. // data.target = JSON.parse(localStorage.getItem('fyy_target'))
  292. // }
  293. this.handleShow()
  294. this.tableData = []
  295. const id = this.$route.query.id
  296. const data = {
  297. url: `http://122.112.250.253:7774/jbl/api/module-data/delivery_note/delivery_note/478838363726815232/${id}`
  298. // post: {"direction":"DESC","property":"id","fromClientType":"pc","number":0,"sorts":[],"rules":[{"field":"dispatch_orders.dispatch_no","option":"LIKE_ANYWHERE","values":[v]},{"field":"product_no","option":"LIKE_ANYWHERE","values":["BC030101000001"]}],"size":15,"specialConditions":[],"workflowSearchBean":{},"dynamicFormCode":"dispatch_orders","dynamicFormTable":null,"ignoreField":true,"developmentSystemId":null,"debugFlag":true},
  299. }
  300. this.initData(data)
  301. },
  302. destroyed () {
  303. // localStorage.removeItem('text')
  304. },
  305. methods:{
  306. handleErrorShow(){
  307. if(this.error_num){
  308. this.is_error = true;
  309. }
  310. },
  311. handleDelet(index){
  312. this.modalData.attachment.attachFile.splice(index,1);
  313. },
  314. handleSuccess (res, file) {
  315. if (res.code === 200) {
  316. res.data.data.name = res.data.data.name.split('/')[ res.data.data.name.split('/').length-1]
  317. this.modalData.attachment = {
  318. attachFile:[...this.modalData.attachment.attachFile,res.data.data],
  319. createdBy: res.data.data.createdBy,
  320. createdDate: res.data.data.createdDate,
  321. deleted: res.data.data.deleted,
  322. id: res.data.data.id,
  323. insertCreateBy: null,
  324. lastModifiedBy: res.data.data.lastModifiedBy,
  325. lastModifiedDate: res.data.data.lastModifiedDate,
  326. remark: res.data.data.remark,
  327. transport: null
  328. }
  329. }
  330. },
  331. handleError (file) {
  332. // if (file.size > 3099648) {
  333. // this.$Message.warning('图片文件大小不能超过3mb!')
  334. // return false
  335. // }
  336. },
  337. // 原始数据获取
  338. initData(row) {
  339. this.axios.post('/api/testdwyget', { ...row }).then(res => {
  340. // this.tableData.push(...res.data.data.exe_delivery_note_dtl_b);
  341. this.data = res.data
  342. this.detail = res.data.data.exe_delivery_note_b
  343. console.log(this.detail)
  344. this.modalData.attachment = this.detail.attachment?this.detail.attachment:{attachFile: []};
  345. this.modalData.id_number = this.detail.id_number;
  346. this.modalData.carrier = this.detail.carrier;
  347. this.modalData.carrier_phone = this.detail.carrier_phone;
  348. this.modalData.plate_no = this.detail.plate_no;
  349. res.data.data.exe_delivery_note_dtl_b.forEach((element, index) => {
  350. element.out_qty = 0
  351. element.product_code = element.material_code
  352. this.total_num = this.total_num + element.this_delivery_qty
  353. // this.transport_total = this.transport_total + element.out_qty
  354. let product_key = this.deelUniqueProductKey(element)
  355. if(Object.keys(this.key_tableData).indexOf(product_key) !== -1) this.key_tableData[product_key].this_delivery_qty += element.this_delivery_qty
  356. else this.key_tableData[product_key] = element
  357. // if (element.box_orders_show) {
  358. // this.is_box_data.push(this.deelUniqueKey(element));
  359. // }
  360. })
  361. for (let key in this.key_tableData) {
  362. this.tableData.push(this.key_tableData[key])
  363. }
  364. // let ji = ['\"425A3030303235\"']
  365. // console.log(JSON.stringify(ji))
  366. let text = []
  367. if (localStorage.getItem('fyy_target')) {
  368. // console.log(JSON.parse(localStorage.getItem('fyy_target')))
  369. let target = JSON.parse(localStorage.getItem('fyy_target'))
  370. localStorage.removeItem('fyy_target')
  371. // this.$Message.warning(localStorage.getItem('fyy_target'))
  372. target.forEach(v => {
  373. v = v.replace(/\"/g, '')
  374. text.push(this.func.hexToString(v))
  375. })
  376. // // console.log(text)
  377. }
  378. let text1 = localStorage.getItem('text') ? JSON.parse(localStorage.getItem('text')) : []
  379. text.forEach(v => {
  380. if (text1.indexOf(v) === -1) {
  381. text1.push(v)
  382. }
  383. })
  384. localStorage.setItem('text', JSON.stringify(text1));
  385. text1 = ['BZ00280','BZ00281']
  386. const dataBox = {
  387. url: 'http://122.112.250.253:7774/jbl/api/module-data/box_orders/box_orders/diy/defective_order_no_list',
  388. post: { "defective_order_no_list":text1}
  389. }
  390. // const dataBox = {
  391. // url: 'http://122.112.250.253:7774/jbl/api/module-data/box_orders/box_orders/diy/defective_order_no_list',
  392. // post: { "defective_order_no_list":['BZ00025']}
  393. // }
  394. this.initDataBox(dataBox)
  395. })
  396. },
  397. // 扫描数据获取
  398. initDataBox (row) {
  399. this.$Message.warning(row.post["defective_order_no_list"].toString())
  400. this.text1 = row.post["defective_order_no_list"];
  401. console.log(this.text1)
  402. this.axios.post('/api/testdwy', { ...row }).then(res => {
  403. if (res.code == 200) {
  404. this.$Message.success('请求成功!')
  405. res.data.data.forEach((element, index) => {
  406. element.product_code = element.product_no
  407. let object = {
  408. "order_item_id": element.order_item_id,
  409. "order_no": element.order_no,
  410. "box_num": element.box_num,
  411. "product_code": element.product_code,
  412. "box_no": element.box_orders.defective_order_no,
  413. "color": element.color,
  414. "color_two": element.color_two,
  415. "process_title": element.process_title,
  416. "process_title_two": element.process_title_two,
  417. "box_orders": element.box_orders.id,
  418. "box_id": element.box_orders.id,
  419. 'box_detail': element
  420. }
  421. this.scan_data.push(object)
  422. })
  423. this.deelTableData()
  424. }
  425. })
  426. },
  427. deelUniqueKey(element) {
  428. let key = element.box_orders_show
  429. return key;
  430. },
  431. deelUniqueProductKey(element) {
  432. let key = element.product_code + (element.color?element.color:'') + (element.color_two?element.color_two:'') +(element.process_title?element.process_title:'') +(element.process_title_two?element.process_title_two:'')
  433. return key;
  434. },
  435. // 将原始数据处理拼接成提交的数据
  436. deelTableData() {
  437. // let new_table_data = [];
  438. // let is_scan_key = {};
  439. this.error_data = []
  440. this.scan_data.forEach((element, index) => {
  441. // console.log(element,1)
  442. // console.log(this.key_tableData,2)
  443. // console.log(this.deelUniqueProductKey(element),3)
  444. if (element.order_no==this.detail.order_no&&Object.keys(this.key_tableData).indexOf(this.deelUniqueProductKey(element)) !== -1 && (this.key_tableData[this.deelUniqueProductKey(element)].this_delivery_qty - element.box_num) >= 0) {
  445. let table_data_detail = JSON.parse(JSON.stringify(this.key_tableData[this.deelUniqueProductKey(element)]))
  446. table_data_detail.box_orders = element.box_id
  447. table_data_detail.box_orders_show = element.box_no
  448. table_data_detail.box_detail = element.box_detail
  449. table_data_detail.this_delivery_qty = element.box_num
  450. table_data_detail.out_qty = element.box_num
  451. this.key_tableData[this.deelUniqueProductKey(element)].this_delivery_qty -= element.box_num*1
  452. this.key_tableData[this.deelUniqueProductKey(element)].out_qty += element.box_num*1;
  453. this.scan_num += element.box_num*1
  454. // is_scan_key[this.deelUniqueProductKey(element)]=1;
  455. // table_data_detail.this_delivery_qty = this.key_tableData[this.deelUniqueProductKey(element)].this_delivery_qty;
  456. table_data_detail.id = null;
  457. this.new_table_data.push(table_data_detail)
  458. } else {
  459. this.error_data.push(element);
  460. this.error_num += element.box_num*1
  461. }
  462. })
  463. // this.tableData.forEach((element, index) => {
  464. // // if (element.this_delivery_qty > 0 && element.out_qty === 0) {
  465. // // new_table_data.push(element)
  466. // // }
  467. // })
  468. // this.tableData = new_table_data;
  469. },
  470. handleSureClick () {
  471. this.is_modal = true
  472. },
  473. handelGoSure () {
  474. this.tableData.forEach((element, index) => {
  475. element.item_num = (index + 1)
  476. })
  477. const date = new Date()
  478. // eslint-disable-next-line camelcase
  479. const now_time = date.toISOString()
  480. this.data = {
  481. // auditInfo: null,
  482. bizId: -1,
  483. bizTypeEk: 'LOWCODE',
  484. // businessType: null,
  485. // createdBy: "473698106823094272",
  486. createdDate: now_time,
  487. dynamicFormId: '474057887278641152',
  488. // extDataId: null,
  489. // id: "491138208411951104",
  490. // lastModifiedBy: "473698106823094272",
  491. // lastModifiedDate: now_time,
  492. // requestId: null,
  493. showModelId: '474061442555260928',
  494. version: 1,
  495. // versionNo: null,
  496. data: {
  497. send_goods_out: {},
  498. send_goods_out_product: []
  499. }
  500. }
  501. this.data.data.send_goods_out = {
  502. send_goods_out_no: null,
  503. in_out_type: 'CK007',
  504. box_title: 'WH05001',
  505. out_time: now_time,
  506. out_depart: '481280388644478976',
  507. out_employee_id: this.employee_code,
  508. expect_date_delivery: this.detail.expect_date_delivery,
  509. expect_date_arrival: this.detail.expect_date_arrival,
  510. delivery_method_dk: this.detail.delivery_method_dk,
  511. express_company: null,
  512. express_no: null,
  513. carrier: this.modalData.carrier, // 司机姓名
  514. carrier_phone: this.modalData.carrier_phone, // 司机电话
  515. plate_no: this.modalData.plate_no, // 车牌
  516. id_number: this.modalData.id_number, // 身份证
  517. attachment: this.modalData.attachment,
  518. area_selection: this.detail.area_selection,
  519. detailed_address: this.detail.detailed_address,
  520. contact: this.detail.contact,
  521. contact_way: this.detail.contact_way,
  522. status: 'NOT_APPROVED',
  523. oa_id: null,
  524. oa_time: null,
  525. remark: null,
  526. order_no: this.detail.order_no,
  527. site: null,
  528. in_out_type_show: '成品发货出库',
  529. box_title_show: '成品仓',
  530. out_depart_show: '仓储部',
  531. out_employee_id_show: this.name,
  532. delivery_method_dk_show: this.detail.delivery_method_dk_show,
  533. area_selection_show: this.detail.area_selection_show,
  534. // attachment: null,
  535. // dynamic_form_value_id: this.detail.dynamic_form_value_id,
  536. // expect_date_arrival_lt: this.detail.expect_date_arrival_lt,
  537. // expect_date_delivery_lt: this.detail.expect_date_delivery_lt,
  538. // id: "491138208583917568"
  539. // main_table_id: null,
  540. // oa_id_show: null,
  541. // oa_time_lt: null,
  542. // out_time_lt: now_time,
  543. // request_id: null,
  544. // send_goods_out_no: "FCK2023091700099",
  545. // site_show: this.detail.site_show,
  546. // status_show: '待审核'
  547. }
  548. this.new_table_data.forEach((element,index) =>{
  549. // console.log(element)
  550. let box_detail = {
  551. item_num: (index + 1),
  552. product_code: element.box_detail.product_code,
  553. product_title: element.box_detail.product_title,
  554. product_size: element.box_detail.product_size,
  555. product_unit: element.box_detail.product_unit,
  556. product_unit_title: element.box_detail.product_unit_title,
  557. process_code: element.box_detail.process_code,
  558. color_code: element.box_detail.color_code,
  559. process_code_two: element.box_detail.process_code_two,
  560. color_code_two: element.box_detail.color_code_two,
  561. process_title: element.box_detail.process_title,
  562. color: element.box_detail.color,
  563. process_title_two: element.box_detail.process_title_two,
  564. color_two: element.box_detail.color_two,
  565. bus_no: this.detail.no,
  566. bus_id: element.bus_id,
  567. bus_item_id: element.bus_item_id,
  568. bus_item_no: element.item_no,
  569. order_no: element.box_detail.order_no,
  570. out_qty: element.out_qty,
  571. this_delivery_qty: element.out_qty,
  572. order_item_id: element.order_item_id,
  573. unit_price: element.unit_price,
  574. site: null,
  575. customer_name: element.box_detail.customer_name,
  576. customer_no: element.box_detail.customer_no,
  577. dealer_name: element.box_detail.dealer_name,
  578. dealer_no: element.box_detail.dealer_no,
  579. box_orders: element.box_detail.box_orders.id,
  580. box_orders_show: element.box_detail.box_orders.defective_order_no
  581. // site_show: element.box_detail.site_show
  582. // dynamic_form_value_id: element.box_detail.dynamic_form_value_id,
  583. // id: "491138208592306176"
  584. // lineId: "29E776DE",
  585. // mainKey: "29E776DE",
  586. // main_table_id: "491138208583917568",
  587. // request_id: null,
  588. }
  589. this.data.data.send_goods_out_product.push(box_detail)
  590. })
  591. // console.log(this.data)
  592. // return false
  593. // this.data.data.send_goods_out = this.tableData
  594. // this.data.data.send_goods_out_product = this.tableData
  595. let data = {
  596. url: 'http://122.112.250.253:7774/jbl/api/module-data/send_goods_out/send_goods_out',
  597. post: this.data
  598. }
  599. let data1 ={
  600. url: 'http://122.112.250.253:7774/jbl/api/module-data/box_orders/box_orders/diy/update_delivery_status',
  601. post: {
  602. defective_order_no_list:this.text1
  603. }
  604. }
  605. if(this.state){
  606. this.state = false
  607. this.axios.post('/api/testdwy', data).then(res => {
  608. if (res.code === 200) {
  609. this.axios.post('/api/testdwy', data1).then(req=>{
  610. if(req.code === 200){
  611. this.is_modal = false
  612. this.$router.go(-1)
  613. }
  614. })
  615. this.$Message.success(res.msg)
  616. }
  617. setTimeout(()=>{
  618. this.state = true
  619. },5000)
  620. })
  621. }
  622. // console.log(JSON.stringify(this.data))
  623. },
  624. handleReturn() {
  625. localStorage.removeItem('fyy_target')
  626. this.$router.push('/cms/finish')
  627. },
  628. handleChoose(item, index) {
  629. item.is_choose = !item.is_choose
  630. this.tableData.splice(index, 1, item)
  631. },
  632. handleShow() {
  633. this.is_show = !this.is_show
  634. // console.log(document.getElementsByClassName('header'))
  635. }
  636. }
  637. }
  638. </script>
  639. <style lang="scss" scoped>
  640. .return_btn {
  641. background-image: url('../../../assets/home/return.png');
  642. background-size: 100% 100%;
  643. }
  644. .confirm_btn {
  645. background-image: url('../../../assets/home/confirm.png');
  646. background-size: 100% 100%;
  647. }
  648. .return_btn,
  649. .confirm_btn {
  650. width: 10.97rem;
  651. height: 3.93rem;
  652. display: flex;
  653. align-items: center;
  654. justify-content: center;
  655. color: #fff;
  656. font-size: 1.06rem;
  657. font-weight: 500;
  658. letter-spacing: 1px;
  659. }
  660. .secd_flex_s>span:nth-child(1) {
  661. font-size: 0.94rem;
  662. color: #ABDFFF;
  663. }
  664. .secd_flex_s>span:nth-child(2) {
  665. font-size: 0.94rem;
  666. color: #03FCD3;
  667. }
  668. .secd_g {
  669. font-size: 1rem;
  670. color: #ABDFFF
  671. }
  672. .secd_title_d {
  673. font-size: 1.13rem;
  674. color: #FFFFFF;
  675. text-shadow: 0px 0px 0px rgba(255, 255, 255, 0.5);
  676. //white-space: nowrap;
  677. //overflow: hidden;
  678. //text-overflow: ellipsis;
  679. }
  680. .secd_flex_w {
  681. display: flex;
  682. justify-content: space-between;
  683. padding-right: 1.6rem;
  684. box-sizing: border-box;
  685. }
  686. .secd_flex {
  687. display: flex;
  688. flex-direction: column;
  689. gap: .375rem;
  690. .secd_title {
  691. font-size: 0.88rem;
  692. color: #ABDFFF;
  693. opacity: 0.5;
  694. }
  695. }
  696. .check_box_c {
  697. width: 1.19rem;
  698. height: 100%;
  699. background-image: url('../../../assets/home/check.png');
  700. background-size: 100% 100%;
  701. }
  702. .check_box_c_active {
  703. width: 1.3rem;
  704. height: 100%;
  705. background-image: url('../../../assets/home/checked.png');
  706. background-size: 100% 100%;
  707. }
  708. .send_work {
  709. //height: 10.69rem;
  710. height: auto;
  711. background-image: url('../../../assets/home/packUpback.png');
  712. background-size: 100% 100%;
  713. margin-top: 1.38rem;
  714. padding: 0.44rem 0.4rem 1.34rem 1.22rem;
  715. box-sizing: border-box;
  716. .check_box {
  717. height: 1.19rem;
  718. display: flex;
  719. justify-content: right;
  720. }
  721. }
  722. .com_top {
  723. margin-top: 1.72rem !important;
  724. }
  725. .completion_con {
  726. height: 5.19rem;
  727. background-image: url('../../../assets/home/completion.png');
  728. background-size: 100% 100%;
  729. margin-top: 0.72rem;
  730. padding: 1rem 1.28rem;
  731. box-sizing: border-box;
  732. display: flex;
  733. align-items: center;
  734. justify-content: space-between;
  735. }
  736. .home_con_s {
  737. position: relative;
  738. .pack_up {
  739. position: absolute;
  740. top: 0;
  741. left: 50%;
  742. transform: translateX(-50%);
  743. width: 5.56rem;
  744. background-image: url('../../../assets/home/packUp.png');
  745. background-size: 100% 100%;
  746. height: 1.97rem;
  747. display: flex;
  748. align-items: center;
  749. justify-content: center;
  750. img {
  751. width: 2.59rem;
  752. height: 0.88rem;
  753. }
  754. }
  755. .pack_up_d {
  756. top: -1.1rem;
  757. }
  758. .pack_up_con {
  759. height: 13.09rem;
  760. background-image: url('../../../assets/home/packUpback.png');
  761. background-size: 100% 100%;
  762. padding: 1.78rem 0 1.78rem 2.03rem;
  763. box-sizing: border-box;
  764. .pack_up_name {
  765. height: 1.25rem;
  766. font-size: 1.25rem;
  767. color: #fff;
  768. font-weight: 600;
  769. }
  770. .pack_up_grid {
  771. display: grid;
  772. grid-template-columns: repeat(2, 1fr);
  773. row-gap: .625rem;
  774. &>div {
  775. display: flex;
  776. flex-direction: column;
  777. row-gap: .625rem;
  778. &>div {
  779. display: flex;
  780. gap: .125rem;
  781. span:nth-child(1) {
  782. font-size: 1.63rem;
  783. font-family: DIN-BoldItalic, DIN;
  784. font-weight: 600;
  785. color: #04FFD5;
  786. line-height: 1.31rem;
  787. transform: skewX(-10deg);
  788. text-shadow: 0px 0px 0px rgba(4, 255, 213, 0.23);
  789. }
  790. span:nth-child(2) {
  791. font-size: 1rem;
  792. font-family: PingFangSC-Regular, PingFang SC;
  793. font-weight: 400;
  794. color: #ABDFFF;
  795. }
  796. }
  797. &>p:nth-child(1) {
  798. font-size: 1rem;
  799. font-family: PingFangSC-Regular, PingFang SC;
  800. font-weight: 400;
  801. color: #ABDFFF;
  802. margin-bottom: 0px;
  803. }
  804. }
  805. }
  806. }
  807. }
  808. .home_con_body {
  809. width: 100%;
  810. padding: 1rem;
  811. box-sizing: border-box;
  812. }
  813. .home_header {
  814. height: 2.125rem;
  815. display: flex;
  816. align-items: center;
  817. justify-content: center;
  818. color: #fff;
  819. font-size: 1.125rem;
  820. font-weight: 600;
  821. }
  822. .home_header_line {
  823. width: 100%;
  824. height: .0625rem;
  825. background-color: #fff;
  826. opacity: 0.2;
  827. }
  828. .header {
  829. width: 94%;
  830. height: 7rem;
  831. // overflow: hidden;
  832. // transition: all 0.4s;
  833. position: relative;
  834. top: 0.5rem;
  835. left: 3%;
  836. box-shadow: 0.16rem 0.1rem 0.1rem 0.1rem #9d9b9b;
  837. border-radius: 1rem;
  838. padding: 0.4rem 0.7rem 0 1rem;
  839. background: #fff;
  840. }
  841. .header_btn {
  842. border-radius: 1rem;
  843. padding: 0.1rem;
  844. width: 5rem;
  845. display: flex;
  846. justify-content: space-around;
  847. align-items: center;
  848. }
  849. .header_top {
  850. display: flex;
  851. justify-content: space-between;
  852. align-items: center;
  853. }
  854. .ot {
  855. position: relative;
  856. top: -1.3rem;
  857. }
  858. .header_middle1 {
  859. display: flex;
  860. justify-content: space-between;
  861. align-items: center;
  862. .ft {
  863. font-size: 1.5rem;
  864. width: 5rem;
  865. text-align: center;
  866. }
  867. }
  868. .header_middle {
  869. position: relative;
  870. top: -0.3rem;
  871. display: flex;
  872. justify-content: space-between;
  873. align-items: center;
  874. }
  875. ::v-deep .btn-group>.btn,
  876. .btn-group-vertical>.btn {
  877. background: #ffffff;
  878. color: #2c3e50;
  879. outline: none;
  880. border: none;
  881. margin: 0;
  882. z-index: 3;
  883. }
  884. //.header_footer {
  885. // position: relative;
  886. // top: -1.7rem;
  887. // display: flex;
  888. // justify-content: space-between;
  889. // align-items: center;
  890. //
  891. // div {
  892. // font-size: 0.5rem;
  893. // color: rgb(244, 136, 42);
  894. // }
  895. //}
  896. .bdy {
  897. width: 94%;
  898. height: calc(100% - 18.7rem);
  899. overflow: auto;
  900. position: relative;
  901. top: 1rem;
  902. left: 3%;
  903. }
  904. ::v-deep td {
  905. text-align: center;
  906. vertical-align: middle;
  907. }
  908. table {
  909. border-collapse: collapse;
  910. /* 合并边框 */
  911. width: 100%;
  912. /* 表格宽度 */
  913. background: #fff;
  914. table-layout: fixed;
  915. }
  916. th {
  917. font-size: 0.6rem;
  918. background: #66b1f4;
  919. color: #fff;
  920. }
  921. td {
  922. font-size: 0.6rem;
  923. word-break: break-all;
  924. }
  925. td,
  926. th {
  927. vertical-align: middle;
  928. text-align: center;
  929. border: 0.1rem solid #dddddd;
  930. /* 单元格边框样式 */
  931. padding: 0.02rem;
  932. /* 单元格内边距 */
  933. }
  934. .choose_item {
  935. background: #c8c8c8;
  936. }
  937. .footer {
  938. display: flex;
  939. width: 91%;
  940. position: absolute;
  941. bottom: 3rem;
  942. }
  943. ::v-deep.ivu-modal-body{
  944. background: #001e57;
  945. border-radius: 1rem;
  946. color:#FFFFFF;
  947. }
  948. ::v-deep.ivu-modal-content{
  949. background: transparent;
  950. }
  951. ::v-deep.ivu-form-item-label{
  952. color: #FFFFFF;
  953. }
  954. .total_img {
  955. display: flex;
  956. flex-wrap: wrap;
  957. img {
  958. max-width: 40px;
  959. max-height: 40px;
  960. }
  961. .img_item {
  962. position: relative;
  963. .img_title {
  964. text-align: center;
  965. }
  966. }
  967. }
  968. .upd_file {
  969. width: 40px;
  970. height: 40px;
  971. cursor: pointer;
  972. background-color: transparent;
  973. display: flex;
  974. align-items: center;
  975. justify-content: center;
  976. margin-left: 10px;
  977. }
  978. .img_content {
  979. position: relative;
  980. margin-right:20px;
  981. }
  982. .delete-img {
  983. position: absolute;
  984. right: -10px;
  985. top: 0px;
  986. color: red;
  987. }
  988. .ico{
  989. color:#FFFFFF;
  990. }
  991. ::v-deep.ivu-icon{
  992. color: #FFFFFF;
  993. }
  994. </style>