|
@@ -356,7 +356,6 @@ export default {
|
|
|
},
|
|
|
// 返回
|
|
|
handleBack () {
|
|
|
- console.log(this.$route)
|
|
|
if (this.$route.query.path == 'salerReturn') {
|
|
|
this.$router.push({ name: 'salesReturnList' })
|
|
|
} else {
|
|
@@ -370,21 +369,39 @@ export default {
|
|
|
item.fileType = item.extName
|
|
|
})
|
|
|
},
|
|
|
- pageInit () {
|
|
|
+ resetForm () {
|
|
|
+ this.form = {
|
|
|
+ applyPersonSn: undefined, // 申请人
|
|
|
+ applyPersonName: undefined,
|
|
|
+ theme: '关于提货事宜', // 主题
|
|
|
+ logisticsCompany: undefined, // 物流公司
|
|
|
+ logisticsPoint: undefined, // 物流点
|
|
|
+ senderName: '', // 发货方
|
|
|
+ senderSn: '',
|
|
|
+ receiverName: '', // 收货人
|
|
|
+ receiverPhone: '', // 电话
|
|
|
+ goodsNum: '', // 件数
|
|
|
+ freight: '', // 运费
|
|
|
+ remarks: '',
|
|
|
+ attachmentList: '' // 附件
|
|
|
+ }
|
|
|
this.attachList = []
|
|
|
- this.form.attachmentList = ''
|
|
|
this.$refs.attachList.setFileList('')
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
-
|
|
|
- if (this.$route.params.sn) { // 编辑页
|
|
|
+ },
|
|
|
+ pageInit () {
|
|
|
+ this.resetForm()
|
|
|
+ console.log('----')
|
|
|
+ // 编辑页
|
|
|
+ if (this.$route.params.sn) {
|
|
|
this.form.theme = ''
|
|
|
this.getDetail()
|
|
|
this.getReturnOrderList()
|
|
|
} else {
|
|
|
+ this.chooseData = []
|
|
|
// 从销售退货列表过来的数据
|
|
|
const cd = this.$store.state.app.tempBillOfData
|
|
|
- if (cd) {
|
|
|
- this.chooseData = []
|
|
|
+ if (cd && this.$route.query.path == 'salerReturn') {
|
|
|
this.chooseData.push(cd)
|
|
|
}
|
|
|
}
|
|
@@ -392,9 +409,7 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
'$store.state.app.tempBillOfData' (newValue, oldValue) {
|
|
|
- console.log(newValue)
|
|
|
- this.chooseData = []
|
|
|
- this.chooseData.push(newValue)
|
|
|
+ this.pageInit()
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|