作者 小范

新增回库功能

@@ -17,6 +17,9 @@ export const selectBywaybillandFhl = params => { return axios.get(`${baseService @@ -17,6 +17,9 @@ export const selectBywaybillandFhl = params => { return axios.get(`${baseService
17 export const selectNewInventroyrecords = params => { return axios.get(`${baseServiceURL}/newinventroyrecord/selectNewInventroyrecords`, { params: params }); }; 17 export const selectNewInventroyrecords = params => { return axios.get(`${baseServiceURL}/newinventroyrecord/selectNewInventroyrecords`, { params: params }); };
18 //出库 18 //出库
19 export const ExtNewinventroyrecord = params => { return axios.get(`${baseServiceURL}/newinventroyrecord/ExtNewinventroyrecord`, { params: params }); }; 19 export const ExtNewinventroyrecord = params => { return axios.get(`${baseServiceURL}/newinventroyrecord/ExtNewinventroyrecord`, { params: params }); };
  20 +//回库
  21 +export const ReNewinventroyrecord = params => { return axios.post(`${baseServiceURL}/newinventroyrecord/ReNewinventroyrecord`, params); };
  22 +
20 //分批出库 23 //分批出库
21 export const batchoutbound = params => { return http.post(`${baseUrl2}/batchoutbound`,params)}; 24 export const batchoutbound = params => { return http.post(`${baseUrl2}/batchoutbound`,params)};
22 //分批改单 25 //分批改单
@@ -223,12 +223,14 @@ @@ -223,12 +223,14 @@
223 <el-table-column 223 <el-table-column
224 fixed="right" 224 fixed="right"
225 label="操作" 225 label="操作"
226 - width="120"> 226 + width="160">
227 <template slot-scope="scope"> 227 <template slot-scope="scope">
228 <el-button v-if="scope.row.ietype ==='E'" disabled type="success" size="mini" @click="outBound(scope.row)">出库</el-button> 228 <el-button v-if="scope.row.ietype ==='E'" disabled type="success" size="mini" @click="outBound(scope.row)">出库</el-button>
229 <el-button v-else type="success" size="mini" @click="outBound(scope.row)">出库</el-button> 229 <el-button v-else type="success" size="mini" @click="outBound(scope.row)">出库</el-button>
  230 + <el-button v-if="scope.row.ietype ==='E'" type="primary" size="mini" @click="inBound(scope.row)">回库</el-button>
  231 + <el-button v-else type="primary" disabled size="mini" @click="inBound(scope.row)">回库</el-button>
230 <!-- <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>--> 232 <!-- <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>-->
231 -<!-- <el-button type="danger" size="mini" @click="applyDel(scope.$index,scope.row)">删除</el-button>--> 233 + <!-- <el-button type="danger" size="mini" @click="applyDel(scope.$index,scope.row)">删除</el-button>-->
232 </template> 234 </template>
233 </el-table-column> 235 </el-table-column>
234 </el-table> 236 </el-table>
@@ -452,7 +454,7 @@ @@ -452,7 +454,7 @@
452 delInventoryrecord, 454 delInventoryrecord,
453 ediInventroyrecord, 455 ediInventroyrecord,
454 ExtNewinventroyrecord, 456 ExtNewinventroyrecord,
455 - selectNewInventroyrecords 457 + selectNewInventroyrecords,ReNewinventroyrecord
456 } from "../../api/consigner/station"; 458 } from "../../api/consigner/station";
457 import packge from '@/api/nmms/packge' 459 import packge from '@/api/nmms/packge'
458 460
@@ -615,6 +617,26 @@ @@ -615,6 +617,26 @@
615 }).catch(() => { 617 }).catch(() => {
616 }) 618 })
617 }, 619 },
  620 + //回库
  621 + inBound(row) {
  622 + this.$confirm('是否确认回库?', {
  623 + confirmButtonText: '确定',
  624 + cancelButtonText: '取消',
  625 + type: 'warning'
  626 + }
  627 + ).then(() => {
  628 + // console.log(row);
  629 + ReNewinventroyrecord(row).then((response) => {
  630 + console.log(row)
  631 + const res = response.data
  632 + this.$message.success(res.msg)
  633 + this.getList()
  634 + }).catch(error => {
  635 + this.$message.error(res.msg)
  636 + })
  637 + }).catch(() => {
  638 + })
  639 + },
618 // 删除 640 // 删除
619 applyDel(index, row) { 641 applyDel(index, row) {
620 // 弹框询问是否删除? 642 // 弹框询问是否删除?