diff --git a/src/views/invoicing/components/shopList.vue b/src/views/invoicing/components/shopList.vue
index 2d5da25..dc5ae97 100644
--- a/src/views/invoicing/components/shopList.vue
+++ b/src/views/invoicing/components/shopList.vue
@@ -16,7 +16,7 @@
-
+
@@ -36,11 +36,11 @@
- {{ scope.row.isPauseSale == 1?'是':'否' }}
+ {{ scope.row.isPauseSale == 1 ? '是' : '否' }}
- {{ scope.row.isDistribute == 1?'是':'否' }}
+ {{ scope.row.isDistribute == 1 ? '是' : '否' }}
@@ -85,16 +85,30 @@ export default {
loading: false,
list: []
},
- goods: []
+ goods: [],
+ // 是否单选
+ isselect: false
}
},
methods: {
+ firstSelectChange() {
+ // console.log(selection)
+ let selection = this.$refs.table.selection
+ if (selection.length > 1 && this.isselect) {
+ const del_row = selection.shift();
+ this.$refs.table.toggleRowSelection(del_row, false);
+ }
+ },
// 确定选商品
confirmHandle() {
let res = this.$refs.table.selection
this.$emit('success', res)
this.close()
},
+ // 是否单选
+ isselectEvent() {
+ this.isselect = true
+ },
// 重置查询
resetHandle() {
this.searhForm.name = ''
diff --git a/src/views/invoicing/consumable/information.vue b/src/views/invoicing/consumable/information.vue
index d1cf7dd..645aa40 100644
--- a/src/views/invoicing/consumable/information.vue
+++ b/src/views/invoicing/consumable/information.vue
@@ -56,9 +56,9 @@
-
+
@@ -271,7 +271,7 @@ export default {
{ required: true, message: '请输入耗材信息名称', trigger: 'blur' }
],
conNames: [
- { required: true, message: '请输入耗材类型', trigger: 'blur' }
+ { required: true, message: '请选择耗材类型', trigger: 'blur' }
],
price: [
{ required: true, message: '请输入耗材价格', trigger: 'blur' }
@@ -386,7 +386,6 @@ export default {
},
// 选择的类型
tableDatatypetable(item) {
- console.log(item, '调试-选择完的数据')
this.ruleForm.conCode = item.conTypeCode
this.ruleForm.conNames = item.conTypeName
this.ruleForm.conTypeId = item.id
diff --git a/src/views/invoicing/consumable/specifications.vue b/src/views/invoicing/consumable/specifications.vue
index f3ef213..df628b7 100644
--- a/src/views/invoicing/consumable/specifications.vue
+++ b/src/views/invoicing/consumable/specifications.vue
@@ -38,19 +38,19 @@
-
-
+
+
+
+
+
-
-
-
-
+
@@ -58,11 +58,11 @@
禁用
-
+
@@ -80,9 +80,16 @@
-
+
+
+ {{ addSelect.length ? addSelect[0].name : '' }}
+
+
-
+
@@ -278,11 +287,13 @@ export default {
this.getTableDatasku()
this.getTableDatainformation()
this.$nextTick(() => {
- this.tableDrag()
+ // this.tableDrag()
+ this.$refs.shopList.isselectEvent()
})
},
methods: {
selectShop(res) {
+ console.log(res, '调试1')
this.addSelect = res
res[0]['specSnap'] = res[0].name
this.clickdialogframe('add')
@@ -420,6 +431,7 @@ export default {
shopId: localStorage.getItem('shopId'),
specSnap: this.querytableDatasku.specSnap,
name: this.querytableDatasku.name,
+ sort: 'id.desc',
shopName: this.querytableDatasku.shopName
})
this.tableDatasku.loading = false
@@ -460,39 +472,46 @@ export default {
});
this.informationdialogshowedit = false
} else {
+
+
let { id, consInfoId, surplusStock } = this.addSelect[0]
+ // 1为共享库存
+ if (this.addSelect[0].isDistribute != 1) {
+ surplusStock = this.addSelect[0].skuList[0].surplusStock
+ }
let obj = {
productId: id,
consInfoId: consInfoId,
skuInfos: null,
surplusStock: surplusStock
}
- // 1为共享库存
- if (this.addSelect[0].isDistribute != 1) {
- let isgongx = false
- this.addSelect[0].skuList.forEach(ele => {
- if (!ele.skuId || !ele.surplusStock) {
- isgongx = true
- } else {
- isgongx = false
- }
- })
- if (isgongx) {
- this.$message.error('请选择耗材信息与输入耗材值')
- return
- }
- obj.skuInfos = this.addSelect[0].skuList
- } else {
-
- if (!consInfoId) {
- this.$message.error('请选择耗材信息')
- return
- }
- if (!surplusStock) {
- this.$message.error('请输入耗材值')
- return
+ let isgongx = false
+ this.addSelect[0].skuList.forEach(ele => {
+ ele.skuId = ele.id
+ ele.conInfoId = consInfoId
+ // ele.surplusStock = surplusStock
+ if (!ele.skuId || !ele.surplusStock) {
+ isgongx = true
+ } else {
+ isgongx = false
}
+ })
+ if (isgongx) {
+ this.$message.error('请选择耗材信息与输入耗材值')
+ return
}
+ obj.skuInfos = this.addSelect[0].skuList
+ // } else {
+
+ // if (!consInfoId) {
+ // this.$message.error('请选择耗材信息')
+ // return
+ // }
+ // if (!surplusStock) {
+ // this.$message.error('请输入耗材值')
+ // return
+ // }
+ // }
await posttbProskuCons(obj)
this.$message({
message: '新增成功',
@@ -500,6 +519,12 @@ export default {
});
this.ALLisDistribute = null
this.dialogshow = false
+
+
+
+
+
+
}
this.$refs[formName].resetFields()
this.getTableData()