作者 小范

库存管理界面新增更改主单号和查货物明细功能

@@ -11,6 +11,10 @@ let baseUrl5 = 'wms-server-warehouse/wms/area' @@ -11,6 +11,10 @@ let baseUrl5 = 'wms-server-warehouse/wms/area'
11 let baseUrl6 = 'wms-server-warehouse/wms/newbasesphcode' 11 let baseUrl6 = 'wms-server-warehouse/wms/newbasesphcode'
12 12
13 13
  14 +//查询货物明细
  15 +export const selectBywaybillandFhl = params => { return axios.get(`${baseServiceURL}/awbinfo/selectBywaybillandFhl`, { params: params }); };
  16 +//查询出入库记录
  17 +export const selectNewInventroyrecords = params => { return axios.get(`${baseServiceURL}/newinventroyrecord/selectNewInventroyrecords`, { params: params }); };
14 18
15 //场站管理 19 //场站管理
16 export const selectStations = params => { return axios.get(`${baseUrl}/selectStations`, { params: params }); }; 20 export const selectStations = params => { return axios.get(`${baseUrl}/selectStations`, { params: params }); };
@@ -44,6 +48,11 @@ export const selectBylocationno = params => { return axios.get(`${baseUrl2}/sele @@ -44,6 +48,11 @@ export const selectBylocationno = params => { return axios.get(`${baseUrl2}/sele
44 export const delInventoryrecord = params => { return axios.get(`${baseUrl2}/delInventoryrecord`, { params: params }); }; 48 export const delInventoryrecord = params => { return axios.get(`${baseUrl2}/delInventoryrecord`, { params: params }); };
45 49
46 export const addInventoryrecord = params => { return http.post(`${baseUrl2}/addInventoryrecord`,params)}; 50 export const addInventoryrecord = params => { return http.post(`${baseUrl2}/addInventoryrecord`,params)};
  51 +//更改分单号
  52 +export const ediNewInventroyByfhl = params => { return http.post(`${baseUrl2}/ediNewInventroyByfhl`,params)};
  53 +
  54 +//更改主单号
  55 +export const ediNewInventroyBywaybill = params => { return http.post(`${baseUrl2}/ediNewInventroyBywaybill`,params)};
47 56
48 //批量入库 57 //批量入库
49 export const batchImpNewinventroyrecord = params => { return http.post(`${baseServiceURL}/newinventroyrecord/batchImpNewinventroyrecord`,params)}; 58 export const batchImpNewinventroyrecord = params => { return http.post(`${baseServiceURL}/newinventroyrecord/batchImpNewinventroyrecord`,params)};
@@ -25,6 +25,9 @@ @@ -25,6 +25,9 @@
25 <el-button type="primary" icon="el-icon-search" size="small" @click="getList()"> 25 <el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
26 查询 26 查询
27 </el-button> 27 </el-button>
  28 + <el-button type="success" size="small" @click="changeFwb()" :disabled="this.sels.length===0">
  29 + 更改主单号
  30 + </el-button>
28 <!-- <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>--> 31 <!-- <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>-->
29 </el-col> 32 </el-col>
30 </el-row> 33 </el-row>
@@ -34,16 +37,18 @@ @@ -34,16 +37,18 @@
34 <el-table 37 <el-table
35 :data="tableData" 38 :data="tableData"
36 border 39 border
  40 + @selection-change="selsChange"
37 :cell-style="{textAlign:'center'}" 41 :cell-style="{textAlign:'center'}"
38 style="border-radius: 10px 10px 0px 0px;line-height: 25px" 42 style="border-radius: 10px 10px 0px 0px;line-height: 25px"
39 :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small" 43 :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
40 > 44 >
  45 + <el-table-column type="selection" width="55" align="center"></el-table-column>
41 <el-table-column 46 <el-table-column
42 fixed 47 fixed
43 label="操作" 48 label="操作"
44 width="160"> 49 width="160">
45 <template slot-scope="scope"> 50 <template slot-scope="scope">
46 - <el-button type="primary" size="mini">查看货物明细</el-button> 51 + <el-button type="primary" size="mini" @click="queryDeta(scope.row)">查看货物明细</el-button>
47 </template> 52 </template>
48 </el-table-column> 53 </el-table-column>
49 <el-table-column 54 <el-table-column
@@ -90,7 +95,7 @@ @@ -90,7 +95,7 @@
90 label="操作" 95 label="操作"
91 width="200"> 96 width="200">
92 <template slot-scope="scope"> 97 <template slot-scope="scope">
93 - <el-button type="success" size="mini">更改主单</el-button> 98 + <el-button type="warning" size="mini" @click="changeFhl(scope.row)">更改分单号</el-button>
94 <!-- <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>--> 99 <!-- <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>-->
95 <!-- <el-button type="danger" size="mini" @click="applyDel(scope.$index,scope.row)">删除</el-button>--> 100 <!-- <el-button type="danger" size="mini" @click="applyDel(scope.$index,scope.row)">删除</el-button>-->
96 </template> 101 </template>
@@ -109,6 +114,47 @@ @@ -109,6 +114,47 @@
109 :total="total"> 114 :total="total">
110 </el-pagination> 115 </el-pagination>
111 </el-row> 116 </el-row>
  117 +<!-- 更改分单号-->
  118 + <el-row>
  119 + <el-dialog :title="detaFhl" :visible.sync="fhlDialog" width="40%" >
  120 + <el-form :model="fhlForm" :rules="fhlRules" ref="fhlForm" style="margin-top: 40px">
  121 + <el-row>
  122 + <el-col :span="8">
  123 + <el-form-item label="" :label-width="formLabelWidth" prop="billfhl">
  124 + <el-input placeholder="请输入更改后的分单号" v-model="fhlForm.billfhl" autocomplete="off" size="small" style="width: 400px">
  125 + <template slot="prepend">更改分单号为:</template>
  126 + </el-input>
  127 + </el-form-item>
  128 + </el-col>
  129 + </el-row>
  130 + </el-form>
  131 + <div slot="footer" class="dialog-footer">
  132 + <el-button @click="fhlDialog = false" size="small">取 消</el-button>
  133 + <el-button type="primary" @click="fhlEdit()" size="small">提 交</el-button>
  134 + </div>
  135 + </el-dialog>
  136 + </el-row>
  137 + <!-- 更改主单号-->
  138 + <el-row>
  139 + <el-dialog :title="detaFwb" :visible.sync="fwbDialog" width="40%" >
  140 + <el-form :model="fwbForm" :rules="fwbRules" ref="fwbForm" style="margin-top: 40px">
  141 + <el-row>
  142 + <el-col :span="8">
  143 + <el-form-item label="" :label-width="formLabelWidth" prop="waybill">
  144 + <el-input placeholder="请输入更改后的主单号" v-model="fwbForm.waybill" autocomplete="off" size="small" style="width: 400px">
  145 + <template slot="prepend">更改主单号为:</template>
  146 + </el-input>
  147 + </el-form-item>
  148 + </el-col>
  149 + </el-row>
  150 + </el-form>
  151 + <div slot="footer" class="dialog-footer">
  152 + <el-button @click="fwbDialog = false" size="small">取 消</el-button>
  153 + <el-button type="primary" @click="fwbEdit()" size="small">提 交</el-button>
  154 + </div>
  155 + </el-dialog>
  156 + </el-row>
  157 +<!-- 新增和编辑-->
112 <el-row> 158 <el-row>
113 <el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog.addDialog" width="80%" > 159 <el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog.addDialog" width="80%" >
114 <el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px"> 160 <el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px">
@@ -282,6 +328,82 @@ @@ -282,6 +328,82 @@
282 </div> 328 </div>
283 </el-dialog> 329 </el-dialog>
284 </el-row> 330 </el-row>
  331 +<!-- //查看货物明细-->
  332 + <el-row>
  333 + <el-dialog :title="detaMap" :visible.sync="detaDialog" width="70%" >
  334 + <el-form :model="detaForm" :rules="detaRules" ref="detaForm" style="margin-top: 40px;padding-bottom: 30px">
  335 + <el-row>
  336 + <el-col :span="7">
  337 + <el-form-item label="" :label-width="formLabelWidth" prop="dest4">
  338 + <el-input disabled v-model="detaForm.dest4" autocomplete="off" size="small" style="width: 300px">
  339 + <template slot="prepend">代理人名称</template>
  340 + </el-input>
  341 + </el-form-item>
  342 + </el-col>
  343 + <el-col :span="8">
  344 + <el-form-item label="" :label-width="formLabelWidth" prop="dest4city">
  345 + <el-input disabled v-model="detaForm.dest4city" autocomplete="off" size="small" style="width: 300px">
  346 + <template slot="prepend">代理人代码</template>
  347 + </el-input>
  348 + </el-form-item>
  349 + </el-col>
  350 + <el-col :span="8">
  351 + <el-form-item label="" :label-width="formLabelWidth" prop="optime">
  352 + <el-input disabled v-model="detaForm.optime" autocomplete="off" size="small" style="width: 300px">
  353 + <template slot="prepend">入库时间</template>
  354 + </el-input>
  355 + </el-form-item>
  356 + </el-col>
  357 + </el-row>
  358 + <el-row>
  359 + <el-col :span="7">
  360 + <el-form-item label="" :label-width="formLabelWidth" prop="pcs">
  361 + <el-input disabled v-model="detaForm.pcs" autocomplete="off" size="small" style="width: 300px">
  362 + <template slot="prepend">件&emsp;&emsp;&emsp;数</template>
  363 + </el-input>
  364 + </el-form-item>
  365 + </el-col>
  366 + <el-col :span="8">
  367 + <el-form-item label="" :label-width="formLabelWidth" prop="weight">
  368 + <el-input disabled v-model="detaForm.weight" autocomplete="off" size="small" style="width: 300px">
  369 + <template slot="prepend">重&emsp;&emsp;&emsp;量</template>
  370 + </el-input>
  371 + </el-form-item>
  372 + </el-col>
  373 + <el-col :span="8">
  374 + <el-form-item label="" :label-width="formLabelWidth" prop="feewt">
  375 + <el-input disabled v-model="detaForm.feewt" autocomplete="off" size="small" style="width: 300px">
  376 + <template slot="prepend">计费重量</template>
  377 + </el-input>
  378 + </el-form-item>
  379 + </el-col>
  380 + </el-row>
  381 + <el-row>
  382 + <el-col :span="7">
  383 + <el-form-item label="" :label-width="formLabelWidth" prop="pack">
  384 + <el-input disabled v-model="detaForm.pack" autocomplete="off" size="small" style="width: 300px">
  385 + <template slot="prepend">包&emsp;&emsp;&emsp;装</template>
  386 + </el-input>
  387 + </el-form-item>
  388 + </el-col>
  389 + <el-col :span="8">
  390 + <el-form-item label="" :label-width="formLabelWidth" prop="meas">
  391 + <el-input disabled v-model="detaForm.meas" autocomplete="off" size="small" style="width: 300px">
  392 + <template slot="prepend">尺&emsp;&emsp;&emsp;寸</template>
  393 + </el-input>
  394 + </el-form-item>
  395 + </el-col>
  396 + <el-col :span="8">
  397 + <el-form-item label="" :label-width="formLabelWidth" prop="area">
  398 + <el-input disabled v-model="detaForm.vol" autocomplete="off" size="small" style="width: 300px">
  399 + <template slot="prepend">体&emsp;&emsp;积</template>
  400 + </el-input>
  401 + </el-form-item>
  402 + </el-col>
  403 + </el-row>
  404 + </el-form>
  405 + </el-dialog>
  406 + </el-row>
285 </el-card> 407 </el-card>
286 </el-row> 408 </el-row>
287 </template> 409 </template>
@@ -291,9 +413,10 @@ @@ -291,9 +413,10 @@
291 selectNewInventroys, 413 selectNewInventroys,
292 delInventroy, 414 delInventroy,
293 addInventory, 415 addInventory,
294 - ediInventroy, selectBylocationno, 416 + ediInventroy, selectBylocationno,selectBywaybillandFhl,ediNewInventroyByfhl,ediNewInventroyBywaybill,
295 } from '../../api/consigner/station'; 417 } from '../../api/consigner/station';
296 import jsutil from "@/common/js/util"; 418 import jsutil from "@/common/js/util";
  419 + import {loginedUserInfo} from "../../api/user";
