|
@@ -17,7 +17,9 @@
|
|
:show-close="false"
|
|
:show-close="false"
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
>
|
|
>
|
|
- <el-form ref="diaLogForm" :model="diaLogForm" label-width="120px" size="small" label-position="left">
|
|
|
|
|
|
+ <el-form ref="diaLogForm" :model="diaLogForm" :rules="diaLogRules"
|
|
|
|
+ label-width="120px" size="small" label-position="left"
|
|
|
|
+ >
|
|
<el-form-item label="仓库名称" prop="name">
|
|
<el-form-item label="仓库名称" prop="name">
|
|
<el-input v-model="diaLogForm.name" />
|
|
<el-input v-model="diaLogForm.name" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -51,6 +53,16 @@
|
|
</div>
|
|
</div>
|
|
<div class="weight">注:设置后商家下单的仓库可以选择对应仓库的品类</div>
|
|
<div class="weight">注:设置后商家下单的仓库可以选择对应仓库的品类</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="强制仓品类" prop="qiangzhiCategoryIds">
|
|
|
|
+ <div>
|
|
|
|
+ <el-checkbox-group v-model="diaLogForm.qiangzhiCategoryIds">
|
|
|
|
+ <el-checkbox v-for="(item, index) in dataList" :key="index" :label="item.id">
|
|
|
|
+ {{ item.name }}
|
|
|
|
+ </el-checkbox>
|
|
|
|
+ </el-checkbox-group>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click="onClose">取 消</el-button>
|
|
<el-button @click="onClose">取 消</el-button>
|
|
@@ -76,6 +88,9 @@ import {
|
|
exportListStockV2,
|
|
exportListStockV2,
|
|
getStockDetailStock
|
|
getStockDetailStock
|
|
} from '@/api/basic_data/warehouse'
|
|
} from '@/api/basic_data/warehouse'
|
|
|
|
+import { findElem } from '@/utils/util'
|
|
|
|
+import { addApply, editApply } from '@/api/supply/apply'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
components: { TemplatePage, Popu },
|
|
components: { TemplatePage, Popu },
|
|
mixins: [import_mixin, add_callback_mixin],
|
|
mixins: [import_mixin, add_callback_mixin],
|
|
@@ -164,7 +179,12 @@ export default {
|
|
stockIds: [],
|
|
stockIds: [],
|
|
updateBy: '',
|
|
updateBy: '',
|
|
updateTime: '',
|
|
updateTime: '',
|
|
- categoryIds: []
|
|
|
|
|
|
+ categoryIds: [],
|
|
|
|
+ qiangzhiCategoryIds: []
|
|
|
|
+ },
|
|
|
|
+ diaLogRules: {
|
|
|
|
+ name: [{ required: true, trigger: 'blur', message: '请输入' }],
|
|
|
|
+ stockIds: [{ required: true, trigger: 'change', message: '请选择' }]
|
|
},
|
|
},
|
|
showDialogForm: false,
|
|
showDialogForm: false,
|
|
screenForm: {
|
|
screenForm: {
|
|
@@ -199,11 +219,11 @@ export default {
|
|
operation() {
|
|
operation() {
|
|
return (h, { row, index, column }) => {
|
|
return (h, { row, index, column }) => {
|
|
return (
|
|
return (
|
|
- <div class='operation-btns'>
|
|
|
|
|
|
+ <div class="operation-btns">
|
|
{this.$checkBtnRole('edit', this.$route.meta.roles) ? (
|
|
{this.$checkBtnRole('edit', this.$route.meta.roles) ? (
|
|
<el-button
|
|
<el-button
|
|
- size='mini'
|
|
|
|
- type='text'
|
|
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
onClick={() => {
|
|
onClick={() => {
|
|
this.getDataList()
|
|
this.getDataList()
|
|
this.editFn(row.id)
|
|
this.editFn(row.id)
|
|
@@ -214,16 +234,16 @@ export default {
|
|
) : null}
|
|
) : null}
|
|
{this.$checkBtnRole('del', this.$route.meta.roles) ? (
|
|
{this.$checkBtnRole('del', this.$route.meta.roles) ? (
|
|
<el-popconfirm
|
|
<el-popconfirm
|
|
- confirm-button-text='好的'
|
|
|
|
- cancel-button-text='不用了'
|
|
|
|
- icon='el-icon-info'
|
|
|
|
- icon-color='red'
|
|
|
|
- title='内容确定删除吗?'
|
|
|
|
|
|
+ confirm-button-text="好的"
|
|
|
|
+ cancel-button-text="不用了"
|
|
|
|
+ icon="el-icon-info"
|
|
|
|
+ icon-color="red"
|
|
|
|
+ title="内容确定删除吗?"
|
|
onConfirm={() => {
|
|
onConfirm={() => {
|
|
this.hanleDelete(row.id)
|
|
this.hanleDelete(row.id)
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- <el-button size='mini' slot='reference' type='text' class='textColor el-popover-left'>
|
|
|
|
|
|
+ <el-button size="mini" slot="reference" type="text" class="textColor el-popover-left">
|
|
删除
|
|
删除
|
|
</el-button>
|
|
</el-button>
|
|
</el-popconfirm>
|
|
</el-popconfirm>
|
|
@@ -234,19 +254,8 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
onClose() {
|
|
onClose() {
|
|
- this.diaLogForm = {
|
|
|
|
- id: null,
|
|
|
|
- type: '1',
|
|
|
|
- name: '',
|
|
|
|
- remark: '',
|
|
|
|
- status: 1,
|
|
|
|
- stockCordon: 0,
|
|
|
|
- stockIds: [],
|
|
|
|
- updateBy: '',
|
|
|
|
- updateTime: '',
|
|
|
|
- categoryIds: []
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ this.$refs.diaLogForm.resetFields()
|
|
this.addOff(() => {
|
|
this.addOff(() => {
|
|
this.showDialogForm = false
|
|
this.showDialogForm = false
|
|
})()
|
|
})()
|
|
@@ -285,7 +294,8 @@ export default {
|
|
stockCordon: row.stockCordon,
|
|
stockCordon: row.stockCordon,
|
|
type: row.type + '',
|
|
type: row.type + '',
|
|
stockIds: row.stockIds === undefined ? arr : row.stockIds,
|
|
stockIds: row.stockIds === undefined ? arr : row.stockIds,
|
|
- categoryIds: row.kingDeeCategories !== null ? row.kingDeeCategories.map(k => k.id) : []
|
|
|
|
|
|
+ categoryIds: row.kingDeeCategories !== null ? row.kingDeeCategories.map(k => k.id) : [],
|
|
|
|
+ qiangzhiCategoryIds: row.stockForceCategories?.map(k => k.categoryId) || []
|
|
}
|
|
}
|
|
this.showDialogForm = true
|
|
this.showDialogForm = true
|
|
})
|
|
})
|
|
@@ -300,33 +310,28 @@ export default {
|
|
this.dataList = res.data
|
|
this.dataList = res.data
|
|
},
|
|
},
|
|
hanleInfo() {
|
|
hanleInfo() {
|
|
- if (this.type == 1) {
|
|
|
|
- addStock(this.diaLogForm).then(res => {
|
|
|
|
- this.$successMsg('保存成功')
|
|
|
|
- this.showDialogForm = false
|
|
|
|
- this.$refs.pageRef.refreshList()
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- const params = {
|
|
|
|
- ...this.diaLogForm
|
|
|
|
|
|
+ this.$refs.diaLogForm.validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ if (this.type == 1) {
|
|
|
|
+ addStock(this.diaLogForm).then(res => {
|
|
|
|
+ this.$successMsg('保存成功')
|
|
|
|
+ this.showDialogForm = false
|
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
|
+ this.onClose()
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ const params = {
|
|
|
|
+ ...this.diaLogForm
|
|
|
|
+ }
|
|
|
|
+ updateStock(params).then(res => {
|
|
|
|
+ this.$successMsg('编辑成功')
|
|
|
|
+ this.showDialogForm = false
|
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
|
+ this.onClose()
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- updateStock(params).then(res => {
|
|
|
|
- this.$successMsg('编辑成功')
|
|
|
|
- this.showDialogForm = false
|
|
|
|
- this.$refs.pageRef.refreshList()
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- this.diaLogForm = {
|
|
|
|
- name: '',
|
|
|
|
- remark: '',
|
|
|
|
- type: '1',
|
|
|
|
- status: 0,
|
|
|
|
- stockCordon: 0,
|
|
|
|
- stockIds: [],
|
|
|
|
- updateBy: '',
|
|
|
|
- updateTime: '',
|
|
|
|
- categoryIds: []
|
|
|
|
- }
|
|
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 删除数据
|
|
// 删除数据
|
|
hanleDelete(id) {
|
|
hanleDelete(id) {
|
|
@@ -343,25 +348,32 @@ export default {
|
|
::v-deep .el-date-editor {
|
|
::v-deep .el-date-editor {
|
|
width: 100%;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
+
|
|
::v-deep .el-select {
|
|
::v-deep .el-select {
|
|
width: 100%;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
+
|
|
::v-deep .el-col-9 .el-button {
|
|
::v-deep .el-col-9 .el-button {
|
|
padding: 5px;
|
|
padding: 5px;
|
|
}
|
|
}
|
|
|
|
+
|
|
::v-deep .el-dialog__header {
|
|
::v-deep .el-dialog__header {
|
|
background-color: #dddddd;
|
|
background-color: #dddddd;
|
|
}
|
|
}
|
|
|
|
+
|
|
.base {
|
|
.base {
|
|
padding: 20px 20px 0;
|
|
padding: 20px 20px 0;
|
|
}
|
|
}
|
|
|
|
+
|
|
.table {
|
|
.table {
|
|
margin-top: 12px;
|
|
margin-top: 12px;
|
|
}
|
|
}
|
|
|
|
+
|
|
.right {
|
|
.right {
|
|
float: right;
|
|
float: right;
|
|
}
|
|
}
|
|
-.weight{
|
|
|
|
|
|
+
|
|
|
|
+.weight {
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|