|
@@ -137,7 +137,17 @@ import asyncRequest from "@/apis/service/purchase/orderRecord";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
export default {
|
|
|
name: "orderRecord",
|
|
|
- props: ["newTime", "oldItem", "newItem", "isDetail", "img", "ratioItem","id", "payNo", "companyNo"],
|
|
|
+ props: [
|
|
|
+ "newTime",
|
|
|
+ "oldItem",
|
|
|
+ "newItem",
|
|
|
+ "isDetail",
|
|
|
+ "img",
|
|
|
+ "ratioItem",
|
|
|
+ "id",
|
|
|
+ "payNo",
|
|
|
+ "companyNo",
|
|
|
+ ],
|
|
|
mixins: [resToken],
|
|
|
data() {
|
|
|
return {
|
|
@@ -217,7 +227,6 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
async initForm() {
|
|
|
- // console.log(this.payNo);
|
|
|
this.loading = true;
|
|
|
await this.resetForm();
|
|
|
|
|
@@ -225,7 +234,7 @@ export default {
|
|
|
this.loading = false;
|
|
|
},
|
|
|
async abnormal() {
|
|
|
- console.log(this.id,this.payNo);
|
|
|
+ console.log(this.id, this.payNo);
|
|
|
this.loading = true;
|
|
|
let model1 = {
|
|
|
sid: this.id,
|
|
@@ -255,32 +264,26 @@ export default {
|
|
|
if (this.$refs.examForm) {
|
|
|
this.$refs.examForm.resetFields();
|
|
|
this.$refs.examForm.clearValidate();
|
|
|
- if (this.newItem.buyer_address) {
|
|
|
- this.examForm.buyer_address = JSON.parse(
|
|
|
- JSON.stringify(this.newItem.buyer_address)
|
|
|
- );
|
|
|
- this.examForm.buyer_bank = JSON.parse(
|
|
|
- JSON.stringify(this.newItem.buyer_bank)
|
|
|
- );
|
|
|
- this.examForm.buyer_id = JSON.parse(
|
|
|
- JSON.stringify(this.newItem.buyer_id)
|
|
|
- );
|
|
|
- this.examForm.buyer_name = JSON.parse(
|
|
|
- JSON.stringify(this.newItem.buyer_name)
|
|
|
- );
|
|
|
+ const {
|
|
|
+ buyer_address,
|
|
|
+ buyer_bank,
|
|
|
+ buyer_id,
|
|
|
+ buyer_name,
|
|
|
|
|
|
- this.examForm.seller_address = JSON.parse(
|
|
|
- JSON.stringify(this.newItem.seller_address)
|
|
|
- );
|
|
|
- this.examForm.seller_bank = JSON.parse(
|
|
|
- JSON.stringify(this.newItem.seller_bank)
|
|
|
- );
|
|
|
- this.examForm.seller_id = JSON.parse(
|
|
|
- JSON.stringify(this.newItem.seller_id)
|
|
|
- );
|
|
|
- this.examForm.seller_name = JSON.parse(
|
|
|
- JSON.stringify(this.newItem.seller_name)
|
|
|
- );
|
|
|
+ seller_address,
|
|
|
+ seller_bank,
|
|
|
+ seller_id,
|
|
|
+ seller_name,
|
|
|
+ } = this.newItem;
|
|
|
+ if (buyer_address) {
|
|
|
+ this.examForm.buyer_address = buyer_address;
|
|
|
+ this.examForm.buyer_bank = buyer_bank;
|
|
|
+ this.examForm.buyer_id = buyer_id;
|
|
|
+ this.examForm.buyer_name = buyer_name;
|
|
|
+ this.examForm.seller_address = seller_address;
|
|
|
+ this.examForm.seller_bank = seller_bank;
|
|
|
+ this.examForm.seller_id = seller_id;
|
|
|
+ this.examForm.seller_name = seller_name;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -290,23 +293,23 @@ export default {
|
|
|
await this.$refs.examForm.validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true;
|
|
|
+ const { buyer_name, buyer_id, buyer_bank, buyer_address } =
|
|
|
+ this.oldItem;
|
|
|
const obj = JSON.parse(JSON.stringify(this.examForm));
|
|
|
- if (obj.buyer_address !== this.oldItem.buyer_address) {
|
|
|
- console.log(obj.buyer_address);
|
|
|
- console.log(this.oldItem.buyer_address);
|
|
|
- this.$message.error("购买方地址、电话不正确!");
|
|
|
+ if (obj.buyer_name !== buyer_name) {
|
|
|
+ this.$message.error("购买方单位名称不正确!");
|
|
|
return;
|
|
|
}
|
|
|
- if (obj.buyer_bank !== this.oldItem.buyer_bank) {
|
|
|
- this.$message.error("购买方开户行及帐号不正确!");
|
|
|
+ if (obj.buyer_id !== buyer_id) {
|
|
|
+ this.$message.error("购买方纳税人识别号不正确!");
|
|
|
return;
|
|
|
}
|
|
|
- if (obj.buyer_id !== this.oldItem.buyer_id) {
|
|
|
- this.$message.error("购买方纳税人识别号不正确!");
|
|
|
+ if (obj.buyer_bank !== buyer_bank) {
|
|
|
+ this.$message.error("购买方开户行及帐号不正确!");
|
|
|
return;
|
|
|
}
|
|
|
- if (obj.buyer_name !== this.oldItem.buyer_name) {
|
|
|
- this.$message.error("购买方单位名称不正确!");
|
|
|
+ if (obj.buyer_address !== buyer_address) {
|
|
|
+ this.$message.error("购买方地址、电话不正确!");
|
|
|
return;
|
|
|
}
|
|
|
let arr = [];
|