Commit 7d2eb518 authored by Smile's avatar Smile

需求 后台-集运-包裹复制

parent a6ef0906
...@@ -202,8 +202,8 @@ ...@@ -202,8 +202,8 @@
</el-form-item> </el-form-item>
</el-card> </el-card>
</el-form> </el-form>
<el-button type="primary" @click="submitForm(0)" v-if="!editMode&&!signedMode">{{ $t('添加包裹') }}</el-button><!--草稿--> <el-button type="primary" @click="submitForm(0)" v-if="copyMode||(!editMode&&!signedMode)">{{ $t('添加包裹') }}</el-button><!--草稿-->
<el-button type="primary" @click="submitForm(1)" v-if="editMode">{{ $t('保存') }}</el-button><!--草稿--> <el-button type="primary" @click="submitForm(1)" v-if="!copyMode&&editMode">{{ $t('保存') }}</el-button><!--草稿-->
<el-button type="primary" @click="submitForm(1)" v-if="signedMode">{{ $t('确认签收') }}</el-button><!--草稿--> <el-button type="primary" @click="submitForm(1)" v-if="signedMode">{{ $t('确认签收') }}</el-button><!--草稿-->
<el-button @click="$store.dispatch('tagsView/delCurrentView')">{{ $t('取消') }}</el-button> <el-button @click="$store.dispatch('tagsView/delCurrentView')">{{ $t('取消') }}</el-button>
<choose-contact-dialog v-if="!!contactChooseType" :type="2" @choose="onContactChoose" <choose-contact-dialog v-if="!!contactChooseType" :type="2" @choose="onContactChoose"
...@@ -323,6 +323,9 @@ export default { ...@@ -323,6 +323,9 @@ export default {
signedMode() { signedMode() {
return this.$route.path.indexOf('sign') > 0; return this.$route.path.indexOf('sign') > 0;
}, },
copyMode() {
return this.$route.query.copy && this.$route.query.copy == 1;
},
exportCityList() { exportCityList() {
console.log("this.tradeCityList", this.tradeCityList) console.log("this.tradeCityList", this.tradeCityList)
return this.tradeCityList.filter(item => item.type == 2 || item.type == 3) return this.tradeCityList.filter(item => item.type == 2 || item.type == 3)
...@@ -356,6 +359,23 @@ export default { ...@@ -356,6 +359,23 @@ export default {
getCons(){ getCons(){
getCons(this.$route.query.id).then(res => { getCons(this.$route.query.id).then(res => {
this.form = res.data this.form = res.data
if (this.$route.query.copy && this.$route.query.copy == 1) {
this.form.consId = null
this.form.consNo = null
this.form.expressNo=null
this.form.orderId=null
this.form.inspectStatus=null
this.form.inspectRemark=null
this.form.signStatus=null
this.form.signedTime=null
this.form.signedRemarks=null
this.form.signer=null
this.form.consItemVOList.forEach(item => {
item.id = null
item.consId = null
item.consItemId = null
})
}
}) })
}, },
submitForm(val) { submitForm(val) {
...@@ -438,7 +458,11 @@ export default { ...@@ -438,7 +458,11 @@ export default {
if (this.more) { if (this.more) {
this.resetByMore() this.resetByMore()
} else { } else {
this.$redirect('success?consId=' + res.data) if (this.copyMode){
this.$redirect('cons/success?consId=' + res.data)
}else{
this.$redirect('success?consId=' + res.data)
}
} }
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
......
...@@ -322,6 +322,8 @@ ...@@ -322,6 +322,8 @@
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click.native="transmutation(scope.row)">{{ $t('转异') }} <el-dropdown-item @click.native="transmutation(scope.row)">{{ $t('转异') }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click.native="copyCons(scope.row)">{{ $t('复制') }}
</el-dropdown-item>
<el-dropdown-item @click.native="specialNeedsCons(scope.row)">{{ $t('特需') }} <el-dropdown-item @click.native="specialNeedsCons(scope.row)">{{ $t('特需') }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click.native="specialNeedsConsLook(scope.row)"> <el-dropdown-item @click.native="specialNeedsConsLook(scope.row)">
...@@ -1086,6 +1088,17 @@ export default { ...@@ -1086,6 +1088,17 @@ export default {
this.id = row.id this.id = row.id
this.showException = true this.showException = true
}, },
//复制
copyCons(row) {
const id = row.id
this.$router.push({
path: "/cons/edit",
query: {
copy: 1,
id: id
}
});
},
//特需 //特需
specialNeedsCons(row) { specialNeedsCons(row) {
this.id = row.id this.id = row.id
......
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