main
parent
3ad96630cf
commit
a21e71d072
|
|
@ -69,25 +69,14 @@ export default {
|
||||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||||
},
|
},
|
||||||
getTableConfig() {
|
getTableConfig() {
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
// console.log("-----------------")
|
|
||||||
crudTableConfig.gettables().then(res => {
|
crudTableConfig.gettables().then(res => {
|
||||||
|
|
||||||
this.table_configs = res.map(function (obj) {
|
this.table_configs = res.map(function (obj) {
|
||||||
|
|
||||||
return obj
|
return obj
|
||||||
})
|
})
|
||||||
console.log("-------------加载Table配置数量:"+this.table_configs.length+"---------")
|
|
||||||
this.table_configs.forEach(config => {
|
this.table_configs.forEach(config => {
|
||||||
sessionStorage.removeItem(config.tableType)
|
sessionStorage.removeItem(config.tableType)
|
||||||
sessionStorage.setItem(config.tableType, config.value)
|
sessionStorage.setItem(config.tableType, config.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
//sessionStorage.setItem(tableKey, res.value)
|
|
||||||
|
|
||||||
//var tableKey
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const hiddenColumns = JSON.parse(sessionStorage.getItem(tableKey))
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,28 @@
|
||||||
<el-form-item label="库区名称" prop="name">
|
<el-form-item label="库区名称" prop="name">
|
||||||
<el-input v-model="form.name" style="width: 370px;"/>
|
<el-input v-model="form.name" style="width: 370px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="属性">
|
<el-form-item label="排序号" prop="name">
|
||||||
|
<el-input v-model="form.posX" style="width: 370px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="接收工厂" >
|
||||||
|
<!-- <el-input v-model="form.workingStation" style="width: 370px;" />-->
|
||||||
|
<el-select v-model="form.gcCode" filterable placeholder="请选择" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in this.dict.factory"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="描述">
|
||||||
|
<el-input v-model="form.description" style="width: 370px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="接收担当">
|
||||||
|
<el-input v-model="form.shdd" style="width: 370px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属工位">
|
||||||
<!-- <el-input v-model="form.workingStation" style="width: 370px;" />-->
|
<!-- <el-input v-model="form.workingStation" style="width: 370px;" />-->
|
||||||
<el-select v-model="form.workingStation" filterable placeholder="请选择" clearable>
|
<el-select v-model="form.workingStation" filterable placeholder="请选择" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -59,9 +80,12 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="描述" prop="description">
|
|
||||||
<el-input v-model="form.description" style="width: 370px;"/>
|
<div style="text-align: center;width: 100%;height: 30px;font-weight :bold">
|
||||||
</el-form-item>
|
<el-checkbox label="线边接收" style="font-weight :bold" v-model="form.bexb"></el-checkbox>
|
||||||
|
<el-checkbox label="收货仓库" style="font-weight :bold" v-model="form.besh"></el-checkbox>
|
||||||
|
<el-checkbox label="制造库位耗用" style="font-weight :bold" v-model="form.bezz"></el-checkbox>
|
||||||
|
</div>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
|
@ -76,12 +100,32 @@
|
||||||
<el-table-column type="selection" width="55"/>
|
<el-table-column type="selection" width="55"/>
|
||||||
<el-table-column prop="code" label="库区编号" width="80px" align="center"/>
|
<el-table-column prop="code" label="库区编号" width="80px" align="center"/>
|
||||||
<el-table-column prop="name" label="库区名称" width="150px" align="center"/>
|
<el-table-column prop="name" label="库区名称" width="150px" align="center"/>
|
||||||
<el-table-column prop="station_type#workingStation" label="库区属性" width="150px">
|
<el-table-column prop="station_type#workingStation" label="指示纳所" width="150px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.station_type[scope.row.workingStation] }}
|
{{ dict.label.station_type[scope.row.workingStation] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="pointCode" label="缓存库位"/>
|
||||||
|
<el-table-column prop="posX" label="排序号">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="gcCode" label="接收工厂"/>
|
||||||
|
<el-table-column prop="shdd" label="接收担当"/>
|
||||||
<el-table-column prop="description" label="描述"/>
|
<el-table-column prop="description" label="描述"/>
|
||||||
|
<el-table-column prop="bexb" label="线边接收">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.bexb ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="besh" label="收货仓库">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.besh ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="bezz" width="120px" label="制造库位耗用">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.bezz ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="enabled" label="启用">
|
<el-table-column prop="enabled" label="启用">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
|
|
|
||||||
|
|
@ -4,20 +4,17 @@
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<div v-if="crud.props.searchToggle">
|
<div v-if="crud.props.searchToggle">
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<label class="el-form-item-label">品番</label>
|
<label class="el-form-item-label">料号</label>
|
||||||
<el-input v-model="query.code" clearable placeholder="请输入品番" style="width: 185px;" class="filter-item"
|
<el-input v-model="query.code" clearable placeholder="请输入料号" style="width: 185px;" class="filter-item"
|
||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<label class="el-form-item-label">名称</label>
|
<label class="el-form-item-label">物料描述</label>
|
||||||
<el-input v-model="query.name" clearable placeholder="请输入名称" style="width: 185px;" class="filter-item"
|
<el-input v-model="query.name" clearable placeholder="请输入物料描述" style="width: 185px;" class="filter-item"
|
||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<label class="el-form-item-label">规格</label>
|
|
||||||
<el-input v-model="query.specs" clearable placeholder="请输入规格" style="width: 185px;" class="filter-item"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<label class="el-form-item-label">是否启用</label>
|
<label class="el-form-item-label">是否启用</label>
|
||||||
<el-select v-model="query.enabled" clearable placeholder="请选择" style="width: 185px;" class="filter-item"
|
<el-select v-model="query.enabled" clearable placeholder="请选择" style="width: 185px;" class="filter-item"
|
||||||
|
|
@ -30,10 +27,7 @@
|
||||||
:value="baseStatus.value"
|
:value="baseStatus.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<label class="el-form-item-label">组合编码</label>
|
|
||||||
<el-input v-model="query.largeClass" clearable placeholder="请输入编码" style="width: 185px;" class="filter-item"
|
|
||||||
@keyup.enter.native="crud.toQuery"
|
|
||||||
/>
|
|
||||||
<rrOperation :crud="crud"/>
|
<rrOperation :crud="crud"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -59,17 +53,19 @@
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
||||||
:title="crud.status.title" width="600px"
|
:title="crud.status.title" width="950px"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" :inline="true" :rules="rules" size="small" label-width="80px">
|
<el-form ref="form" :model="form" :inline="true" :rules="rules" size="small" label-width="100px">
|
||||||
<el-form-item label="品番" prop="code">
|
<el-form-item label="料号" prop="code">
|
||||||
<el-input v-model="form.code" style="width: 180px;"/>
|
<el-input v-model="form.code" style="width: 180px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="名称" prop="name">
|
|
||||||
|
<el-form-item label="物料描述" prop="name">
|
||||||
<el-input v-model="form.name" style="width: 180px;"/>
|
<el-input v-model="form.name" style="width: 180px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="类型" prop="goodType">
|
|
||||||
<el-select v-model="form.goodType" filterable placeholder="请选择" style="width: 180px;"
|
<el-form-item label="包装类型" prop="packageType">
|
||||||
|
<el-select v-model="form.packageType" clearable filterable placeholder="请选择" style="width: 180px;"
|
||||||
:default-first-option="true">
|
:default-first-option="true">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.item_type"
|
v-for="item in dict.item_type"
|
||||||
|
|
@ -78,9 +74,14 @@
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>-->
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="规格数量" prop="specQuantity">
|
||||||
|
<el-input v-model.number="form.specQuantity" style="width: 180px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="单位" prop="unit">
|
<el-form-item label="单位" prop="unit">
|
||||||
<el-select v-model="form.unit" filterable placeholder="请选择" style="width: 180px;"
|
<el-select v-model="form.unit" clearable filterable placeholder="请选择" style="width: 180px;"
|
||||||
:default-first-option="true"
|
:default-first-option="true"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
|
|
@ -91,42 +92,91 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="规格" prop="specs">
|
|
||||||
<el-input v-model="form.specs" style="width: 180px;"/>
|
<el-form-item label="类型" prop="type">
|
||||||
|
<el-select v-model="form.type" clearable filterable placeholder="请选择" style="width: 180px;"
|
||||||
|
:default-first-option="true">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.item_type"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="发动机" prop="isAttribute1">-->
|
|
||||||
<!-- <el-checkbox v-model="form.isAttribute1"></el-checkbox>-->
|
<el-form-item label="规格重量" prop="specWeight">
|
||||||
<!-- </el-form-item>-->
|
<el-input v-model.number="form.specWeight" style="width: 180px;"/>
|
||||||
<!-- <el-form-item label="预备货" prop="isAttribute2">-->
|
|
||||||
<!-- <el-checkbox v-model="form.isAttribute2"></el-checkbox>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- <el-select v-model="form.point" value-key="id" filterable placeholder="请选择推荐库位"-->
|
|
||||||
<!-- style="width: 200px;" clearable>-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="item in pointOptions"-->
|
|
||||||
<!-- :key="item.id"-->
|
|
||||||
<!-- :label="item.code"-->
|
|
||||||
<!-- :value="item"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<el-form-item label="荷资" prop="extendStr3">
|
|
||||||
<el-input v-model="form.extendStr3" style="width: 180px;"/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="收容数" prop="extendD3">
|
|
||||||
<el-input v-model="form.extendD3" style="width: 180px;"/>
|
<el-form-item label="毛重" prop="grossWeight">
|
||||||
|
<el-input v-model.number="form.grossWeight" style="width: 180px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="组合编码" prop="largeClass">
|
|
||||||
<el-input v-model="form.largeClass" style="width: 180px;"/>
|
<el-form-item label="体积" prop="volume">
|
||||||
|
<el-input v-model.number="form.volume" style="width: 180px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="长" prop="length">
|
||||||
|
<el-input v-model.number="form.length" style="width: 180px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="宽" prop="width">
|
||||||
|
<el-input v-model.number="form.width" style="width: 180px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="高" prop="height">
|
||||||
|
<el-input v-model.number="form.height" style="width: 180px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="物料价值等级" prop="valueGrade">
|
||||||
|
<el-input v-model="form.valueGrade" style="width: 180px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="保质期" prop="validPeriod">
|
||||||
|
<el-input v-model.number="form.validPeriod" style="width: 180px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="预警天数" prop="alertDays">
|
||||||
|
<el-input v-model.number="form.alertDays" style="width: 180px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="描述">
|
<el-form-item label="描述">
|
||||||
<el-input v-model="form.description" :rows="3" type="textarea" style="width: 370px;"/>
|
<el-input v-model="form.description" :rows="3" type="textarea" style="width: 770px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="物料规则">
|
<el-form-item label="物料规则">
|
||||||
<el-checkbox label="批次" style="font-weight :bold" v-model="form.bepc"></el-checkbox>
|
<el-row style="width: 800px">
|
||||||
<el-checkbox label="序列号" style="font-weight :bold" v-model="form.bexq"></el-checkbox>
|
<el-col :span="8">
|
||||||
<el-checkbox label="超收" style="font-weight :bold" v-model="form.beds"></el-checkbox>
|
<el-checkbox label="批次" style="font-weight :bold;"
|
||||||
<el-checkbox label="超发" style="font-weight :bold" v-model="form.becf"></el-checkbox>
|
v-model="form.isBatch"></el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-checkbox label="序列号" style="font-weight :bold;"
|
||||||
|
v-model="form.isSerial"></el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-checkbox label="有效期" style="font-weight :bold" v-model="form.isValidPeriod"></el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-checkbox label="危化品" style="font-weight :bold" v-model="form.isHazardous"></el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-checkbox label="库存可用" style="font-weight :bold" v-model="form.isInvAvailable"></el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-checkbox label="SAP料号" style="font-weight :bold" v-model="form.isSapMaterial"></el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
|
|
@ -145,34 +195,23 @@
|
||||||
border
|
border
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55"/>
|
<el-table-column type="selection" width="55"/>
|
||||||
<!-- <el-table-column label="序号" type="index" width="50"/>-->
|
<el-table-column prop="code" label="料号"/>
|
||||||
<el-table-column prop="code" label="品番" />
|
<el-table-column prop="name" label="物料描述"/>
|
||||||
<el-table-column prop="name" label="名称"/>
|
<el-table-column prop="packageType" label="包装类型"/>
|
||||||
<el-table-column prop="extendStr3" label="荷资" />
|
<el-table-column prop="specQuantity" label="规格数量"/>
|
||||||
<el-table-column prop="extendD3" label="收容数"/>
|
<el-table-column prop="specWeight" label="规格重量"/>
|
||||||
<el-table-column prop="specs" label="规格"/>
|
<el-table-column prop="grossWeight" label="毛重"/>
|
||||||
<el-table-column prop="largeClass" label="组合编码"/>
|
<el-table-column prop="length" label="长"/>
|
||||||
<el-table-column prop="bepc" label="批次">
|
<el-table-column prop="width" label="宽"/>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="height" label="高"/>
|
||||||
{{ scope.row.bepc ? '是' : '否' }}
|
<el-table-column prop="volume" label="体积"/>
|
||||||
</template>
|
<el-table-column prop="unit" label="单位"/>
|
||||||
</el-table-column>
|
<el-table-column prop="recStorageArea.code" label="推荐库区"/>
|
||||||
<el-table-column prop="bexq" label="序列号">
|
<el-table-column prop="type" label="类型"/>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="valueGrade" label="物料价值等级"/>
|
||||||
{{ scope.row.bexq ? '是' : '否' }}
|
<el-table-column prop="validPeriod" label="保质期"/>
|
||||||
</template>
|
<el-table-column prop="alertDays" label="预警天数"/>
|
||||||
</el-table-column>
|
<el-table-column prop="enabled" label="是否启用" width="50">
|
||||||
<el-table-column prop="beds" label="超收">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.beds ? '是' : '否' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="becf" label="超发">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.becf ? '是' : '否' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="enabled" label="启用" width="50">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.enabled"
|
v-model="scope.row.enabled"
|
||||||
|
|
@ -182,8 +221,40 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="agvScene.name" label="AGV场景" v-if="false">
|
<el-table-column prop="isBatch" label="是否批次">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.isBatch ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="isSerial" label="是否序列号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.isSerial ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="isValidPeriod" label="是否有效期">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.isValidPeriod ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="isHazardous" label="是否危化品">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.isHazardous ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="isInvAvailable" label="库存是否可用">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.isInvAvailable ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="isSapMaterial" label="是否SAP料号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.isSapMaterial ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="heatValue" label="热度值"/>
|
||||||
|
<el-table-column prop="description" label="备注"/>
|
||||||
|
|
||||||
|
|
||||||
<el-table-column v-if="checkPer(['admin','item:edit'])" label="操作" width="150px" align="center">
|
<el-table-column v-if="checkPer(['admin','item:edit'])" label="操作" width="150px" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
|
|
@ -217,17 +288,31 @@ import {mapGetters} from "vuex";
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
id: null,
|
id: null,
|
||||||
specs: null,
|
|
||||||
code: null,
|
code: null,
|
||||||
name: null,
|
name: null,
|
||||||
description: null,
|
packageType: null,
|
||||||
|
specQuantity: 0,
|
||||||
|
specWeight: 0,
|
||||||
|
grossWeight: 0,
|
||||||
|
length: 0,
|
||||||
|
width: 0,
|
||||||
|
height: 0,
|
||||||
|
volume: 0,
|
||||||
unit: null,
|
unit: null,
|
||||||
isAttribute1: false,
|
type: null,
|
||||||
isAttribute2: false,
|
valueGrade: null,
|
||||||
point: null,
|
validPeriod: 0,
|
||||||
extendStr3:null,
|
alertDays: 0,
|
||||||
extendD3:null,
|
isBatch: false,
|
||||||
largeClass:null
|
isSerial: false,
|
||||||
|
isValidPeriod: false,
|
||||||
|
isHazardous: false,
|
||||||
|
isInvAvailable: false,
|
||||||
|
isSapMaterial: false,
|
||||||
|
heatValue: 0,
|
||||||
|
description: null,
|
||||||
|
enabled: true,
|
||||||
|
point: null
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'Item',
|
name: 'Item',
|
||||||
|
|
@ -283,17 +368,18 @@ export default {
|
||||||
pointOptions: []
|
pointOptions: []
|
||||||
}
|
}
|
||||||
}, mounted() {
|
}, mounted() {
|
||||||
//初始化数据
|
|
||||||
this.getAgvSceneAllDate()
|
|
||||||
this.getPointCHAll()
|
this.getPointCHAll()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleSuccess(response, file, fileList) {
|
||||||
|
this.crud.notify(response.toString(), CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.$refs.upload.clearFiles()
|
||||||
|
this.crud.status.add = CRUD.STATUS.NORMAL
|
||||||
|
this.crud.resetForm()
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
handleErr(err, file, fileList) {
|
handleErr(err, file, fileList) {
|
||||||
|
this.crud.notify(err.toString(), CRUD.NOTIFICATION_TYPE.ERROR)
|
||||||
let myError = err.toString()//转字符串
|
|
||||||
myError = myError.replace('Error: ', '') // 去掉前面的" Error: "
|
|
||||||
myError = JSON.parse(myError)//转对象
|
|
||||||
DonMessage.error('' + myError['message'])
|
|
||||||
},
|
},
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
|
@ -315,31 +401,16 @@ export default {
|
||||||
data.enabled = !data.enabled
|
data.enabled = !data.enabled
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getAgvSceneAllDate() {
|
|
||||||
selectEgvSceneAll().then(res => {
|
|
||||||
this.avgSceneOptions = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getPointCHAll() {
|
getPointCHAll() {
|
||||||
getPoints(3).then(res => {
|
getPoints(3).then(res => {
|
||||||
this.pointOptions = res
|
this.pointOptions = res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleSuccess(response, file, fileList) {
|
|
||||||
this.crud.notify('上传成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
this.$refs.upload.clearFiles()
|
|
||||||
this.crud.status.add = CRUD.STATUS.NORMAL
|
|
||||||
this.crud.resetForm()
|
|
||||||
this.crud.toQuery()
|
|
||||||
},
|
|
||||||
// 监听上传失败
|
// 监听上传失败
|
||||||
handleError(e, file, fileList) {
|
handleError(e, file, fileList) {
|
||||||
const msg = JSON.parse(e.message)
|
const msg = JSON.parse(e.message)
|
||||||
this.$notify({
|
this.crud.notify(msg, CRUD.NOTIFICATION_TYPE.ERROR)
|
||||||
title: msg.message,
|
|
||||||
type: 'error',
|
|
||||||
duration: 2500
|
|
||||||
})
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue