|
|
@@ -282,57 +282,57 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
- app: null,
|
|
|
- sortLink: '',
|
|
|
- operateData: {},
|
|
|
- tabIndex: '0',
|
|
|
- tabsData: [
|
|
|
- {
|
|
|
- text: '花材列表',
|
|
|
- key: '0'
|
|
|
- }
|
|
|
- ],
|
|
|
- selects: {},
|
|
|
- sort: {
|
|
|
- status: false
|
|
|
- },
|
|
|
+ app: null,
|
|
|
+ sortLink: '',
|
|
|
+ operateData: {},
|
|
|
+ tabIndex: '0',
|
|
|
+ tabsData: [
|
|
|
+ {
|
|
|
+ text: '花材列表',
|
|
|
+ key: '0'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ selects: {},
|
|
|
+ sort: {
|
|
|
+ status: false
|
|
|
+ },
|
|
|
batchAlter:'',
|
|
|
batchAddPrice:'',
|
|
|
dialogFormVisible:false,
|
|
|
- canAddPrice:false,
|
|
|
- canAddRatio:false,
|
|
|
- costPrice: false,
|
|
|
- costWeight: false,
|
|
|
- priceInput:false,
|
|
|
- shelfLifeInput:false,
|
|
|
- stockWarningInput:false,
|
|
|
- classId: 0,
|
|
|
- className:'',
|
|
|
- showItemModal: false,
|
|
|
- dataList: {
|
|
|
- form: {
|
|
|
- data: '',
|
|
|
- type: ''
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- initData: [],
|
|
|
- addDialog: false,
|
|
|
- replaceForm: {
|
|
|
+ canAddPrice:false,
|
|
|
+ canAddRatio:false,
|
|
|
+ costPrice: false,
|
|
|
+ costWeight: false,
|
|
|
+ priceInput:false,
|
|
|
+ shelfLifeInput:false,
|
|
|
+ stockWarningInput:false,
|
|
|
+ classId: 0,
|
|
|
+ className:'',
|
|
|
+ showItemModal: false,
|
|
|
+ dataList: {
|
|
|
+ form: {
|
|
|
+ data: '',
|
|
|
+ type: ''
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ initData: [],
|
|
|
+ addDialog: false,
|
|
|
+ replaceForm: {
|
|
|
name: '',
|
|
|
py: '',
|
|
|
alias: '',
|
|
|
classId: '',
|
|
|
className: '',
|
|
|
cover: '',
|
|
|
- bigUnit: '',
|
|
|
+ bigUnit: '',
|
|
|
smallUnit: '',
|
|
|
stockWarning:'',
|
|
|
cost:'',
|
|
|
addPrice:'',
|
|
|
weight:'',
|
|
|
},
|
|
|
- replaceFormRules: {
|
|
|
+ replaceFormRules: {
|
|
|
name: {
|
|
|
required: true,
|
|
|
message: '名称不能为空',
|
|
|
@@ -345,18 +345,18 @@ export default {
|
|
|
required: true,
|
|
|
message: '请选择分类',
|
|
|
},
|
|
|
- bigUnitId: {
|
|
|
- required: true,
|
|
|
- message: '请选择大单位',
|
|
|
- },
|
|
|
- smallUnitId: {
|
|
|
- required: true,
|
|
|
- message: '请选择小单位',
|
|
|
- },
|
|
|
- ratio: {
|
|
|
- required: true,
|
|
|
- message: '比例不能为空',
|
|
|
- },
|
|
|
+ bigUnitId: {
|
|
|
+ required: true,
|
|
|
+ message: '请选择大单位',
|
|
|
+ },
|
|
|
+ smallUnitId: {
|
|
|
+ required: true,
|
|
|
+ message: '请选择小单位',
|
|
|
+ },
|
|
|
+ ratio: {
|
|
|
+ required: true,
|
|
|
+ message: '比例不能为空',
|
|
|
+ },
|
|
|
stockWarning: {
|
|
|
required: true,
|
|
|
message: '最低库存不能为空',
|
|
|
@@ -373,10 +373,10 @@ export default {
|
|
|
required: true,
|
|
|
message: '重量不能为空',
|
|
|
}
|
|
|
- },
|
|
|
- itemClassList: [],
|
|
|
- unitList: [],
|
|
|
- currentItemId: 0
|
|
|
+ },
|
|
|
+ itemClassList: [],
|
|
|
+ unitList: [],
|
|
|
+ currentItemId: 0
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -447,9 +447,7 @@ export default {
|
|
|
},
|
|
|
setStatusFun(id,type){
|
|
|
this.$service.product.update({id:id,delStatus:type}).then(res => {
|
|
|
- console.log('res1111', res)
|
|
|
- this.$message.success('操作成功!');
|
|
|
- // this.addDialog = false
|
|
|
+ this.$message.success('操作成功!')
|
|
|
this.app.refresh()
|
|
|
}).catch(err => {})
|
|
|
},
|
|
|
@@ -552,7 +550,7 @@ export default {
|
|
|
prop: 'className',
|
|
|
label: '分类',
|
|
|
align: 'center',
|
|
|
- 'min-width': 80
|
|
|
+ 'min-width': 90
|
|
|
},
|
|
|
{
|
|
|
prop: 'ratio',
|
|
|
@@ -752,16 +750,21 @@ export default {
|
|
|
text: '处理中'
|
|
|
});
|
|
|
|
|
|
-
|
|
|
this.dataList.form.data = JSON.stringify(this.initData)
|
|
|
this.$service.product.productBatchUpdate(this.dataList.form).then(res => {
|
|
|
|
|
|
- loading.close();
|
|
|
+
|
|
|
+ if(type == 'price'){
|
|
|
+ //修改原价需要刷新
|
|
|
+ this.app.refresh()
|
|
|
+ }
|
|
|
|
|
|
+ loading.close();
|
|
|
+
|
|
|
this.hiddenInput(type)
|
|
|
|
|
|
}).catch(err => {
|
|
|
- this.hiddenInput(type)
|
|
|
+ loading.close();
|
|
|
})
|
|
|
|
|
|
},
|