add:原材料库存修改
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -359,7 +359,7 @@ export default {
|
||||
}
|
||||
},
|
||||
openStructIvt() {
|
||||
debugger
|
||||
|
||||
if (this.currentRow.iostorinv_id === undefined) {
|
||||
this.crud.notify('请选择明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -278,7 +278,7 @@ export default {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
toView(row) {
|
||||
debugger
|
||||
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
})
|
||||
|
||||
@@ -382,7 +382,7 @@ export default {
|
||||
})
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
debugger
|
||||
|
||||
this.sectProp = val
|
||||
if (val.length === 1) {
|
||||
this.sect_id = val[0]
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user