This commit is contained in:
2022-11-09 10:53:35 +08:00
15 changed files with 213 additions and 321 deletions

View File

@@ -40,7 +40,7 @@ module.exports = {
/**
* @description token key
*/
TokenKey: 'EL-ADMIN-TOEKN',
TokenKey: 'NL-LMS-TOEKN',
/**
* @description 请求超时时间毫秒默认2分钟
*/

View File

@@ -117,11 +117,11 @@
<el-table-column prop="status" label="状态" align="center" :formatter="bill_statusFormat" />
<el-table-column prop="sect_name" label="盘点库区" align="center" />
<el-table-column prop="struct_name" label="盘点货位" align="center" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="箱号" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="120" align="center" />
<el-table-column prop="material_name" label="物料名称" align="center" min-width="120" show-overflow-tooltip />
<el-table-column prop="base_qty" label="" align="center" :formatter="crud.formatNum0" />
<el-table-column prop="fac_qty" label="盘点" align="center" :formatter="crud.formatNum0" />
<el-table-column prop="base_qty" label="" align="center" :formatter="crud.formatNum0" />
<el-table-column prop="fac_qty" label="盘点数" align="center" :formatter="crud.formatNum0" />
<el-table-column prop="qty_unit_name" label="计量单位" align="center" />
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="160" fixed="right">
<template scope="scope">
@@ -144,7 +144,7 @@ const defaultForm = {
stor_id: '',
stor_code: '',
stor_name: '',
status: '10',
status: '1',
dtl_num: '0',
check_type: '',
remark: '',
@@ -190,7 +190,7 @@ export default {
methods: {
open() {
// 查询原材料库的仓库
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
crudStorattr.getStor({ 'is_productstore': '1' }).then(res => {
this.storlist = res.content
})
},
@@ -238,6 +238,7 @@ export default {
this.dtlShow = true
},
tableChanged(rows) {
debugger
const tablemap = new Map()
rows.forEach((item) => {
if (this.form.tableData.length !== 0) {
@@ -249,12 +250,12 @@ export default {
}
if (!this.flagnow) {
item.edit = false
item.status = '01'
item.status = '1'
tablemap.set(item.struct_code + '间隔' + item.material_code, item)
}
} else {
item.edit = false
item.status = '01'
item.status = '1'
tablemap.set(item.struct_code + '间隔' + item.material_code, item)
}
})

View File

@@ -59,12 +59,11 @@
<el-table-column type="selection" width="55" />
<el-table-column show-overflow-tooltip prop="sect_name" label="库区" width="110px" />
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" width="110px" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="号" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="150px" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" width="110px" />
<el-table-column show-overflow-tooltip prop="base_qty" label="数" :formatter="crud.formatNum0" />
<el-table-column show-overflow-tooltip prop="base_qty" label="数" :formatter="crud.formatNum0" />
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="计量单位" />
<el-table-column show-overflow-tooltip prop="storage_qty" :formatter="crud.formatNum3" label="重量" width="110px" />
</el-table>
<!--分页组件-->
<pagination />
@@ -133,7 +132,7 @@ export default {
},
methods: {
open() {
crudSectattr.getSect({ is_materialstore: '1' }).then(res => {
crudSectattr.getSect({ is_productstore: '1' }).then(res => {
this.sects = res.content
})
this.crud.toQuery()

View File

@@ -60,7 +60,7 @@
</el-select>
</el-form-item>
<el-form-item label="明细数" prop="dtl_num">
<el-input v-model="form.dtl_num" style="width: 200px" :disabled="true" />
<el-input v-model="tableData.length" style="width: 200px" :disabled="true" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" :disabled="true" style="width: 480px;" clearable :autosize="{ minRows: 2, maxRows: 4 }" type="textarea" maxlength="100" show-word-limit />
@@ -72,7 +72,7 @@
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button
<!-- <el-button
slot="left"
class="filter-item"
type="primary"
@@ -82,7 +82,7 @@
@click="addrow"
>
新增一行
</el-button>
</el-button>-->
</span>
</div>
@@ -100,7 +100,7 @@
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="sect_name" label="盘点库区" align="center" />
<el-table-column prop="struct_name" label="盘点货位" align="center" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="号" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="190" align="center">
<template scope="scope">
<el-input v-show="isShow(scope.$index, scope.row,1)" v-model="scope.row.material_code" disabled class="input-with-select">
@@ -109,9 +109,9 @@
<span v-show="isShow(scope.$index, scope.row,3)">{{ scope.row.material_code }}</span>
</template>
</el-table-column>
<el-table-column prop="material_name" label="物料名称" align="center" />
<el-table-column prop="base_qty" label="数" :formatter="crud.formatNum0" align="center" />
<el-table-column show-overflow-tooltip prop="fac_qty" label="盘点数" width="160" align="center">
<el-table-column prop="material_name" show-overflow-tooltip label="物料名称" align="center" />
<el-table-column prop="base_qty" label="数" :formatter="crud.formatNum0" align="center" />
<el-table-column show-overflow-tooltip prop="fac_qty" label="盘点数" width="160" align="center">
<template scope="scope">
<el-input-number v-show="isShow(scope.$index, scope.row,2)" v-model="scope.row.fac_qty" :precision="0" :min="0" />
<span v-show="isShow(scope.$index, scope.row,4)">{{ scope.row.fac_qty }}</span>
@@ -175,7 +175,7 @@ export default {
stor_id: '',
stor_code: '',
stor_name: '',
status: '10',
status: '1',
dtl_num: '0',
check_type: '',
remark: '',
@@ -196,7 +196,7 @@ export default {
methods: {
open() {
// 查询原材料库的仓库
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
crudStorattr.getStor({ 'is_productstore': '1' }).then(res => {
this.storlist = res.content
})
check.getOutBillDtl2({ 'check_id': this.form.check_id }).then(res => {
@@ -204,9 +204,9 @@ export default {
// 将明细变成不可编辑
for (let i = 0; i < this.tableData.length; i++) {
const row = this.tableData[i]
row.edit = false
if (row.status > '04') {
row.edit = true
this.$set(row, 'edit', false)
if (row.status > '3') {
this.$set(row, 'edit', true)
}
this.tableData.splice(i, 1, row)
}
@@ -230,25 +230,18 @@ export default {
}
},
isCanDel(index, row, type) {
const num = parseFloat(row.base_qty)
if (type === 1) {
if (row.status > '04' || num > 0) {
return true
} else {
if (row.status === '1') {
return false
}
} else {
if (row.status > '04') {
return true
} else {
return false
return true
}
}
},
isShow(index, row, type) {
const num = parseFloat(row.base_qty)
if (type === 1) {
if (row.status > '04') {
if (row.status > '3') {
return false
} else {
if (num > 0) {
@@ -262,7 +255,7 @@ export default {
}
}
} else if (type === 2) {
if (row.status > '04') {
if (row.status > '2') {
return false
} else {
if (row.edit) {
@@ -272,7 +265,7 @@ export default {
}
}
} else if (type === 3) {
if (row.status > '04') {
if (row.status > '3') {
return true
} else {
if (num > 0) {
@@ -286,7 +279,7 @@ export default {
}
}
} else if (type === 4) {
if (row.status > '04') {
if (row.status > '2') {
return true
} else {
if (row.edit) {

View File

@@ -119,7 +119,7 @@
>
盘点
</el-button>
<el-button
<!-- <el-button
slot="right"
class="filter-item"
type="warning"
@@ -140,7 +140,7 @@
@click="downdtl"
>
导出Excel
</el-button>
</el-button>-->
</crudOperation>
<!--表格渲染-->
<el-table
@@ -149,7 +149,6 @@
:data="crud.data"
size="mini"
style="width: 100%;"
:highlight-current-row="true"
@selection-change="crud.selectionChangeHandler"
@current-change="handleCurrentChange"
@select="handleSelectionChange"
@@ -178,12 +177,12 @@
</template>
</el-table-column>
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="100" prop="status" label="单据状态" />
<el-table-column prop="stor_name" label="仓库" width="100" />
<el-table-column show-overflow-tooltip prop="check_type" :formatter="bill_typeFormat" width="100" label="业务类型" />
<el-table-column show-overflow-tooltip prop="is_nok" :formatter="is_nokFormat" width="100" label="盘点状态" />
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
<el-table-column label="明细数" align="center" prop="dtl_num" width="100" />
<el-table-column show-overflow-tooltip prop="input_time" width="135" label="创建日期" />
<el-table-column prop="stor_name" label="仓库" width="120" />
<el-table-column show-overflow-tooltip prop="check_type" :formatter="bill_typeFormat" width="120" label="业务类型" />
<el-table-column show-overflow-tooltip prop="is_nok" :formatter="is_nokFormat" width="120" label="盘点状态" />
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="120" />
<el-table-column label="明细数" align="center" prop="dtl_num" width="120" />
<el-table-column show-overflow-tooltip prop="input_time" width="150" label="创建日期" />
</el-table>
<!--分页组件-->
<pagination />
@@ -246,13 +245,13 @@ export default {
}
},
created() {
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
crudStorattr.getStor({ 'is_productstore': '1' }).then(res => {
this.storlist = res.content
})
},
methods: {
canUd(row) {
return row.status !== '10'
return row.status !== '1'
},
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.buss_type = ''
@@ -265,7 +264,7 @@ export default {
this.buttonChange(row)
} else if (val.length === 1) {
this.buttonChange(row)
}else{
} else {
this.handleCurrentChange(null)
}
},
@@ -277,12 +276,12 @@ export default {
if (current !== null) {
this.currentRow = current
this.downdtl_flag = false
if (current.status === '10' || current.status === '30') {
if (current.status === '1' || current.status === '3') {
this.check_flag = false
} else {
this.check_flag = true
}
if (current.status === '30' && current.is_nok === '1') {
if (current.status === '3' && current.is_nok === '1') {
this.confirm_flag = false
} else {
this.confirm_flag = true