|
@@ -5,7 +5,6 @@
|
|
|
:titleText="`${mainData.billno}`"
|
|
|
:editData="mainData"
|
|
|
:mainAreaData="mainAreaData"
|
|
|
- delApiId="20221114135503"
|
|
|
turnPageId="20221114135403"
|
|
|
idname="sa_dispatchid"
|
|
|
ownertable="sa_dispatch"
|
|
@@ -20,6 +19,7 @@
|
|
|
<el-button type="primary" size="mini" v-if="tool.checkAuth($route.name,'createBill')" :disabled="mainData.STATUS !== '复核'" @click="addLogistics">生成物流单</el-button>
|
|
|
<el-button type="primary" size="mini" v-if="tool.checkAuth($route.name,'check')" :disabled="mainData.STATUS !== '新建' && mainData.STATUS !== '审核'" @click="onCheck">{{mainData.STATUS === '审核'?'反审':mainData.STATUS === '复核'?'反审':'审核'}}</el-button>
|
|
|
<el-button class="inline-16" type="primary" size="mini" v-if="tool.checkAuth($route.name,'recheck')" :disabled="mainData.STATUS !== '审核' && mainData.STATUS !== '复核'" @click="onReCheck">{{mainData.STATUS === '复核'?'反复核':'复核'}}</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="onDel" style="margin-left: 0px" class="inline-16" :disabled="mainData.STATUS === '审核' || mainData.STATUS === '复核'">删 除</el-button>
|
|
|
</div>
|
|
|
<div slot="slot2" >
|
|
|
<default-info :mainData="mainData"></default-info>
|
|
@@ -162,7 +162,7 @@ import defaultInfo from '../modules/defaultInfo.vue'
|
|
|
this.queryMainData(this.$route.query.id)
|
|
|
this.$refs.product && this.$refs.product.listData()
|
|
|
console.log('触发');
|
|
|
-
|
|
|
+
|
|
|
this.$emit('onSuccess')
|
|
|
},
|
|
|
onCheck () {
|
|
@@ -174,7 +174,7 @@ import defaultInfo from '../modules/defaultInfo.vue'
|
|
|
const res = await this.$api.requested({
|
|
|
"id": this.mainData.STATUS === '审核'?20221114135703:20221114135603,
|
|
|
"version":1,
|
|
|
- "content": {
|
|
|
+ "content": {
|
|
|
"sa_dispatchid":this.$route.query.id
|
|
|
}
|
|
|
})
|
|
@@ -186,7 +186,7 @@ import defaultInfo from '../modules/defaultInfo.vue'
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
message: '已取消'
|
|
|
- });
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
onReCheck() {
|
|
@@ -198,7 +198,7 @@ import defaultInfo from '../modules/defaultInfo.vue'
|
|
|
const res = await this.$api.requested({
|
|
|
"id":20221114135803,
|
|
|
"version":1,
|
|
|
- "content": {
|
|
|
+ "content": {
|
|
|
"sa_dispatchid":this.$route.query.id,
|
|
|
"isrecheck":this.mainData.STATUS === '复核'?false:true
|
|
|
}
|
|
@@ -210,7 +210,7 @@ import defaultInfo from '../modules/defaultInfo.vue'
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
message: '已取消'
|
|
|
- });
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
async addLogistics () {
|
|
@@ -220,13 +220,42 @@ import defaultInfo from '../modules/defaultInfo.vue'
|
|
|
"sa_dispatchid":this.mainData.sa_dispatchid
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
this.tool.showMessage(res,()=>{
|
|
|
let route = this.$route
|
|
|
this.oldRoute = {path:route.path,query:route.query}
|
|
|
this.$store.dispatch('setHistoryRouter',this.oldRoute)
|
|
|
this.$router.replace({path:'/logisticsdetail',query:{id:res.data[0].sa_logisticsid,rowindex:res.data[0].rowindex}})
|
|
|
})
|
|
|
+ },
|
|
|
+ onDel(){
|
|
|
+ this.$confirm('确定删除当前数据吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id":20221114135503,
|
|
|
+ "content":{
|
|
|
+ sa_dispatchids:[this.$route.query.id]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (res.code === 0){
|
|
|
+ this.$message.error(res.data[0].errmsg);
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ message: '删除成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.$store.dispatch('changeDetailDrawer',false);
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
@@ -236,7 +265,7 @@ import defaultInfo from '../modules/defaultInfo.vue'
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-
|
|
|
+
|
|
|
<style scoped>
|
|
|
-
|
|
|
- </style>
|
|
|
+
|
|
|
+ </style>
|