297 420
298 export default { 421 export default {
299 //name: "inventroy", 422 //name: "inventroy",
@@ -311,6 +434,7 @@ @@ -311,6 +434,7 @@
311 }, 434 },
312 total: 0, 435 total: 0,
313 tableData:[], 436 tableData:[],
  437 + //新增编辑
314 dialogMap: { 438 dialogMap: {
315 update: '编辑', 439 update: '编辑',
316 create: '新增' 440 create: '新增'
@@ -349,8 +473,9 @@ @@ -349,8 +473,9 @@
349 remark3:'', 473 remark3:'',
350 remark4:'', 474 remark4:'',
351 remark5:'', 475 remark5:'',
  476 + newwaybill:'',
  477 + newfhl:''
352 }, 478 },
353 - formLabelWidth: '80px',  
354 rules: { 479 rules: {
355 userName: [ 480 userName: [
356 // { required: true, message: '请输入申请人', trigger: 'blur' }, 481 // { required: true, message: '请输入申请人', trigger: 'blur' },
@@ -370,6 +495,103 @@ @@ -370,6 +495,103 @@
370 // ], 495 // ],
371 ], 496 ],
372 }, 497 },
  498 + //货物明细
  499 + detaDialog: false,
  500 + detaMap:'货物明细',
  501 + detaForm:{
  502 + dest4: '',
  503 + dest4city: '',
  504 + optime:'',
  505 + pcs: '',
  506 + weight: '',
  507 + feewt: '',
  508 + vol:'',
  509 + pack: '',
  510 + meas:'',
  511 + billid: '',
  512 + stocktypeid: '',
  513 + stockpre:'',
  514 + stockno: '',
  515 + productid: '',
  516 + carrierproductid: '',
  517 + delflag:'',
  518 + previousbillid: '',
  519 + domint:'',
  520 + customctl: '',
  521 + specopeid: '',
  522 + specopeidext:'',
  523 + sairportid: '',
  524 + scityid: '',
  525 + eairportid: '',
  526 + ecityid:'',
  527 + by1: '',
  528 + dest1:'',
  529 + dest1city: '',
  530 + by2: '',
  531 + dest2:'',
  532 + dest2city: '',
  533 + by3: '',
  534 + dest3: '',
  535 + dest3city:'',
  536 + by4: '',
  537 + cargono:'',
  538 + cargonm: '',
  539 + ctrlopedepartment: '',
  540 + shprname:'',
  541 + shprmobiletype: '',
  542 + shprtel: '',
  543 + shpraddress: '',
  544 + shprcountyr:'',
  545 + shpcomid: '',
  546 + shpaeocode:'',
  547 + shpcustomerid: '',
  548 + cnsnname: '',
  549 + cnsrmobiletype:'',
  550 + cnsntel: '',
  551 + cnsnaddress: '',
  552 + cnscountyr: '',
  553 + cnscomid:'',
  554 + cnsaeocode: '',
  555 + cnsrctcname:'',
  556 + cnsrctctel:'',
  557 + csgcustomerid: '',
  558 + collected: '',
  559 + exchagerate:'',
  560 + comat: '',
  561 + refrigerated: '',
  562 + whshold: '',
  563 + expcusttransit:'',
  564 + impcusttransit: '',
  565 + shorttrans:'',
  566 + shorttransbup: '',
  567 + cargoowner: '',
  568 + chargetime:'',
  569 + isinstruction: '',
  570 + notify: '',
  571 + fileattached: '',
  572 + ratetype:'',
  573 + processingmethod: '',
  574 + handlingcircs:'',
  575 + reservedtonnage:'',
  576 + },
  577 + formLabelWidth: '80px',
  578 + detaRules:{},
  579 + //更改分单号
  580 + fhlDialog: false,
  581 + detaFhl:'更改分单号',
  582 + fhlForm:{
  583 + billfhl:'',
  584 + },
  585 + fhlRules:{},
  586 + //更改主单号
  587 + /* 批量选中的列表 */
  588 + sels: [],
  589 + fwbDialog: false,
  590 + detaFwb:'更改主单号',
  591 + fwbForm:{
  592 + waybill:'',
  593 + },
  594 + fwbRules:{},
373 } 595 }
374 }, 596 },
375 methods: { 597 methods: {
@@ -389,6 +611,89 @@ @@ -389,6 +611,89 @@
389 // this.loading = false; 611 // this.loading = false;
390 // }); 612 // });
391 // }, 613 // },
  614 + //查询货物明细
  615 + //打开更改主单号
  616 + selsChange: function (sels) {
  617 + this.sels = sels;
  618 + },
  619 + changeFwb() {
  620 + this.fwbDialog = true;
  621 + // this.addForm=row;
  622 + },
  623 + fwbEdit() {
  624 + this.$confirm('是否更改?', {
  625 + confirmButtonText: '确定',
  626 + cancelButtonText: '取消',
  627 + type: 'warning'
  628 + }
  629 + ).then(() => {
  630 + for(var i=0;i<this.sels.length;i++){
  631 + this.sels[i]['newwaybill']=this.fwbForm.waybill;
  632 + }
  633 + // console.log(this.sels)
  634 + ediNewInventroyBywaybill(this.sels).then(response => {
  635 + const res = response.data
  636 + if (res.code !== '200') {
  637 + return this.$message.error(res.msg)
  638 + }
  639 + this.$message.success(res.msg)
  640 + this.fwbDialog = false
  641 + this.getList()
  642 + }).catch(error => {
  643 + this.$message.error(error.toString())
  644 + })
  645 + }).catch(() => {
  646 + })
  647 + },
  648 + //打开更改分单号
  649 + changeFhl(row) {
  650 + this.fhlDialog = true;
  651 + this.addForm=row;
  652 + },
  653 + fhlEdit() {
  654 + const _this=this;
  655 + // 进行表单的预验证
  656 + _this.$refs.fhlForm.validate(valid => {
  657 + // 未通过,表单预校验
  658 + if (!valid) return
  659 + this.addForm.newfhl=this.fhlForm.billfhl;
  660 + ediNewInventroyByfhl(this.addForm).then((response) => {
  661 + // console.log(row)
  662 + const res = response.data
  663 + // console.log(res)
  664 + if (res.code != '200') {
  665 + return this.$message.error(res.msg)
  666 + }
  667 + this.$message.success(res.msg)
  668 + // 隐藏对话框
  669 + this.fhlDialog = false
  670 + // 刷新列表
  671 + this.getList()
  672 + }).catch(error => {
  673 + this.$message.error(error.toString())
  674 +
  675 + })
  676 + })
  677 + },
  678 + //查询货物明细
  679 + queryDeta(row) {
  680 + const _this = this
  681 + this.detaDialog = true;
  682 + // console.log(row);
  683 + selectBywaybillandFhl({waybill:row.waybill,billfhl:row.billfhl}).then((response) => {
  684 + const res = response.data
  685 + // console.log(response.data)
  686 + if (res.code !== '200') {
  687 + return _this.$message.error('获取货物明细,失败!')
  688 + }
  689 + // 获取表单数据
  690 + _this.detaForm = res.data
  691 + _this.$message.success('获取货物明细,成功!')
  692 + }).catch(error => {
  693 + // 关闭加载
  694 + _this.$message.error(error.toString())
  695 + })
  696 + },
392 handleSizeChange(val) { 697 handleSizeChange(val) {
393 this.queryInfo.pageSize = val 698 this.queryInfo.pageSize = val
394 this.getList() 699 this.getList()
@@ -401,7 +706,7 @@ @@ -401,7 +706,7 @@
401 const _this = this 706 const _this = this
402 selectNewInventroys(this.queryInfo).then((response) => { 707 selectNewInventroys(this.queryInfo).then((response) => {
403 const res = response.data 708 const res = response.data
404 - console.log(response.data) 709 + // console.log(response.data)
405 if (res.code !== '200') { 710 if (res.code !== '200') {
406 return _this.$message.error('获取消息收发记录,失败!') 711 return _this.$message.error('获取消息收发记录,失败!')
407 } 712 }