|
@@ -27,10 +27,6 @@
|
|
|
<el-button slot="append" icon="el-icon-more" @click="handleSupplier"></el-button>
|
|
|
</el-input>
|
|
|
</template>
|
|
|
- <!-- <template v-slot:stock="{value}">
|
|
|
- <vxe-input v-if="isAdd" v-model="value.stock" style="width: 100%;" size="small" type="text"></vxe-input>
|
|
|
- <span v-else>{{ value.stock }}</span>
|
|
|
- </template> -->
|
|
|
</by-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="closeStoringLocation">取 消</el-button>
|
|
@@ -205,57 +201,7 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- // {
|
|
|
- // span: 6,
|
|
|
- // label: '库存',
|
|
|
- // prop: 'stock',
|
|
|
- // component: 'by-input',
|
|
|
- // compConfig: {
|
|
|
- // attr: {
|
|
|
- // placeholder: '请输入库存',
|
|
|
- // clearable: true
|
|
|
- // },
|
|
|
- // },
|
|
|
- // },
|
|
|
- {
|
|
|
- span: 6,
|
|
|
- label: '库存体积',
|
|
|
- prop: 'stockVolume',
|
|
|
- component: 'by-input',
|
|
|
- compConfig: {
|
|
|
- attr: {
|
|
|
- placeholder: '请输入库存体积',
|
|
|
- clearable: true
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
],
|
|
|
- // [
|
|
|
- // {
|
|
|
- // span: 6,
|
|
|
- // label: '库存上限数量',
|
|
|
- // prop: 'maxStockNumber',
|
|
|
- // component: 'by-input',
|
|
|
- // compConfig: {
|
|
|
- // attr: {
|
|
|
- // placeholder: '请输入库存上限数量',
|
|
|
- // clearable: true
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // {
|
|
|
- // span: 6,
|
|
|
- // label: '库存体积上限',
|
|
|
- // prop: 'maxStockVolume',
|
|
|
- // component: 'by-input',
|
|
|
- // compConfig: {
|
|
|
- // attr: {
|
|
|
- // placeholder: '请输入库存体积上限',
|
|
|
- // clearable: true
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- // ]
|
|
|
]
|
|
|
},
|
|
|
tool: {
|
|
@@ -304,11 +250,6 @@
|
|
|
title: '所属机构名称',
|
|
|
field: 'organizationName',
|
|
|
},
|
|
|
- // {
|
|
|
- // width: 150,
|
|
|
- // title: '库存',
|
|
|
- // field: 'stock'
|
|
|
- // },
|
|
|
{
|
|
|
width: 150,
|
|
|
title: '库存体积',
|
|
@@ -402,19 +343,19 @@
|
|
|
size: 'small',
|
|
|
rules: {
|
|
|
name: [{
|
|
|
- required: true, message: '请输入名称', trigger: 'blur'
|
|
|
+ required: true, message: '请输入名称', trigger: 'change'
|
|
|
}],
|
|
|
organizationName: [{
|
|
|
- required: true, message: '请输入所属机构名称', trigger: 'blur'
|
|
|
+ required: true, message: '请输入所属机构名称', trigger: 'change'
|
|
|
}],
|
|
|
stockVolume: [{
|
|
|
- required: true, message: '请输入库存体积', trigger: 'blur'
|
|
|
+ required: true, message: '请输入库存体积', trigger: 'change'
|
|
|
}],
|
|
|
maxStockNumber: [{
|
|
|
- required: true, message: '请输入库存数量上限', trigger: 'blur'
|
|
|
+ required: true, message: '请输入库存数量上限', trigger: 'change'
|
|
|
}],
|
|
|
maxStockVolume: [{
|
|
|
- required: true, message: '请输入库存体积上限', trigger: 'blur'
|
|
|
+ required: true, message: '请输入库存体积上限', trigger: 'change'
|
|
|
}]
|
|
|
|
|
|
}
|
|
@@ -435,13 +376,6 @@
|
|
|
prop: 'organizationName',
|
|
|
slot: true,
|
|
|
},
|
|
|
- // {
|
|
|
- // labelWidth: '110px',
|
|
|
- // span: 23,
|
|
|
- // label: '库存',
|
|
|
- // prop: 'stock',
|
|
|
- // slot: true
|
|
|
- // },
|
|
|
{
|
|
|
labelWidth: '110px',
|
|
|
span: 23,
|
|
@@ -553,23 +487,25 @@
|
|
|
}
|
|
|
// 取消仓位注册
|
|
|
closeStoringLocation() {
|
|
|
- let data = {
|
|
|
- storehouseId: this.tableData.id,
|
|
|
- idDelete: 0,
|
|
|
- maxStockNumber: "100000",
|
|
|
- maxStockVolume: "100000",
|
|
|
- name: "默认仓位",
|
|
|
- organizationId: 1,
|
|
|
- organizationName: "供应商A",
|
|
|
- stockVolume: "100000",
|
|
|
- };
|
|
|
this.dialogFormVisible2 = false;
|
|
|
- api.saveList(data, 'maindataStoringLocation').then((res : any) => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.getOneself(this.tableData.id);
|
|
|
- this.$alert('此仓库将新增一个默认仓位');
|
|
|
- } else this.$message.error(res.msg)
|
|
|
- });
|
|
|
+ if (this.tableData.subList.length <= 0) {
|
|
|
+ let data = {
|
|
|
+ storehouseId: this.tableData.id,
|
|
|
+ idDelete: 0,
|
|
|
+ maxStockNumber: "100000",
|
|
|
+ maxStockVolume: "100000",
|
|
|
+ name: "默认仓位",
|
|
|
+ organizationId: 1,
|
|
|
+ organizationName: "供应商A",
|
|
|
+ stockVolume: "100000",
|
|
|
+ };
|
|
|
+ api.saveList(data, 'maindataStoringLocation').then((res : any) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.getOneself(this.tableData.id);
|
|
|
+ this.$alert('此仓库将新增一个默认仓位');
|
|
|
+ } else this.$message.error(res.msg)
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
// 通过id拿到当条数据
|
|
|
getOneself(e : any) {
|