|
@@ -25,22 +25,41 @@
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
-
|
|
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
- label="退货备注"
|
|
|
|
|
- prop="remark"
|
|
|
|
|
|
|
+ label="退货类型"
|
|
|
|
|
+ prop="sendNo"
|
|
|
style="margin-bottom: 22px"
|
|
style="margin-bottom: 22px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ v-model="form.returnType"
|
|
|
|
|
+ placeholder="请选择"
|
|
|
|
|
+ @change="onchangeLink"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in returnList"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ label="赔偿金额"
|
|
|
|
|
+ prop="aa"
|
|
|
|
|
+ style="margin-bottom: 22px"
|
|
|
|
|
+ v-show="['3','5'].includes(form.returnType)"
|
|
|
>
|
|
>
|
|
|
<el-input
|
|
<el-input
|
|
|
clearable
|
|
clearable
|
|
|
- v-model="form.remark"
|
|
|
|
|
- type="textarea"
|
|
|
|
|
|
|
+ v-model="aa"
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item prop="repliedFiles" label="回执附件">
|
|
|
|
|
|
|
+ <el-form-item prop="returnFiles" label="退货附件">
|
|
|
<fileUpload
|
|
<fileUpload
|
|
|
- v-model="form.repliedFiles"
|
|
|
|
|
|
|
+ v-model="form.returnFiles"
|
|
|
module="main"
|
|
module="main"
|
|
|
:showLib="false"
|
|
:showLib="false"
|
|
|
:limit="10"
|
|
:limit="10"
|
|
@@ -57,9 +76,30 @@
|
|
|
{{ form.contactName }}
|
|
{{ form.contactName }}
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item prop="returnFiles" label="退货附件">
|
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ label="退货备注"
|
|
|
|
|
+ prop="remark"
|
|
|
|
|
+ style="margin-bottom: 22px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ clearable
|
|
|
|
|
+ v-model="form.remark"
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ label="总金额"
|
|
|
|
|
+ prop="bb"
|
|
|
|
|
+ style="margin-bottom: 22px"
|
|
|
|
|
+ v-show="!['4'].includes(form.returnType)"
|
|
|
|
|
+
|
|
|
|
|
+ >
|
|
|
|
|
+ {{+aa+form.totalAmount}}元
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item prop="repliedFiles" label="回执附件">
|
|
|
<fileUpload
|
|
<fileUpload
|
|
|
- v-model="form.returnFiles"
|
|
|
|
|
|
|
+ v-model="form.repliedFiles"
|
|
|
module="main"
|
|
module="main"
|
|
|
:showLib="false"
|
|
:showLib="false"
|
|
|
:limit="10"
|
|
:limit="10"
|
|
@@ -68,12 +108,29 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
- <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle>
|
|
|
|
|
|
|
+ <headerTitle
|
|
|
|
|
+ title="原货产品清单"
|
|
|
|
|
+ style="margin-top: 30px"
|
|
|
|
|
+ v-show="['1', '2', '3'].includes(form.returnType)"
|
|
|
|
|
+ ></headerTitle>
|
|
|
<inventoryTable
|
|
<inventoryTable
|
|
|
|
|
+ v-show="['1', '2', '3'].includes(form.returnType)"
|
|
|
|
|
+ :returnType="form.returnType"
|
|
|
ref="inventoryTableref"
|
|
ref="inventoryTableref"
|
|
|
:sendId="form.sendId"
|
|
:sendId="form.sendId"
|
|
|
></inventoryTable>
|
|
></inventoryTable>
|
|
|
- <el-row style="margin-top: 20px">
|
|
|
|
|
|
|
+ <headerTitle
|
|
|
|
|
+ title="实物赔偿清单"
|
|
|
|
|
+ v-show="['2', '4'].includes(form.returnType)"
|
|
|
|
|
+ style="margin-top: 30px"
|
|
|
|
|
+ ></headerTitle>
|
|
|
|
|
+ <inventoryTable1
|
|
|
|
|
+ v-show="['2', '4'].includes(form.returnType)"
|
|
|
|
|
+
|
|
|
|
|
+ ref="inventoryTableref1"
|
|
|
|
|
+ :sendId="form.sendId"
|
|
|
|
|
+ ></inventoryTable1>
|
|
|
|
|
+ <!-- <el-row style="margin-top: 20px">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="总金额"
|
|
label="总金额"
|
|
@@ -92,7 +149,7 @@
|
|
|
<el-input clearable v-model="form.payAmount" placeholder="请输入" />
|
|
<el-input clearable v-model="form.payAmount" placeholder="请输入" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
|
|
|
|
+ </el-row> -->
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
|
<div slot="footer" class="footer">
|
|
<div slot="footer" class="footer">
|
|
@@ -108,7 +165,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import { emailReg, phoneReg, numberReg } from 'ele-admin';
|
|
|
|
|
|
|
+ import { numberReg } from 'ele-admin';
|
|
|
import { acceptUnpackoptions } from '@/enum/dict';
|
|
import { acceptUnpackoptions } from '@/enum/dict';
|
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
@@ -125,6 +182,7 @@
|
|
|
import inventoryTable from './inventoryTable.vue';
|
|
import inventoryTable from './inventoryTable.vue';
|
|
|
import sendListDialog from './sendListDialog.vue';
|
|
import sendListDialog from './sendListDialog.vue';
|
|
|
import { copyObj } from '@/utils/util';
|
|
import { copyObj } from '@/utils/util';
|
|
|
|
|
+ import inventoryTable1 from '@/views/contractManage/contractBook/components/inventoryTable.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
mixins: [dictMixins],
|
|
@@ -132,7 +190,7 @@
|
|
|
fileUpload,
|
|
fileUpload,
|
|
|
deptSelect,
|
|
deptSelect,
|
|
|
sendListDialog,
|
|
sendListDialog,
|
|
|
- inventoryTable,
|
|
|
|
|
|
|
+ inventoryTable,inventoryTable1,
|
|
|
parentList,
|
|
parentList,
|
|
|
personSelect
|
|
personSelect
|
|
|
},
|
|
},
|
|
@@ -145,10 +203,19 @@
|
|
|
remark: '',
|
|
remark: '',
|
|
|
sendId: '',
|
|
sendId: '',
|
|
|
sendNo: '',
|
|
sendNo: '',
|
|
|
- totalAmount: ''
|
|
|
|
|
|
|
+ totalAmount: '',
|
|
|
|
|
+ returnType: ''
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
|
|
|
+ aa:'',
|
|
|
|
|
+ returnList: [
|
|
|
|
|
+ { label: '原货退回', value: '1' },
|
|
|
|
|
+ { label: '部分原货+实物赔偿', value: '2' },
|
|
|
|
|
+ { label: '部分原货+现金赔偿', value: '3' },
|
|
|
|
|
+ { label: '全部实物赔偿', value: '4' },
|
|
|
|
|
+ { label: '全部现金赔偿', value: '5' }
|
|
|
|
|
+ ],
|
|
|
detailData: {},
|
|
detailData: {},
|
|
|
payWayOptions: [],
|
|
payWayOptions: [],
|
|
|
delDetailIds: [],
|
|
delDetailIds: [],
|
|
@@ -313,16 +380,13 @@
|
|
|
loading: false,
|
|
loading: false,
|
|
|
// 是否是修改
|
|
// 是否是修改
|
|
|
isUpdate: false,
|
|
isUpdate: false,
|
|
|
- businessId: ''
|
|
|
|
|
|
|
+ businessId: '',
|
|
|
|
|
+ orderId:""
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
totalAmount() {
|
|
totalAmount() {
|
|
|
let allcountAmount = this.$store.state.returnGoods.allcountAmount;
|
|
let allcountAmount = this.$store.state.returnGoods.allcountAmount;
|
|
|
- if (!this.$store.state.isDefaultPayableAmount) {
|
|
|
|
|
- this.form.payAmount = allcountAmount;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
return allcountAmount;
|
|
return allcountAmount;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -337,9 +401,13 @@
|
|
|
this.form.productList.splice(index, 1);
|
|
this.form.productList.splice(index, 1);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+ onchangeLink() {
|
|
|
|
|
+ this.getSendSaleOrderDetail(this.form.sendId)
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
//选择订单回调
|
|
//选择订单回调
|
|
|
changeOrder(obj) {
|
|
changeOrder(obj) {
|
|
|
|
|
+ // this.orderId=obj.id
|
|
|
// this.form = Object.assign({},this.form,{
|
|
// this.form = Object.assign({},this.form,{
|
|
|
// orderId: obj.orderId,
|
|
// orderId: obj.orderId,
|
|
|
// sendNo: obj.docNo,
|
|
// sendNo: obj.docNo,
|
|
@@ -457,17 +525,20 @@
|
|
|
if (!this.isUpdate) {
|
|
if (!this.isUpdate) {
|
|
|
delete this.form.id;
|
|
delete this.form.id;
|
|
|
}
|
|
}
|
|
|
- let productList = this.$refs.inventoryTableref.getTableValue();
|
|
|
|
|
- if (productList.length === 0) {
|
|
|
|
|
|
|
+ let data = this.$refs.inventoryTableref.getTableValue();
|
|
|
|
|
+ if (data.productList.length === 0) {
|
|
|
return this.$message.error('至少选择一个退货产品');
|
|
return this.$message.error('至少选择一个退货产品');
|
|
|
}
|
|
}
|
|
|
this.form.repliedFiles = this.form.repliedFiles || [];
|
|
this.form.repliedFiles = this.form.repliedFiles || [];
|
|
|
this.form.replied = this.form.repliedFiles.length > 0 ? 1 : 0;
|
|
this.form.replied = this.form.repliedFiles.length > 0 ? 1 : 0;
|
|
|
let commitData = Object.assign({}, this.form, {
|
|
let commitData = Object.assign({}, this.form, {
|
|
|
totalAmount: Number(this.totalAmount),
|
|
totalAmount: Number(this.totalAmount),
|
|
|
- productList
|
|
|
|
|
|
|
+ productList: data.productList
|
|
|
});
|
|
});
|
|
|
|
|
+ commitData.payAmount = data.payAmount;
|
|
|
|
|
|
|
|
|
|
+ console.log(commitData, 'commitData');
|
|
|
|
|
+ return;
|
|
|
if (this.isUpdate) {
|
|
if (this.isUpdate) {
|
|
|
UpdateReturnInformation(commitData)
|
|
UpdateReturnInformation(commitData)
|
|
|
.then((res) => {
|
|
.then((res) => {
|