diff --git a/src/views/framework/architecture/azjg2.vue b/src/views/framework/architecture/azjg2.vue
index 32b1fb5..a2fe35e 100644
--- a/src/views/framework/architecture/azjg2.vue
+++ b/src/views/framework/architecture/azjg2.vue
@@ -129,8 +129,8 @@
{{'添加'}}
+ >{{ '添加' }}
| {{ '会员编号' }} |
{{ '会员名称' }} |
- {{'产品名称'}} |
- {{'产品规格'}} |
- {{'提货基数'}} |
+ {{ '产品名称' }} |
+ {{ '产品规格' }} |
+ {{ '提货基数' }} |
可提数量 |
增加数量 |
{{ '截止日期' }} |
@@ -120,7 +120,7 @@
v-show="ctem.waresGiftConfigList.length==0"
class="tableAddPro"
>
- {{'添加产品'}}
+ {{ '添加产品' }}
-
+
|
-
+
|
-
+
|
-
-
-
- {{ '搜索' }}
-
-
+
+
+
+ {{ '搜索' }}
+
+
-
-
+
{{'选择规格'}}
+ >{{ '选择规格' }}
- {{'取消'}}
+ {{ '取消' }}
{{'确认'}}
+ >{{ '确认' }}
@@ -366,14 +371,14 @@
@click="cancelCz"
> {{ '取消' }}
{{ '确认' }}
{
// console.error(res)
- if(res.data.detailList){
+ if (res.data.detailList) {
that.allData = [{ 'consumeRuleConfigList': [{
- memberName: res.data.memberName,
- memberCode: res.data.memberCode,
- pkId: res.data.pkId,
- baseQuantity: res.data.baseQuantity,
- receiveTime: res.data.receiveTime,
- usableQuantity: res.data.usableQuantity,
- quantity: 0,
- isFreeMail: res.data.isFreeMail,
- waresGiftConfigList: [
- {
- pkProduct: res.data.detailList[0].pkProduct,
- productName: res.data.detailList[0].productName,
- specsName: res.data.detailList[0].specsName,
- specsNameId: res.data.detailList[0].specsNameId,
- quantity: res.data.detailList[0].quantity
- }
- ] }], 'orderType': 1 }]
- }else{
+ memberName: res.data.memberName,
+ memberCode: res.data.memberCode,
+ pkId: res.data.pkId,
+ baseQuantity: res.data.baseQuantity,
+ receiveTime: res.data.receiveTime,
+ usableQuantity: res.data.usableQuantity,
+ quantity: 0,
+ isFreeMail: res.data.isFreeMail,
+ waresGiftConfigList: [
+ {
+ pkProduct: res.data.detailList[0].pkProduct,
+ productName: res.data.detailList[0].productName,
+ specsName: res.data.detailList[0].specsName,
+ specsNameId: res.data.detailList[0].specsNameId,
+ quantity: res.data.detailList[0].quantity
+ }
+ ] }], 'orderType': 1 }]
+ } else {
that.allData = [{ 'consumeRuleConfigList': [{
- memberName: res.data.memberName,
- memberCode: res.data.memberCode,
- pkId: res.data.pkId,
- baseQuantity: res.data.baseQuantity,
- receiveTime: res.data.receiveTime,
- usableQuantity: res.data.usableQuantity,
- quantity: 0,
- isFreeMail: res.data.isFreeMail,
- waresGiftConfigList: [
- {
- pkProduct:'',
- productName: '',
- specsName: '',
- specsNameId: '',
- quantity: 0
- }
- ] }], 'orderType': 1 }]
+ memberName: res.data.memberName,
+ memberCode: res.data.memberCode,
+ pkId: res.data.pkId,
+ baseQuantity: res.data.baseQuantity,
+ receiveTime: res.data.receiveTime,
+ usableQuantity: res.data.usableQuantity,
+ quantity: 0,
+ isFreeMail: res.data.isFreeMail,
+ waresGiftConfigList: [
+ {
+ pkProduct: '',
+ productName: '',
+ specsName: '',
+ specsNameId: '',
+ quantity: 0
+ }
+ ] }], 'orderType': 1 }]
}
-
})
this.$forceUpdate()
},
@@ -558,7 +562,7 @@ export default {
'receiveTime': res.receiveTime,
'specsName': res.waresGiftConfigList[0].specsName, 'specsNameId': res.waresGiftConfigList[0].specsNameId,
'baseQuantity': res.baseQuantity, 'quantity': res.quantity, 'isFreeMail': res.isFreeMail, 'pkPostage': res.pkPostage,
- "pkId":res.pkId?res.pkId:''
+ 'pkId': res.pkId ? res.pkId : ''
}
)
})
@@ -590,7 +594,7 @@ export default {
}
if (res.quantity === '' || res.quantity == undefined) {
this.flags = 3
-
+
return false
} else {
this.flags = 2
@@ -619,20 +623,20 @@ export default {
})
} else if (this.flags == 3) {
this.$message({
- message: '请输入增加数量',
- type: 'warning'
- })
- }else {
+ message: '请输入增加数量',
+ type: 'warning'
+ })
+ } else {
this.$router.push({
path: 'rechargeQc',
query: {
data: JSON.stringify(dataList),
- approvalBusiness: 700,
+ approvalBusiness: 700
}
})
}
},
- saveDate1(){
+ saveDate1() {
const dataList = []
this.allData[0].consumeRuleConfigList.forEach((res) => {
dataList.push(
@@ -641,18 +645,18 @@ export default {
'receiveTime': res.receiveTime,
'specsName': res.waresGiftConfigList[0].specsName, 'specsNameId': res.waresGiftConfigList[0].specsNameId,
'baseQuantity': res.baseQuantity, 'quantity': res.quantity, 'isFreeMail': res.isFreeMail, 'pkPostage': res.pkPostage,
- "pkId":res.pkId?res.pkId:''
+ 'pkId': res.pkId ? res.pkId : ''
}
)
})
this.$router.push({
- path: 'rechargeQc',
- query: {
- data: JSON.stringify(dataList),
- approvalBusiness: 701,
- type:this.deled
- }
- })
+ path: 'rechargeQc',
+ query: {
+ data: JSON.stringify(dataList),
+ approvalBusiness: 701,
+ type: this.deled
+ }
+ })
},
getPage(allData) {
this.allData = allData
@@ -690,13 +694,19 @@ export default {
this.ggVisible = false
},
sureProduct() {
- if (this.selectData.length == 0) {
+ if (!this.selectData) {
this.$message({
message: '请选择产品',
type: 'warning'
})
- return false
} else {
+ if (!this.selectData.selSkuNameList || this.selectData.selSkuNameList.length === 0) {
+ this.$message({
+ message: '请选择产品规格',
+ type: 'warning'
+ })
+ return
+ }
this.allData.forEach((item) => {
if (this.isArea == item.orderType) {
item.consumeRuleConfigList[this.showCndex].waresGiftConfigList[
@@ -758,7 +768,7 @@ export default {
this.isArea = val
},
handleClose() {
- this.selectData = []
+ this.selectData = undefined
this.dialogVisible = false
},
handleCloseGg() {
@@ -838,7 +848,7 @@ export default {
},
getDataList() {
api
- .getProductAll(Object.assign({isPutOn:0}, this.queryParams, this.select,{isExistSpecs:1}))
+ .getProductAll(Object.assign({ isPutOn: 0 }, this.queryParams, this.select, { isExistSpecs: 1 }))
.then((res) => {
res.rows.forEach((item) => {
item.quantity = 1
@@ -872,18 +882,23 @@ export default {
},
selected(selection, row) {
// 清除 所有勾选项
+ if (selection.length === 0) {
+ this.selectData = undefined
+ } else {
+ this.selectData = row
+ }
+
this.$refs.multipleTable.clearSelection()
- // 当表格数据都没有被勾选的时候 就返回
- // 主要用于将当前勾选的表格状态清除
- if (selection.length == 0) return
this.$refs.multipleTable.toggleRowSelection(row, true)
- this.selectData = row
- },
- // 表格的选中 可以获得当前选中的数据
- selectionChange(val) {
- // 将选中的数据存储起来
- this.selectData = val
+ // // 当表格数据都没有被勾选的时候 就返回
+ // // 主要用于将当前勾选的表格状态清除
+ // this.$nextTick(() => {
+ // if (selection.length == 0) return
+ // this.$refs.multipleTable.toggleRowSelection(row, true)
+ // this.selectData = row
+ // })
},
+
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return 'warning-row'
|