|
@@ -379,7 +379,7 @@
|
|
//构造查看priceList数据
|
|
//构造查看priceList数据
|
|
this.priceList = []
|
|
this.priceList = []
|
|
this.makeLookPriceList()
|
|
this.makeLookPriceList()
|
|
- if(this.$route.query.type == '编辑'){
|
|
|
|
|
|
+ if(this.$route.query.type != '新增'){
|
|
let _data = this.priceList
|
|
let _data = this.priceList
|
|
for (let i = 0; i < _data.length; i++) {
|
|
for (let i = 0; i < _data.length; i++) {
|
|
if (i == 0) this.checkList1 = _data[i].checkList
|
|
if (i == 0) this.checkList1 = _data[i].checkList
|
|
@@ -800,56 +800,57 @@
|
|
},
|
|
},
|
|
// 提交
|
|
// 提交
|
|
submit() {
|
|
submit() {
|
|
- this.isCountShow = false
|
|
|
|
- let isValidate = false
|
|
|
|
- isValidate = this.validate()
|
|
|
|
- if (isValidate) {
|
|
|
|
- this.makeTableList()
|
|
|
|
- this.baseInfoForm.details = []
|
|
|
|
- this.makePriceDataList()
|
|
|
|
- this.baseInfoForm.goodsName = this.selectVal
|
|
|
|
- switch (this.$route.query.type) {
|
|
|
|
- case '查看':
|
|
|
|
- this.isCountShow = false;
|
|
|
|
- break;
|
|
|
|
- case '新增':
|
|
|
|
- isValidate = this.validate()
|
|
|
|
- if (isValidate) {
|
|
|
|
- purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
|
|
|
|
- // this.tableData = response.records
|
|
|
|
- this.isCountShow = false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
- case '编辑':
|
|
|
|
- this.getEditCheckList()
|
|
|
|
- isValidate = this.validate()
|
|
|
|
- if (isValidate) {
|
|
|
|
- purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
|
|
|
|
- this.isCountShow = false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
- case '审核中':
|
|
|
|
- // this.makePriceDataList()
|
|
|
|
- this.getEditCheckList()
|
|
|
|
- isValidate = this.validate()
|
|
|
|
- if (isValidate) {
|
|
|
|
- purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
|
|
|
|
- let that = this
|
|
|
|
- this.$confirm(`是否确定通过?`, {
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- type: 'warning',
|
|
|
|
- }).then(() => {
|
|
|
|
- //审核
|
|
|
|
- that.audit(this.baseInfoForm, true, 2)
|
|
|
|
|
|
+ let isValidate = false
|
|
|
|
+ isValidate = this.validate()
|
|
|
|
+
|
|
|
|
+ if (isValidate) {
|
|
|
|
+ this.isCountShow = false
|
|
|
|
+ this.makeTableList()
|
|
|
|
+ this.baseInfoForm.details = []
|
|
|
|
+ this.makePriceDataList()
|
|
|
|
+ this.baseInfoForm.goodsName = this.selectVal
|
|
|
|
+ switch (this.$route.query.type) {
|
|
|
|
+ case '查看':
|
|
|
|
+ this.isCountShow = false;
|
|
|
|
+ break;
|
|
|
|
+ case '新增':
|
|
|
|
+ isValidate = this.validate()
|
|
|
|
+ if (isValidate) {
|
|
|
|
+ purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
|
|
|
|
+ // this.tableData = response.records
|
|
|
|
+ this.isCountShow = false
|
|
})
|
|
})
|
|
- })
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case '编辑':
|
|
|
|
+ this.getEditCheckList()
|
|
|
|
+ isValidate = this.validate()
|
|
|
|
+ if (isValidate) {
|
|
|
|
+ purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
|
|
|
|
+ this.isCountShow = false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case '审核中':
|
|
|
|
+ // this.makePriceDataList()
|
|
|
|
+ this.getEditCheckList()
|
|
|
|
+ isValidate = this.validate()
|
|
|
|
+ if (isValidate) {
|
|
|
|
+ purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
|
|
|
|
+ let that = this
|
|
|
|
+ this.$confirm(`是否确定通过?`, {
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ }).then(() => {
|
|
|
|
+ //审核
|
|
|
|
+ that.audit(this.baseInfoForm, true, 2)
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
},
|
|
},
|
|
//审核
|
|
//审核
|