Commit a6ef0906 authored by Smile's avatar Smile

需求 后台-集运-包裹申请验货

parent ba2adbc1
...@@ -39,6 +39,13 @@ export function updateCons(data) { ...@@ -39,6 +39,13 @@ export function updateCons(data) {
data: data data: data
}) })
} }
export function updateInspect(data) {
return request({
url: '/ecw/cons/updateInspect',
method: 'put',
data: data
})
}
//批量签收 //批量签收
export function updateConsBatchSignOff(data) { export function updateConsBatchSignOff(data) {
return request({ return request({
......
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('验货')" align="center"> <el-table-column :label="$t('验货')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.needInspect==='0'||scope.row.needInspect===null"> <template v-if="scope.row.inspectStatus===null">
{{ $t('未申请') }} {{ $t('未申请') }}
</template> </template>
<template v-else> <template v-else>
...@@ -314,7 +314,10 @@ ...@@ -314,7 +314,10 @@
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item size="mini" type="text" v-if="scope.row.status==1" @click.native="handleDelete(scope.row)">删除 <el-dropdown-item size="mini" type="text" v-if="scope.row.status==1" @click.native="handleDelete(scope.row)">删除
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click.native="handleInspect(scope.row)"> <el-dropdown-item v-if="cancleInspect(scope.row)" @click.native="handleInspectEdit(scope.row)">
{{ $t('验货撤销') }}
</el-dropdown-item>
<el-dropdown-item v-if="scope.row.orderNo==null&&!scope.row.hasAddApproval&&!scope.row.hasExitApproval&&(scope.row.needInspect==0||(scope.row.needInspect==1&&(scope.row.inspectStatus==0&&scope.row.inspectStatus==4)))" @click.native="handleInspect(scope.row)">
{{ $t('验货') }} {{ $t('验货') }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click.native="transmutation(scope.row)">{{ $t('转异') }} <el-dropdown-item @click.native="transmutation(scope.row)">{{ $t('转异') }}
...@@ -355,7 +358,7 @@ ...@@ -355,7 +358,7 @@
</el-dropdown-item> </el-dropdown-item>
<!-- 退仓 --> <!-- 退仓 -->
<el-dropdown-item <el-dropdown-item
v-if="scope.row.status===2&&!hasAddApproval" v-if="scope.row.status===2&&!scope.row.hasAddApproval"
@click.native=" @click.native="
show = true show = true
consId = scope.row.id consId = scope.row.id
...@@ -364,7 +367,7 @@ ...@@ -364,7 +367,7 @@
>{{ $t("退仓") }} >{{ $t("退仓") }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
v-if="!hasExitApproval" v-if="!scope.row.hasExitApproval"
@click.native=" @click.native="
show = true show = true
consId = scope.row.id consId = scope.row.id
...@@ -373,7 +376,7 @@ ...@@ -373,7 +376,7 @@
>{{ $t("取消退仓") }} >{{ $t("取消退仓") }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item <el-dropdown-item
v-if="scope.row.status===2&&!hasAddApproval" v-if="scope.row.status===2&&!scope.row.hasAddApproval"
@click.native=" @click.native="
showReturnWarehouse = true showReturnWarehouse = true
consId = scope.row.id consId = scope.row.id
...@@ -392,12 +395,20 @@ ...@@ -392,12 +395,20 @@
<el-dialog :title="inspectTitle" :visible.sync="openInspect" width="500px" append-to-body> <el-dialog :title="inspectTitle" :visible.sync="openInspect" width="500px" append-to-body>
<div style="margin-bottom: 5px">{{ $t('备注:') }}</div> <div style="margin-bottom: 5px">{{ $t('备注:') }}</div>
<el-input v-model="this.inspectRemark" type="textarea" :rows="3" placeholder="请输入"/> <el-input v-model="inspectRemark" type="textarea" :rows="3" placeholder="请输入"/>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleInspectSubmit">确 定</el-button> <el-button type="primary" @click="handleInspectSubmit">确 定</el-button>
<el-button @click="openInspect = false">取 消</el-button> <el-button @click="openInspect = false">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="inspectTitle" :visible.sync="openInspectExit" width="500px" append-to-body>
<div style="margin-bottom: 5px">{{ $t('备注:') }}</div>
<el-input v-model="inspectRemark" type="textarea" :rows="3" placeholder="请输入"/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleInspectExitSubmit">确 定</el-button>
<el-button @click="openInspectExit = false">取 消</el-button>
</div>
</el-dialog>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
...@@ -499,7 +510,7 @@ ...@@ -499,7 +510,7 @@
</template> </template>
<script> <script>
import {createCons, deleteCons, exportConsExcel, getCons, getConsPage, updateCons} from "@/api/ecw/cons"; import {createCons, deleteCons, exportConsExcel, getCons, getConsPage, updateCons, updateInspect} from "@/api/ecw/cons";
import Transmutation from "@/views/ecw/cons/components/Transmutation.vue" import Transmutation from "@/views/ecw/cons/components/Transmutation.vue"
import Template from "@/views/cms/template/index.vue"; import Template from "@/views/cms/template/index.vue";
import UserSelector from "@/components/UserSelector/index.vue"; import UserSelector from "@/components/UserSelector/index.vue";
...@@ -575,8 +586,10 @@ export default { ...@@ -575,8 +586,10 @@ export default {
}, },
consIds: [], consIds: [],
inspectTitle:null, inspectTitle:null,
inspectRemark:null, inspectRemark:'',
inspectConsId:null,
openInspect:false, openInspect:false,
openInspectExit:false,
consList: [], consList: [],
dateRangeWatEtime: [], dateRangeWatEtime: [],
warehouseList: [], warehouseList: [],
...@@ -674,6 +687,34 @@ export default { ...@@ -674,6 +687,34 @@ export default {
}, },
}, },
methods: { methods: {
handleInspectSubmit(){
const param= {};
param.inspectStatus=1
param.needInspect=1
param.id=this.inspectConsId
param.inspectRemark=this.inspectRemark
updateInspect(param).then((res) => {
if (res.code === 0){
this.$modal.msgSuccess("申请成功");
this.openInspect = false;
this.getList();
}
})
},
handleInspectExitSubmit(){
const param= {};
param.inspectStatus=1
param.needInspect=4
param.id=this.inspectConsId
param.inspectRemark=this.inspectRemark
updateInspect(param).then((res) => {
if (res.code === 0){
this.$modal.msgSuccess("撤销成功");
this.openInspectExit = false;
this.getList();
}
})
},
isEditable(item){ isEditable(item){
debugger debugger
if (item.status===1){ if (item.status===1){
...@@ -758,7 +799,7 @@ export default { ...@@ -758,7 +799,7 @@ export default {
} }
}, },
getInspectionInfo(val, status) { getInspectionInfo(val, status) {
if (!status && status !== 2) { if (!val||(status && status !== 2)) {
return null return null
} }
let inspectionNums = 0; let inspectionNums = 0;
...@@ -963,12 +1004,21 @@ export default { ...@@ -963,12 +1004,21 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleInspect(row) { handleInspect(row) {
const id = row.id; const id = row.id;
this.inspectTitle=row.consNum+"-"+row.customerNumber+"-"+this.$t("包裹详情") this.inspectConsId=id
this.inspectTitle=row.consNum+"-"+row.customerNumber+"-"+this.$t("验货申请")
this.openInspect=true this.openInspect=true
}, },
cancleInspect(item){
return item.inspectStatus===1
},
handleInspectEdit(row) {
const id = row.id;
this.inspectConsId=id
this.inspectTitle=row.consNum+"-"+row.customerNumber+"-"+this.$t("验货撤销")
this.openInspectExit=true
},
/** 签收按钮操作 */ /** 签收按钮操作 */
handleSign(row) { handleSign(row) {
debugger
const id = row.id; const id = row.id;
this.$router.push({ this.$router.push({
path: "/cons/sign", path: "/cons/sign",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment