|
|
|
|
@ -18,13 +18,14 @@ |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
@on-load="onLoad" |
|
|
|
|
:row-class-name="tableRowClassName" |
|
|
|
|
@sort-change="sortChange" |
|
|
|
|
> |
|
|
|
|
<template #deptName="{ row }">{{ row.dept && row.dept.deptName }}</template> |
|
|
|
|
<template #materialGoods="{ row }">{{ row.materialGoods.goodsCode }}</template> |
|
|
|
|
<template #menu-left> |
|
|
|
|
<div style="display: flex"> |
|
|
|
|
<el-input v-model="goodsCode" placeholder="请输入物料编码"></el-input> |
|
|
|
|
<el-button type="primary" style="margin-left: 10px" @click="handleAdd">新增</el-button> |
|
|
|
|
<el-button type="primary" style="margin-left: 10px" @click="handleAdd" v-if="permission.materialMaintain_add">新增</el-button> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<template #used="scope"> |
|
|
|
|
@ -34,6 +35,7 @@ |
|
|
|
|
:inactive-value="false" |
|
|
|
|
active-color="#ff4949" |
|
|
|
|
inactive-color="#13ce66" |
|
|
|
|
:disabled="!permission.materialMaintain_isUsed" |
|
|
|
|
@change="rowUpdate(scope.row)" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
|
@ -43,6 +45,7 @@ |
|
|
|
|
:active-value="true" |
|
|
|
|
:inactive-value="false" |
|
|
|
|
active-color="#ff4949" |
|
|
|
|
:disabled="!permission.materialMaintain_minWarning" |
|
|
|
|
inactive-color="#13ce66" |
|
|
|
|
@change="rowUpdate(scope.row)" |
|
|
|
|
/> |
|
|
|
|
@ -62,6 +65,7 @@ |
|
|
|
|
import { getGoodsList, addGoods, editGoods } from '@/api/storeManagement/materialMaintenance'; |
|
|
|
|
// import { edit } from '@/api/orderManagement/exceptionOrder'; |
|
|
|
|
import materialAdd from './components/materialAdd.vue'; |
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
export default { |
|
|
|
|
components: { materialAdd }, |
|
|
|
|
data() { |
|
|
|
|
@ -116,6 +120,7 @@ export default { |
|
|
|
|
label: '物料编码', |
|
|
|
|
prop: 'goodsCode', |
|
|
|
|
span: 12, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
editDisabled: true, |
|
|
|
|
overflow: true, |
|
|
|
|
search: true, |
|
|
|
|
@ -125,6 +130,7 @@ export default { |
|
|
|
|
label: '物料名称', |
|
|
|
|
prop: 'goodsName', |
|
|
|
|
editDisabled: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
overflow: true, |
|
|
|
|
search: true, |
|
|
|
|
@ -150,6 +156,7 @@ export default { |
|
|
|
|
label: '型号/牌号', |
|
|
|
|
prop: 'specifications', |
|
|
|
|
span: 12, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
overflow: true, |
|
|
|
|
editDisplay: false, |
|
|
|
|
search: true, |
|
|
|
|
@ -165,6 +172,7 @@ export default { |
|
|
|
|
{ |
|
|
|
|
label: '计量单位', |
|
|
|
|
prop: 'unitName', |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
// editDisplay: false, |
|
|
|
|
overflow: true, |
|
|
|
|
@ -181,6 +189,7 @@ export default { |
|
|
|
|
{ |
|
|
|
|
label: 'PDM单位', |
|
|
|
|
prop: 'pdmUnit', |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
editDisplay: false, |
|
|
|
|
overflow: true, |
|
|
|
|
@ -198,6 +207,7 @@ export default { |
|
|
|
|
label: '物料类别', |
|
|
|
|
prop: 'gcId', |
|
|
|
|
span: 12, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
type: 'select', |
|
|
|
|
// editDisplay: false, |
|
|
|
|
overflow: true, |
|
|
|
|
@ -219,6 +229,7 @@ export default { |
|
|
|
|
{ |
|
|
|
|
label: '是否工艺审批', |
|
|
|
|
prop: 'processApproval', |
|
|
|
|
sortable: 'custom', |
|
|
|
|
type: 'select', |
|
|
|
|
dicData: [ |
|
|
|
|
{ label: '是', value: true }, |
|
|
|
|
@ -240,6 +251,7 @@ export default { |
|
|
|
|
label: '补制类型', |
|
|
|
|
prop: 'reissueType', |
|
|
|
|
type: 'select', |
|
|
|
|
sortable: 'custom', |
|
|
|
|
dicData: [ |
|
|
|
|
// /** |
|
|
|
|
// * 补制类型 - 无 |
|
|
|
|
@ -295,6 +307,7 @@ export default { |
|
|
|
|
editDisplay: false, |
|
|
|
|
span: 12, |
|
|
|
|
overflow: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
search: false, |
|
|
|
|
width: 120, |
|
|
|
|
rules: [ |
|
|
|
|
@ -311,6 +324,7 @@ export default { |
|
|
|
|
span: 12, |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
width: 120, |
|
|
|
|
// rules: [ |
|
|
|
|
// { |
|
|
|
|
@ -325,6 +339,7 @@ export default { |
|
|
|
|
prop: 'minNum', |
|
|
|
|
span: 12, |
|
|
|
|
overflow: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
search: false, |
|
|
|
|
width: 120, |
|
|
|
|
rules: [ |
|
|
|
|
@ -340,6 +355,7 @@ export default { |
|
|
|
|
label: '采购数量', |
|
|
|
|
prop: 'purchaseQuantity', |
|
|
|
|
span: 12, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
width: 120, |
|
|
|
|
@ -355,6 +371,7 @@ export default { |
|
|
|
|
label: '是否启用', |
|
|
|
|
editDisplay: true, |
|
|
|
|
prop: 'used', |
|
|
|
|
sortable: 'custom', |
|
|
|
|
type: 'switch', |
|
|
|
|
dicData: [ |
|
|
|
|
{ label: '关', value: false }, |
|
|
|
|
@ -394,6 +411,7 @@ export default { |
|
|
|
|
overflow: true, |
|
|
|
|
editDisplay: false, |
|
|
|
|
search: false, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
width: 120, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
@ -410,6 +428,7 @@ export default { |
|
|
|
|
overflow: true, |
|
|
|
|
editDisplay: false, |
|
|
|
|
search: false, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
width: 120, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
@ -423,6 +442,7 @@ export default { |
|
|
|
|
label: '当前库存', |
|
|
|
|
prop: 'currentQuantity', |
|
|
|
|
editDisplay: false, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
@ -439,6 +459,7 @@ export default { |
|
|
|
|
editDisplay: false, |
|
|
|
|
label: '在途', |
|
|
|
|
prop: 'onthewayQuantity', |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
@ -454,6 +475,7 @@ export default { |
|
|
|
|
{ |
|
|
|
|
label: '锁料', |
|
|
|
|
prop: 'lockQuantity', |
|
|
|
|
sortable: 'custom', |
|
|
|
|
span: 12, |
|
|
|
|
overflow: true, |
|
|
|
|
editDisplay: false, |
|
|
|
|
@ -473,6 +495,7 @@ export default { |
|
|
|
|
span: 12, |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
hide: true, |
|
|
|
|
width: 120, |
|
|
|
|
// rules: [ |
|
|
|
|
@ -486,6 +509,7 @@ export default { |
|
|
|
|
{ |
|
|
|
|
label: '最低库存预警', |
|
|
|
|
prop: 'minWarning', |
|
|
|
|
sortable: 'custom', |
|
|
|
|
type: 'switch', |
|
|
|
|
dicData: [ |
|
|
|
|
{ label: '关', value: false }, |
|
|
|
|
@ -494,7 +518,7 @@ export default { |
|
|
|
|
span: 12, |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
width: 100, |
|
|
|
|
width: 120, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
@ -516,8 +540,27 @@ export default { |
|
|
|
|
query: {}, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters(['permission']), |
|
|
|
|
permissionList() { |
|
|
|
|
return { |
|
|
|
|
editBtn: this.validData(this.permission.materialMaintain_edit, false), |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
mounted() {}, |
|
|
|
|
methods: { |
|
|
|
|
// 排序 |
|
|
|
|
sortChange({ prop, order }) { |
|
|
|
|
this.query.descs = undefined; |
|
|
|
|
this.query.ascs = undefined; |
|
|
|
|
let orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; |
|
|
|
|
this.query[orderByFieldKey] = !prop |
|
|
|
|
? undefined |
|
|
|
|
: prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); |
|
|
|
|
// 重新加载数据 |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
closeDialog() { |
|
|
|
|
this.materialAddShow = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
|