add:原材料库存修改

This commit is contained in:
zhangzhiqiang
2023-09-18 10:12:12 +08:00
parent 928770aa9b
commit 4f2e8b3e2f
52 changed files with 168 additions and 75 deletions

View File

@@ -445,7 +445,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
debugger
this.crud.delAllLoading = true
this.crud.doDelete(datas)
}).catch(() => {
@@ -583,7 +583,7 @@ export default {
},
// 切换部门
handleNodeClick(data) {
debugger
this.query.dept_id = data.dept_id
this.query.needAll = true
this.crud.toQuery()

View File

@@ -315,7 +315,7 @@ export default {
})
},
inv_typeFormat(row) {
debugger
if (row.invcode.includes('WXD')) {
return this.dict.label.EM_DEVICE_WX_INVTYPE[row.invtype]
} else {

View File

@@ -144,7 +144,7 @@ export default {
},
methods: {
open() {
debugger
const data = {
'repair_id': this.form.repair_id
}

View File

@@ -121,7 +121,7 @@ export default {
},
methods: {
open() {
debugger
const data = {
'maint_id': this.form.maint_id
}

View File

@@ -436,7 +436,7 @@ export default {
this.form.detail_count = this.form.tableData.length
},
tableChanged2(rows) {
debugger
// 对新增的行进行校验不能存在相同物料批次
rows.forEach((item) => {
let same_mater = true

View File

@@ -360,7 +360,7 @@ export default {
})
},
sectQueryChange(val) {
debugger
this.sectProp = val
if (val.length === 1) {
this.sect_id = val[0]

View File

@@ -234,7 +234,7 @@ export default {
rows.splice(index, 1)
},
submit() {
debugger
const data = this.form1
if (data.maint_plan_name === null) {
return this.crud.notify('计划名称不能为空', CRUD.NOTIFICATION_TYPE.INFO)

View File

@@ -196,7 +196,7 @@ export default {
this.openBom = row
},
tableChanged2(row) {
debugger
// const arr = this.fileBom
// for (let i = 0; i < arr.length; i++) {
// if (i === this.fileBomindex) {

View File

@@ -113,7 +113,7 @@ export default {
},
methods: {
open() {
debugger
this.material_id = this.openParam.material_id
this.query.material_id = this.material_id
this.crud.toQuery()

View File

@@ -245,7 +245,7 @@ export default {
this.form3.device_id = row.device_id
},
tableChanged(rows) {
debugger
const arr = rows
arr.forEach((item) => {
this.tableData.push(item)

View File

@@ -239,7 +239,7 @@ export default {
this.form3.device_id = row.device_id
},
tableChanged(rows) {
debugger
const arr = rows
arr.forEach((item) => {
this.tableData.push(item)

View File

@@ -319,7 +319,7 @@ export default {
},
// 下发按钮禁用条件
is_disabled(rows) {
debugger
this.checkrows = rows
if (this.checkrows.length == 0){
return true
@@ -417,7 +417,7 @@ export default {
})
},
Picconfirm(index, row) {
debugger
this.$refs.child.setForm(row.request_code)
this.PicDialog = true
},

View File

@@ -234,7 +234,7 @@ export default {
rows.splice(index, 1)
},
submit() {
debugger
const data = this.form1
if (data.maint_plan_name === null) {
return this.crud.notify('计划名称不能为空', CRUD.NOTIFICATION_TYPE.INFO)

View File

@@ -234,7 +234,7 @@ export default {
rows.splice(index, 1)
},
submit() {
debugger
const data = this.form1
if (data.maint_plan_name === null) {
return this.crud.notify('计划名称不能为空', CRUD.NOTIFICATION_TYPE.INFO)

View File

@@ -188,7 +188,7 @@ export default {
return true
},
[CRUD.HOOK.afterToCU](crud, form) {
debugger
if (!form.device_faultclass_code) {
this.queryClassId()
} else {
@@ -227,9 +227,9 @@ export default {
})
},
getSubTypes(id) {
debugger
crudClassstandard.getClassSuperior2(id).then(res => {
debugger
const date = res.content
this.buildClass(date)
this.classes = date

View File

@@ -250,7 +250,7 @@ export default {
return true
},
[CRUD.HOOK.afterToCU](crud, form) {
debugger
if (!form.maint_item_code) {
this.queryClassId()
} else {
@@ -302,7 +302,7 @@ export default {
},
getSubTypes(id) {
crudClassstandard.getClassSuperior2(id).then(res => {
debugger
const date = res.content
this.buildClass(date)
this.classes = date

View File

@@ -250,7 +250,7 @@ export default {
return true
},
[CRUD.HOOK.afterToCU](crud, form) {
debugger
if (!form.maint_item_code) {
this.queryClassId()
} else {
@@ -301,9 +301,9 @@ export default {
})
},
getSubTypes(id) {
debugger
crudClassstandard.getClassSuperior2(id).then(res => {
debugger
const date = res.content
this.buildClass(date)
this.classes = date

View File

@@ -226,9 +226,9 @@ export default {
})
},
getSubTypes(id) {
debugger
crudClassstandard.getClassSuperior2(id).then(res => {
debugger
const date = res.content
this.buildClass(date)
this.classes = date

View File

@@ -250,7 +250,7 @@ export default {
return true
},
[CRUD.HOOK.afterToCU](crud, form) {
debugger
if (!form.maint_item_code) {
this.queryClassId()
} else {
@@ -302,7 +302,7 @@ export default {
},
getSubTypes(id) {
crudClassstandard.getClassSuperior2(id).then(res => {
debugger
const date = res.content
this.buildClass(date)
this.classes = date

View File

@@ -108,7 +108,7 @@ export default {
this.$emit('tableChanged3', '')
this.$emit('update:dialogShow', false)
}).catch(err => {
debugger
const list = err.response.data.message
download2('/api/produceWorkorder/download', list).then(result => {
downloadFile(result, '错误信息汇总', 'xlsx')

View File

@@ -108,7 +108,7 @@ export default {
this.$emit('tableChanged3', '')
this.$emit('update:dialogShow', false)
}).catch(err => {
debugger
const list = err.response.data.message
download2('/api/produceWorkorder/download', list).then(result => {
downloadFile(result, '错误信息汇总', 'xlsx')

View File

@@ -108,7 +108,7 @@ export default {
this.$emit('tableChanged3', '')
this.$emit('update:dialogShow', false)
}).catch(err => {
debugger
const list = err.response.data.message
download2('/api/produceWorkorder/download', list).then(result => {
downloadFile(result, '错误信息汇总', 'xlsx')

View File

@@ -108,7 +108,7 @@ export default {
this.$emit('tableChanged3', '')
this.$emit('update:dialogShow', false)
}).catch(err => {
debugger
const list = err.response.data.message
download2('/api/produceWorkorder/download', list).then(result => {
downloadFile(result, '错误信息汇总', 'xlsx')

View File

@@ -236,7 +236,7 @@ export default {
let optType = null
const isCopyAdd = this.$parent.isCopyAdd
debugger
if (isCopyAdd === '1') {
optType = '01' // 复制新增
} else if (this.crud.status.add === 1) {
@@ -251,7 +251,7 @@ export default {
const that = this
const errMsgList = []
const data = arr.map(function(item) {
debugger
// 合格上下限同时为填入的数字或同时为空
if ((!isNaN(item.up_limit) && !isNaN(item.down_limit)) || (isNaN(item.up_limit) && isNaN(item.down_limit))) {
// 临界上下限同时为填入的数字或同时为空

View File

@@ -274,7 +274,7 @@ export default {
crud.downloadLoading = true
download('/api/pcsIfPurchaseorder/download', this.crud.query
).then(result => {
debugger
downloadFile(result, '原料需求', 'xlsx')
crud.downloadLoading = false
}).catch(() => {

View File

@@ -307,7 +307,7 @@ export default {
this.deviceList.forEach(row => {
res.check_list.forEach(selected => {
if (selected.device_code === row.device_code) {
debugger
this.$refs.multipleTable.toggleRowSelection(row, true)
}
})

View File

@@ -108,7 +108,7 @@ export default {
this.$emit('tableChanged3', '')
this.$emit('update:dialogShow', false)
}).catch(err => {
debugger
const list = err.response.data.message
download2('/api/produceWorkorder/download', list).then(result => {
downloadFile(result, '错误信息汇总', 'xlsx')

View File

@@ -108,7 +108,7 @@ export default {
this.$emit('tableChanged3', '')
this.$emit('update:dialogShow', false)
}).catch(err => {
debugger
const list = err.response.data.message
download2('/api/produceWorkorder/download', list).then(result => {
downloadFile(result, '错误信息汇总', 'xlsx')

View File

@@ -101,7 +101,7 @@ export default {
var formdata = new FormData()
formdata.append('file', this.file1.raw)
crudbucketrecord.excelImport(formdata).then((res) => {
debugger
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.$emit('tableChanged3', '')
this.$emit('update:dialogShow', false)

View File

@@ -372,7 +372,7 @@ export default {
},
tableChanged2(rows) {
rows.forEach((row) => {
debugger
let same_mater = true
this.form.tableData.forEach((item) => {
if (item.base_bill_code === row.sale_code && item.base_bill_table === row.seq_no) {

View File

@@ -359,7 +359,7 @@ export default {
this.form.dtl_row = row
this.form.storage_qty = this.form.dtl_row.plan_qty
crudProductIn.getIosInvDis({ 'iostorinv_id': row.iostorinv_id, 'iostorinvdtl_id': row.iostorinvdtl_id }).then(res => {
debugger
if (res.length !== 0) {
this.form.tableMater = res
}
@@ -379,7 +379,7 @@ export default {
})
},
changeQty(val) {
debugger
if (parseFloat(this.form.dtl_row.plan_qty) < parseFloat(val)) {
this.crud.notify('放入数量不能大于明细数量!', CRUD.NOTIFICATION_TYPE.INFO)
this.$set(this.form, 'storage_qty', parseFloat(this.form.dtl_row.plan_qty))
@@ -544,7 +544,7 @@ export default {
})
},
sectQueryChange(val) {
debugger
this.sectProp = val
if (val.length === 1) {
this.stor_id = val[0]

View File

@@ -184,7 +184,7 @@ export default {
this.queryTableDdis()
},
clcikDisRow(row) {
debugger
this.dis_row = row
if (this.dis_row.task_status < 5) {
this.dis_del = false

View File

@@ -323,7 +323,7 @@ export default {
this.$emit('AddChanged')
},
[CRUD.HOOK.beforeSubmit]() {
debugger
// 提交前校验
if (this.form.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
@@ -386,7 +386,7 @@ export default {
this.form.sect_name = row.sect_name
this.form.struct_name = row.struct_name
crudMoreOrless.getStructIvt({'struct_id': row.struct_id}).then(res => {
debugger
this.form.tableData = res
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i]

View File

@@ -213,7 +213,7 @@ export default {
'data': this.rows
}
productOut.queryStructAll(data).then(res => {
debugger
this.rows = res
this.crud.resetQuery(false)
this.$emit('update:dialogShow', false)

View File

@@ -359,7 +359,7 @@ export default {
}
},
openStructIvt() {
debugger
if (this.currentRow.iostorinv_id === undefined) {
this.crud.notify('请选择明细!', CRUD.NOTIFICATION_TYPE.INFO)
return false

View File

@@ -182,7 +182,7 @@ export default {
this.queryTableDdis()
},
clcikDisRow(row) {
debugger
this.dis_row = row
if (this.dis_row.task_status < 5) {
this.dis_del = false

View File

@@ -278,7 +278,7 @@ export default {
return row.bill_status !== '10'
},
toView(row) {
debugger
this.mstrow = row
this.viewShow = true
},

View File

@@ -62,7 +62,7 @@
class="filter-item"
>
<el-option
v-for="item in dict.ST_INV_CP_IN_TYPE"
v-for="item in dict.ST_INV_RAW_IN_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -281,7 +281,7 @@ export default {
name: 'AddDialog',
components: { MaterDtl, BillDtl },
mixins: [crud(), form(defaultForm)],
dicts: ['IO_BILL_STATUS', 'ST_INV_CP_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
dicts: ['IO_BILL_STATUS', 'ST_INV_RAW_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
props: {
dialogShow: {
type: Boolean,
@@ -455,7 +455,7 @@ export default {
this.form.detail_count = this.form.tableData.length
},
tableChanged2(rows) {
debugger
// 对新增的行进行校验不能存在相同物料批次
rows.forEach((item) => {
let same_mater = true

View File

@@ -131,7 +131,7 @@ export default {
this.$emit('update:dialogShow', false)
},
submit() {
debugger
this.$emit('update:dialogShow', false)
this.rows = this.$refs.multipleTable.selection
this.$emit('setMaterValue', this.rows)

View File

@@ -52,7 +52,7 @@
@change="crud.toQuery"
>
<el-option
v-for="item in dict.ST_INV_IN_TYPE"
v-for="item in dict.ST_INV_RAW_IN_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -144,7 +144,7 @@ export default {
name: 'ViewDialog',
components: {},
mixins: [crud()],
dicts: ['ST_INV_IN_TYPE', 'product_area', 'IO_BILL_STATUS'],
dicts: ['ST_INV_RAW_IN_TYPE', 'product_area', 'IO_BILL_STATUS'],
props: {
dialogShow: {
type: Boolean,

View File

@@ -65,6 +65,71 @@
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<!--编辑详情-->
<!--表单组件-->
<el-dialog
title="仓位物料设置"
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
width="700px"
close="closeView"
>
<el-form ref="form" :model="ivtForm" :rules="rules" size="mini" label-suffix=":" label-width="90px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="仓库名称" prop="stor_name">
<el-input v-model="ivtForm.stor_name" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="库区名称" prop="struct_name">
<el-input v-model="ivtForm.sect_name" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="仓位编码">
<el-input v-model="ivtForm.struct_code" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="仓位名称">
<el-input v-model="ivtForm.struct_name" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="物料编码">
<el-input v-model="ivtForm.material_code" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料名称">
<el-input v-model="ivtForm.material_name" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="可用数量">
<el-input v-model="ivtForm.canuse_qty" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="冻结数量">
<el-input v-model="ivtForm.ivt_qty" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="closeView">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
</div>
</el-dialog>
<!--表格渲染-->
<el-table
ref="table"
@@ -87,6 +152,12 @@
<el-table-column show-overflow-tooltip prop="warehousing_qty" label="待入数量" :formatter="crud.formatNum3" />
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" />
<el-table-column show-overflow-tooltip prop="instorage_time" label="入库时间" min-width="150" />
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<el-button type="danger" size="mini" @click="updateMaterial(scope.row)">修改</el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
@@ -102,7 +173,7 @@ import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker/index'
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
import ProductIvt from '@/views/wms/storage_manage/product/productIvt/productivt'
import ProductIvt from '@/views/wms/storage_manage/rawproduct/rawProductIvt/productivt'
export default {
name: 'RawProductIvt',
@@ -122,6 +193,8 @@ export default {
return {
height: document.documentElement.clientHeight - 180 + 'px;',
permission: {},
ivtForm: {},
dialogVisible: false,
storlist: [],
storId: null
}
@@ -138,6 +211,20 @@ export default {
})
},
methods: {
closeView(){
this.ivtForm={}
this.dialogVisible = false
},
updateMaterial(row){
this.dialogVisible = true
this.ivtForm = row
// ProductIvt.edit(row).then(res => {
// this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
// this.crud.toQuery()
// }).catch(err => {
// console.log(err.response.data.message)
// })
}
}
}
</script>

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
export function add(data) {
return request({
url: '/api/stIvtStructivtCp',
url: '/api/stIvtStructivtYl',
method: 'post',
data
})
@@ -10,7 +10,7 @@ export function add(data) {
export function del(ids) {
return request({
url: '/api/stIvtStructivtCp/delete',
url: '/api/stIvtStructivtYl/delete',
method: 'post',
data: ids
})
@@ -18,7 +18,7 @@ export function del(ids) {
export function edit(data) {
return request({
url: '/api/stIvtStructivtCp/update',
url: '/api/stIvtStructivtYl/update',
method: 'post',
data
})

View File

@@ -382,7 +382,7 @@ export default {
})
},
sectQueryChange(val) {
debugger
this.sectProp = val
if (val.length === 1) {
this.sect_id = val[0]

View File

@@ -316,7 +316,7 @@ export default {
this.$emit('AddChanged')
},
[CRUD.HOOK.beforeSubmit]() {
debugger
// 提交前校验
if (this.form.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)

View File

@@ -358,7 +358,7 @@ export default {
downloadButton() {
this.downloading = true
download('/api/in/semiproductIn/download', this.query).then(result => {
debugger
downloadFile(result, '半成品入库单', 'xlsx')
this.downloading = false
}).catch(() => {

View File

@@ -322,7 +322,7 @@ export default {
this.$emit('AddChanged')
},
[CRUD.HOOK.beforeSubmit]() {
debugger
// 提交前校验
if (this.form.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)

View File

@@ -285,7 +285,7 @@ export default {
this.materShow = true
},
tableChanged(row) {
debugger
this.form.material_code = row.material_code
this.form.material_id = row.material_id
this.tableData1 = []
@@ -298,11 +298,11 @@ export default {
})
},
deleteRow(index, rows) {
debugger
const row = this.form.tableData[index]
const nowList = []
for (let i = 0; i < this.form.tableData.length; i++) {
debugger
if (this.form.tableData[i].storagevehicle_code === row.storagevehicle_code) {
this.tableData1.push(this.form.tableData[i])
} else {
@@ -313,7 +313,7 @@ export default {
this.form.detail_count = this.form.tableData.length
},
deleteRow1(index, rows) {
debugger
const tablemap = new Map()
for (let i = 0; i < this.form.tableData.length; i++) {
tablemap.set(this.form.tableData[i].storagevehicle_code, this.form.tableData[i].storagevehicle_code)