rev:修改半成品出库页面接口。

This commit is contained in:
2023-04-17 11:22:36 +08:00
parent 640503c693
commit b762ec097a
6 changed files with 714 additions and 516 deletions

View File

@@ -1,228 +1,261 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/productOut',
method: 'post',
data
})
return request({
url: 'api/semiProductOut',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/productOut/',
method: 'delete',
data: ids
})
return request({
url: 'api/semiProductOut/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/productOut',
method: 'put',
data
})
return request({
url: 'api/semiProductOut',
method: 'put',
data
})
}
export function getOutBillDtl(data) {
return request({
url: '/api/productOut/getOutBillDtl',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/getOutBillDtl',
method: 'post',
data
})
}
export function getOutBillDis(data) {
return request({
url: '/api/productOut/getOutBillDis',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/getOutBillDis',
method: 'post',
data
})
}
export function getOutBillDisDtl(params) {
return request({
url: '/api/productOut/getOutBillDisDtl',
method: 'get',
params
})
return request({
url: '/api/semiProductOut/getOutBillDisDtl',
method: 'get',
params
})
}
export function getOutBillTask(params) {
return request({
url: '/api/productOut/getOutBillTask',
method: 'get',
params
})
return request({
url: '/api/semiProductOut/getOutBillTask',
method: 'get',
params
})
}
export function getInvTypes() {
return request({
url: '/api/productOut/getInvTypes',
method: 'get'
})
return request({
url: '/api/semiProductOut/getInvTypes',
method: 'get'
})
}
export function insertDtl(data) {
return request({
url: '/api/productOut/insertDtl',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/insertDtl',
method: 'post',
data
})
}
export function allDiv(data) {
return request({
url: '/api/productOut/allDiv',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/allDiv',
method: 'post',
data
})
}
export function allDivOne(data) {
return request({
url: '/api/productOut/allDivOne',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/allDivOne',
method: 'post',
data
})
}
export function allCancel(data) {
return request({
url: '/api/productOut/allCancel',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/allCancel',
method: 'post',
data
})
}
export function oneCancel(data) {
return request({
url: '/api/productOut/oneCancel',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/oneCancel',
method: 'post',
data
})
}
export function setPoint(data) {
return request({
url: '/api/productOut/setPoint',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/setPoint',
method: 'post',
data
})
}
export function oneSetPoint(data) {
return request({
url: '/api/productOut/oneSetPoint',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/oneSetPoint',
method: 'post',
data
})
}
export function getStructIvt(params) {
return request({
url: '/api/productOut/getStructIvt',
method: 'get',
params
})
return request({
url: '/api/semiProductOut/getStructIvt',
method: 'get',
params
})
}
export function manualDiv(data) {
return request({
url: '/api/productOut/manualDiv',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/manualDiv',
method: 'post',
data
})
}
export function confirm(data) {
return request({
url: '/api/productOut/confirm',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/confirm',
method: 'post',
data
})
}
export function issueTask(data) {
return request({
url: '/api/productOut/issueTask',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/issueTask',
method: 'post',
data
})
}
export function finishTask(data) {
return request({
url: '/api/productOut/finishTask',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/finishTask',
method: 'post',
data
})
}
export function cancleTaskfinish(data) {
return request({
url: '/api/productOut/cancleTaskfinish',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/cancleTaskfinish',
method: 'post',
data
})
}
export function paramByCodeType(data) {
return request({
url: '/api/productOut/paramByCodeType',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/paramByCodeType',
method: 'post',
data
})
}
export function schAreaType(data) {
return request({
url: '/api/productOut/schAreaType',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/schAreaType',
method: 'post',
data
})
}
export function backConfirm(data) {
return request({
url: '/api/productOut/backConfirm',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/backConfirm',
method: 'post',
data
})
}
export function getType() {
return request({
url: '/api/productOut/getType',
method: 'get'
})
return request({
url: '/api/semiProductOut/getType',
method: 'get'
})
}
export function moneySubmit(data) {
return request({
url: '/api/productOut/moneySubmit',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/moneySubmit',
method: 'post',
data
})
}
export function getDisNum(data) {
return request({
url: '/api/productOut/getDisNum',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/getDisNum',
method: 'post',
data
})
}
export function queryBox(data) {
return request({
url: '/api/productOut/queryBox',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/queryBox',
method: 'post',
data
})
}
export function getOutBillTask2(data) {
return request({
url: '/api/productOut/getOutBillTask2',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/getOutBillTask2',
method: 'post',
data
})
}
export function cancelTask(data) {
return request({
url: '/api/productOut/cancelTask',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/cancelTask',
method: 'post',
data
})
}
export function allSetPoint(data) {
return request({
url: '/api/productOut/allSetPoint',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/allSetPoint',
method: 'post',
data
})
}
export function oneSetPoint2(data) {
return request({
url: '/api/productOut/oneSetPoint2',
method: 'post',
data
})
return request({
url: '/api/semiProductOut/oneSetPoint2',
method: 'post',
data
})
}
export default {
add,
edit,
del,
allDiv,
allCancel,
getOutBillDtl,
getOutBillDis,
setPoint,
oneSetPoint,
getOutBillTask,
getStructIvt,
manualDiv,
confirm,
issueTask,
finishTask,
cancleTaskfinish,
getInvTypes,
paramByCodeType,
schAreaType,
backConfirm,
getOutBillDisDtl,
getType,
allDivOne,
moneySubmit,
getDisNum,
queryBox,
getOutBillTask2,
oneCancel,
cancelTask,
allSetPoint,
oneSetPoint2
}
export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, setPoint, oneSetPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType, allDivOne, moneySubmit, getDisNum, queryBox, getOutBillTask2, oneCancel, cancelTask, allSetPoint, oneSetPoint2 }

View File

@@ -81,7 +81,7 @@ export default {
components: { rrOperation, pagination },
cruds() {
return CRUD({
title: '用户', url: 'api/productOut/addDtl',
title: '用户', url: 'api/semiProductOut/addDtl',
optShow: {
add: false,
edit: false,

View File

@@ -1,69 +1,28 @@
<template>
<el-dialog
append-to-body
title="出库单详情"
:visible.sync="dialogVisible"
destroy-on-close
fullscreen
@close="close"
@open="open"
>
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" size="mini" label-width="85px" label-suffix=":">
<el-dialog append-to-body title="出库单详情" :visible.sync="dialogVisible" destroy-on-close fullscreen @close="close"
@open="open">
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form"
size="mini" label-width="85px" label-suffix=":">
<el-form-item label="单据号" prop="bill_code">
<label slot="label">&nbsp;&nbsp;&nbsp;:</label>
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
</el-form-item>
<el-form-item label="生产区域">
<el-select
v-model="form.product_code"
clearable
size="mini"
placeholder="全部"
:disabled="true"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.product_area"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select v-model="form.product_code" clearable size="mini" placeholder="全部" :disabled="true" class="filter-item"
@change="crud.toQuery">
<el-option v-for="item in dict.product_area" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="业务类型" prop="bill_type">
<el-select
v-model="form.bill_type"
clearable
filterable
size="mini"
placeholder="业务类型"
class="filter-item"
disabled
>
<el-option
v-for="item in dict.bill_type"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select v-model="form.bill_type" clearable filterable size="mini" placeholder="业务类型" class="filter-item"
disabled>
<el-option v-for="item in dict.bill_type" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="单据状态" prop="bill_status">
<el-select
v-model="form.bill_status"
clearable
style="width: 210px"
placeholder="单据状态"
class="filter-item"
disabled
>
<el-option
v-for="item in dict.io_bill_status"
:key="item.id"
:label="item.label"
:value="item.value"
/>
<el-select v-model="form.bill_status" clearable style="width: 210px" placeholder="单据状态" class="filter-item"
disabled>
<el-option v-for="item in dict.io_bill_status" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="明细数" prop="detail_count">
@@ -72,17 +31,12 @@
</el-form-item>
<el-form-item label="总重量" prop="total_qty">
<label slot="label">&nbsp;&nbsp;&nbsp;:</label>
<el-input-number
v-model="form.total_qty"
:controls="false"
:precision="3"
:min="0"
disabled
style="width: 210px"
/>
<el-input-number v-model="form.total_qty" :controls="false" :precision="3" :min="0" disabled
style="width: 210px" />
</el-form-item>
<el-form-item label="业务日期" prop="biz_date">
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px" value-format="yyyy-MM-dd" :disabled="true" />
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px"
value-format="yyyy-MM-dd" :disabled="true" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
@@ -92,19 +46,11 @@
<div class="crud-opts2">
<span class="role-span2">出库明细</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<el-card class="box-card" shadow="never" :body-style="{ padding: '0' }">
<!--表格渲染-->
<el-table
ref="table"
:data="tableDtl"
style="width: 100%;"
max-height="300"
size="mini"
border
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@current-change="handleDtlCurrentChange"
>
<el-table ref="table" :data="tableDtl" style="width: 100%;" max-height="300" size="mini" border
:highlight-current-row="true" :header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
@current-change="handleDtlCurrentChange">
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column :formatter="bill_statusFormat" prop="bill_status" label="状态" />
<el-table-column min-width="140" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
@@ -121,19 +67,11 @@
<div class="crud-opts2">
<span class="role-span">作业明细</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<el-card class="box-card" shadow="never" :body-style="{ padding: '0' }">
<!--表格渲染-->
<el-table
ref="table2"
:data="tabledis"
style="width: 100%;"
max-height="300"
size="mini"
border
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@current-change="handleDisCurrentChange"
>
<el-table ref="table2" :data="tabledis" style="width: 100%;" max-height="300" size="mini" border
:highlight-current-row="true" :header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
@current-change="handleDisCurrentChange">
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
@@ -155,7 +93,7 @@ import crudProductIn from '@/views/wms/st/productIn/productin'
export default {
name: 'ViewDialog',
components: { },
components: {},
mixins: [crud()],
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL', 'bill_type', 'product_area'],
props: {
@@ -167,7 +105,7 @@ export default {
type: Object
}
},
data() {
data () {
return {
dialogVisible: false,
tableDtl: [],
@@ -180,26 +118,26 @@ export default {
},
watch: {
dialogShow: {
handler(newValue) {
handler (newValue) {
this.dialogVisible = newValue
}
},
rowmst: {
handler(newValue) {
handler (newValue) {
this.form = newValue
}
}
},
created() {
created () {
crudProductIn.queryStor().then(res => {
this.storlist = res
})
},
methods: {
open() {
open () {
this.queryTableDtl()
},
close() {
close () {
this.$emit('update:dialogShow', false)
this.currentDis = {}
this.currentdtl = null
@@ -207,19 +145,19 @@ export default {
this.tabledis = []
this.$emit('AddChanged')
},
bill_statusFormat(row) {
bill_statusFormat (row) {
return this.dict.label.io_bill_status[row.bill_status]
},
taskdtl_typeFormat(row) {
taskdtl_typeFormat (row) {
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
},
task_statusFormat(row) {
task_statusFormat (row) {
return this.dict.label.task_status[row.task_status]
},
work_statusFormat(row) {
work_statusFormat (row) {
return this.dict.label.work_status[row.work_status]
},
handleDtlCurrentChange(current) {
handleDtlCurrentChange (current) {
if (current !== null) {
this.tabledis = []
this.currentdtl = current
@@ -229,22 +167,22 @@ export default {
this.currentdtl = {}
}
},
invtypeFormat(row, column) {
invtypeFormat (row, column) {
for (const item of this.billtypelist) {
if (item.code === row.source_bill_type) {
return item.name
}
}
},
handleDisCurrentChange(current) {
handleDisCurrentChange (current) {
this.currentDis = current
},
queryTableDtl() {
queryTableDtl () {
productOut.getOutBillDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
this.tableDtl = res
})
},
queryTableDdis() {
queryTableDdis () {
if (this.currentdtl !== null) {
productOut.getOutBillDis({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
this.tabledis = res
@@ -267,15 +205,15 @@ export default {
.crud-opts2 .el-dialog__title2 {
line-height: 24px;
font-size:20px;
color:#303133;
font-size: 20px;
color: #303133;
}
.crud-opts2 .role-span2 {
padding: 0px 0px 20px 0px;
}
.crud-opts2 {
padding: 10px 0px 0px 50px;
}
</style>

View File

@@ -15,16 +15,44 @@
</el-col>
<el-col :span="4">
<span>
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
<el-button
icon="el-icon-check"
size="mini"
:loading="crud.cu === 2"
type="primary"
@click="crud.submitCU"
>保存</el-button
>
<el-button
icon="el-icon-close"
size="mini"
type="info"
@click="crud.cancelCU"
>关闭</el-button
>
</span>
</el-col>
</el-row>
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
<el-form
ref="form"
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
:inline="true"
:model="form"
:rules="rules"
size="mini"
label-width="85px"
label-suffix=":"
>
<el-form-item label="单据号" prop="bill_code">
<label slot="label">单&nbsp;&nbsp;据&nbsp;号:</label>
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
<el-input
v-model="form.bill_code"
disabled
placeholder="系统生成"
clearable
style="width: 210px"
/>
</el-form-item>
<el-form-item label="仓库" prop="product_code">
<label slot="label">生产区域:</label>
@@ -79,7 +107,12 @@
</el-form-item>
<el-form-item label="明细数" prop="detail_count">
<label slot="label">明&nbsp;&nbsp;细&nbsp;数:</label>
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
<el-input
v-model="form.detail_count"
size="mini"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="总重量" prop="total_qty">
<label slot="label">总&nbsp;&nbsp;重&nbsp;量:</label>
@@ -93,11 +126,26 @@
/>
</el-form-item>
<el-form-item label="业务日期" prop="biz_date">
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px" value-format="yyyy-MM-dd" :disabled="crud.status.view > 0" />
<el-date-picker
v-model="form.biz_date"
type="date"
placeholder="选择日期"
style="width: 210px"
value-format="yyyy-MM-dd"
:disabled="crud.status.view > 0"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<label slot="label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</label>
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
<label slot="label"
>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</label
>
<el-input
v-model="form.remark"
style="width: 380px;"
rows="2"
type="textarea"
:disabled="crud.status.view > 0"
/>
</el-form-item>
</el-form>
@@ -117,7 +165,6 @@
添加物料
</el-button>
</span>
</div>
<!--表格渲染-->
<el-table
@@ -125,13 +172,25 @@
:data="form.tableData"
style="width: 100%;"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
:header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" />
<el-table-column
show-overflow-tooltip
prop="material_code"
label="物料编码"
/>
<el-table-column
show-overflow-tooltip
prop="material_name"
label="物料名称"
/>
<el-table-column
show-overflow-tooltip
prop="material_spec"
label="物料规格"
/>
<el-table-column show-overflow-tooltip prop="pcsn" label="订单号">
<template slot-scope="scope">
<el-input
@@ -156,7 +215,13 @@
/>
</template>
</el-table-column>
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
<el-table-column
v-if="crud.status.cu > 0"
align="center"
label="操作"
width="170"
fixed="right"
>
<template scope="scope">
<el-button
type="danger"
@@ -175,33 +240,32 @@
:mater-opt-code="materType"
@setMaterValue="tableChanged"
/>
</el-dialog>
</template>
<script>
import CRUD, { crud, form } from '@crud/crud'
import crudSemiProductIn from '@/api/wms/st/in/semiProductIn'
import MaterDtl from '@/views/wms/pub/MaterDialog'
import CRUD, { crud, form } from "@crud/crud";
import crudSemiProductIn from "@/api/wms/st/in/semiProductIn";
import MaterDtl from "@/views/wms/pub/MaterDialog";
const defaultForm = {
bill_code: '',
product_code: 'A1',
bill_status: '10',
total_qty: '0',
detail_count: '0',
bill_type: '',
remark: '',
bill_code: "",
product_code: "A1",
bill_status: "10",
total_qty: "0",
detail_count: "0",
bill_type: "",
remark: "",
biz_date: new Date(),
create_mode: '',
create_mode: "",
tableData: []
}
};
export default {
name: 'AddDialog',
name: "AddDialog",
components: { MaterDtl },
mixins: [crud(), form(defaultForm)],
dicts: ['IO_BILL_STATUS', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
dicts: ["IO_BILL_STATUS", "ST_QUALITY_SCODE", "bill_type", "product_area"],
props: {
dialogShow: {
type: Boolean,
@@ -217,121 +281,130 @@ export default {
materShow: false,
dtlShow: false,
opendtlParam: null,
materType: '03', // 关键成品
materType: "03", // 关键成品
storlist: [],
billtypelist: [],
rules: {
product_code: [
{ required: true, message: '生产区域不能为空', trigger: 'blur' }
{ required: true, message: "生产区域不能为空", trigger: "blur" }
],
bill_type: [
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
{ required: true, message: "业务类型不能为空", trigger: "blur" }
],
biz_date: [
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
{ required: true, message: "业务日期不能为空", trigger: "blur" }
]
}
}
};
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
this.dialogVisible = newValue;
}
}
},
methods: {
open() {
crudSemiProductIn.queryStor().then(res => {
this.storlist = res
})
this.storlist = res;
});
},
close() {
this.$emit('AddChanged')
this.$emit("AddChanged");
},
[CRUD.HOOK.afterToEdit]() {
// 获取入库单明细
crudSemiProductIn.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
this.form.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i]
this.form.tableData.splice(i, 1, row)
}
})
crudSemiProductIn
.getIODtl({ bill_code: this.form.bill_code })
.then(res => {
this.form.tableData = res;
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i];
this.form.tableData.splice(i, 1, row);
}
});
},
[CRUD.HOOK.afterToView]() {
crudSemiProductIn.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
this.form.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i]
this.form.tableData.splice(i, 1, row)
}
})
crudSemiProductIn
.getIODtl({ bill_code: this.form.bill_code })
.then(res => {
this.form.tableData = res;
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i];
this.form.tableData.splice(i, 1, row);
}
});
},
[CRUD.HOOK.beforeSubmit]() {
// 提交前校验
if (this.form.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
this.crud.notify("请至少选择一条明细", CRUD.NOTIFICATION_TYPE.INFO);
return false;
}
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i]
const row = this.form.tableData[i];
if (!row.pcsn || !row.plan_qty) {
this.crud.notify('订单号、数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
return false
this.crud.notify("订单号、数量不能为空", CRUD.NOTIFICATION_TYPE.INFO);
return false;
}
}
},
deleteRow(index, rows) {
const material_code = rows[index].material_code
let len = rows.length
const material_code = rows[index].material_code;
let len = rows.length;
while (len--) {
const obj = rows[len]
const obj = rows[len];
if (material_code === obj.material_code) {
const index = rows.indexOf(obj)
if (index > -1) { // 移除找到的指定元素
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
rows.splice(index, 1)
this.form.detail_count = this.form.tableData.length
const index = rows.indexOf(obj);
if (index > -1) {
// 移除找到的指定元素
this.form.total_qty =
parseFloat(this.form.total_qty) -
parseFloat(rows[index].plan_qty);
rows.splice(index, 1);
this.form.detail_count = this.form.tableData.length;
}
}
}
},
tableChanged(rows) {
// 对新增的行进行校验不能存在相同物料批次
rows.forEach((item) => {
let same_mater = true
this.form.tableData.forEach((row) => {
rows.forEach(item => {
let same_mater = true;
this.form.tableData.forEach(row => {
if (row.material_code === item.material_code) {
same_mater = false
same_mater = false;
}
})
});
if (same_mater) {
item.quality_scode = '01'
item.ivt_level = '01'
item.is_active = '1'
item.plan_qty = '1'
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
this.form.tableData.splice(-1, 0, item)
item.quality_scode = "01";
item.ivt_level = "01";
item.is_active = "1";
item.plan_qty = "1";
this.form.total_qty =
parseFloat(this.form.total_qty) + parseFloat(item.plan_qty);
this.form.tableData.splice(-1, 0, item);
}
})
this.form.detail_count = this.form.tableData.length
});
this.form.detail_count = this.form.tableData.length;
},
insertEvent(row) {
this.materShow = true
this.materShow = true;
},
changeQty() {
this.form.total_qty = 0
this.form.tableData.forEach((item) => {
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
})
this.form.total_qty = 0;
this.form.tableData.forEach(item => {
this.form.total_qty =
parseFloat(this.form.total_qty) + parseFloat(item.plan_qty);
});
}
}
}
};
</script>
<style>

View File

@@ -1,6 +1,6 @@
<template>
<el-dialog
title="出库单编辑"
title="出库单新增"
append-to-body
fullscreen
:before-close="crud.cancelCU"
@@ -14,23 +14,50 @@
</el-col>
<el-col :span="4">
<span>
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
<el-button
icon="el-icon-check"
size="mini"
:loading="crud.cu === 2"
type="primary"
@click="crud.submitCU"
>保存</el-button
>
<el-button
icon="el-icon-close"
size="mini"
type="info"
@click="crud.cancelCU"
>关闭</el-button
>
</span>
</el-col>
</el-row>
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
<el-form
ref="form"
style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;"
:inline="true"
:model="form"
:rules="rules"
size="mini"
label-width="85px"
label-suffix=":"
>
<el-form-item label="单据号" prop="bill_code">
<label slot="label">单&nbsp;&nbsp;据&nbsp;号:</label>
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
<el-input
v-model="form.bill_code"
disabled
placeholder="系统生成"
clearable
style="width: 210px"
/>
</el-form-item>
<el-form-item label="生产区域" prop="product_code">
<label slot="label">生产区域:</label>
<el-select
v-model="form.product_code"
clearable
placeholder="生产区域"
class="filter-item"
style="width: 210px"
:disabled="crud.status.view > 0"
@@ -80,7 +107,12 @@
</el-form-item>
<el-form-item label="明细数" prop="detail_count">
<label slot="label">明&nbsp;&nbsp;细&nbsp;数:</label>
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
<el-input
v-model="form.detail_count"
size="mini"
disabled
style="width: 210px"
/>
</el-form-item>
<el-form-item label="总重量" prop="total_qty">
<label slot="label">总&nbsp;&nbsp;重&nbsp;量:</label>
@@ -94,18 +126,32 @@
/>
</el-form-item>
<el-form-item label="业务日期" prop="biz_date">
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px" value-format="yyyy-MM-dd" :disabled="crud.status.view > 0" />
<el-date-picker
v-model="form.biz_date"
type="date"
placeholder="选择日期"
style="width: 210px"
value-format="yyyy-MM-dd"
:disabled="crud.status.view > 0"
/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<label slot="label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</label>
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
<label slot="label"
>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</label
>
<el-input
v-model="form.remark"
style="width: 380px;"
rows="2"
type="textarea"
:disabled="crud.status.view > 0"
/>
</el-form-item>
</el-form>
<div class="crud-opts2">
<span class="role-span">出库明细</span>
<span v-if="crud.status.cu > 0" class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button
@@ -118,7 +164,7 @@
>
添加物料
</el-button>
<!-- <el-button
<!-- <el-button
slot="left"
class="filter-item"
type="primary"
@@ -129,7 +175,6 @@
新增一行
</el-button>-->
</span>
</div>
<!--表格渲染-->
<el-table
@@ -137,72 +182,128 @@
:data="form.tableData"
style="width: 100%;"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
:header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="190" align="center">
<!-- <template scope="scope">
<el-table-column
show-overflow-tooltip
prop="material_code"
label="物料编码"
width="190"
align="center"
>
<template scope="scope">
<el-input v-show="!scope.row.edit" v-model="scope.row.material_code" disabled class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="queryMater(scope.$index, scope.row)" />
</el-input>
<span v-show="scope.row.edit">{{ scope.row.material_code }}</span>
</template>-->
</template>
</el-table-column>
<el-table-column prop="material_name" label="物料名称" align="center" min-width="150px" show-overflow-tooltip />
<el-table-column prop="material_spec" label="物料规格" align="center" min-width="150px" show-overflow-tooltip />
<el-table-column show-overflow-tooltip prop="pcsn" label="订单号" width="150px" align="center">
<!-- <template scope="scope">
<el-table-column
prop="material_name"
label="物料名称"
align="center"
min-width="150px"
show-overflow-tooltip
/>
<el-table-column
prop="material_spec"
label="物料规格"
align="center"
min-width="150px"
show-overflow-tooltip
/>
<el-table-column
show-overflow-tooltip
prop="pcsn"
label="订单号"
width="150px"
align="center"
>
<!-- <template scope="scope">
<el-input v-show="!scope.row.edit" v-model="scope.row.pcsn" size="mini" />
<span v-show="scope.row.edit">{{ scope.row.pcsn }}</span>
</template>-->
</el-table-column>
<el-table-column prop="plan_qty" label="出库重量" width="150" align="center">
<el-table-column
prop="plan_qty"
label="出库重量"
width="150"
align="center"
>
<template scope="scope">
<el-input-number v-model="scope.row.plan_qty" :precision="3" :controls="false" :min="1" style="width: 120px" />
<!-- <span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>-->
<el-input-number
v-model="scope.row.plan_qty"
:precision="3"
:controls="false"
:min="1"
style="width: 120px"
/>
<!-- <span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>-->
</template>
</el-table-column>
<el-table-column prop="qty_unit_name" label="单位" align="center" />
<!-- <el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center">
<!-- <el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center">
<template scope="scope">
<el-input v-model="scope.row.remark" size="mini" />
<span>{{ scope.row.remark }}</span>
</template>
</el-table-column>-->
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="160" fixed="right">
<el-table-column
v-if="crud.status.cu > 0"
align="center"
label="操作"
width="160"
fixed="right"
>
<template scope="scope">
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index, form.tableData)" />
<el-button
type="danger"
class="filter-item"
size="mini"
icon="el-icon-delete"
@click.native.prevent="deleteRow(scope.$index, form.tableData)"
/>
</template>
</el-table-column>
</el-table>
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged5" />
<MaterDialog :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @setMaterValue="setMaterValue" />
<AddDtl
:dialog-show.sync="dtlShow"
:stor-id="storId"
@tableChanged="tableChanged5"
/>
<MaterDialog
:dialog-show.sync="materShow"
:mater-opt-code.sync="materType"
@setMaterValue="setMaterValue"
/>
</el-dialog>
</template>
<script>
import CRUD, { crud, form } from '@crud/crud'
import AddDtl from '@/views/wms/st/semiProductOut/AddDtl'
import MaterDialog from '@/views/wms/pub/MaterDialog'
import crudSemiProductIn from '@/api/wms/st/out/semiProductOut'
import CRUD, { crud, form } from "@crud/crud";
import AddDtl from "@/views/wms/st/semiProductOut/AddDtl";
import MaterDialog from "@/views/wms/pub/MaterDialog";
import crudSemiProductIn from "@/api/wms/st/out/semiProductOut";
const defaultForm = {
bill_code: '',
stor_id: '',
stor_code: '',
stor_name: '',
bill_status: '10',
total_qty: '0',
detail_count: '0',
bill_type: '',
remark: '',
bill_code: "",
stor_id: "",
stor_code: "",
stor_name: "",
product_code:"A1",
bill_status: "10",
total_qty: "0",
detail_count: "0",
bill_type: "",
remark: "",
biz_date: new Date(),
out_stor_id: '',
create_mode: '',
out_stor_id: "",
create_mode: "",
tableData: []
}
};
export default {
name: 'AddDialog',
name: "AddDialog",
components: { AddDtl, MaterDialog },
mixins: [crud(), form(defaultForm)],
props: {
@@ -211,161 +312,182 @@ export default {
default: false
}
},
dicts: ['IO_BILL_STATUS', 'bill_type', 'product_area'],
dicts: ["IO_BILL_STATUS", "bill_type", "product_area"],
data() {
return {
dialogVisible: false,
dtlShow: false,
materType: '',
materType: "",
materShow: false,
flagnow: false,
nowrow: {},
nowindex: '',
nowindex: "",
storlist: [],
inStorList: [],
invtypelist: [],
storId: null,
rules: {
product_code: [
{ required: true, message: '生产区域不能为空', trigger: 'blur' }
{ required: true, message: "生产区域不能为空", trigger: "blur" }
],
bill_type: [
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
{ required: true, message: "业务类型不能为空", trigger: "blur" }
],
biz_date: [
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
{ required: true, message: "业务日期不能为空", trigger: "blur" }
]
}
}
};
},
watch: {
dialogShow: {
handler(newValue) {
this.dialogVisible = newValue
this.dialogVisible = newValue;
}
}
},
methods: {
open() {
crudSemiProductIn.queryStor().then(res => {
this.storlist = res
})
this.storlist = res;
});
},
close() {
this.$emit('AddChanged')
this.$emit("AddChanged");
},
[CRUD.HOOK.beforeSubmit]() {
if (this.form.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
this.crud.notify("请至少选择一条明细", CRUD.NOTIFICATION_TYPE.INFO);
return false;
}
},
[CRUD.HOOK.afterToEdit]() {
semiSemiProductOut.getOutBillDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
this.form.tableData = res
// 将明细变成不可编辑
/* for (let i = 0; i < this.form.tableData.length; i++) {
semiSemiProductOut
.getOutBillDtl({ iostorinv_id: this.form.iostorinv_id })
.then(res => {
this.form.tableData = res;
// 将明细变成不可编辑
/* for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i]
row.edit = false
this.form.tableData.splice(i, 1, row)
}*/
})
});
},
[CRUD.HOOK.afterToView]() {
semiSemiProductOut.getOutBillDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
this.form.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i]
row.edit = true
this.form.tableData.splice(i, 1, row)
}
})
semiSemiProductOut
.getOutBillDtl({ iostorinv_id: this.form.iostorinv_id })
.then(res => {
this.form.tableData = res;
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i];
row.edit = true;
this.form.tableData.splice(i, 1, row);
}
});
},
invtypeFormat(row, column) {
return this.dict.label.bill_type[row.source_bill_type]
return this.dict.label.bill_type[row.source_bill_type];
},
storChange(row) {
this.storlist.forEach((item) => {
this.storlist.forEach(item => {
if (item.product_code === row) {
this.form.product_code = item.product_code
this.form.product_code = item.product_code;
}
})
});
},
async queryMater(index, row) {
if (this.form.bill_type === '') {
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
return
if (this.form.bill_type === "") {
this.crud.notify("请选择业务类型", CRUD.NOTIFICATION_TYPE.INFO);
return;
}
this.materShow = true
this.nowindex = index
this.nowrow = row
this.materShow = true;
this.nowindex = index;
this.nowrow = row;
},
queryDtl(index, row) {
if (this.form.bill_type === '') {
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
return
if (this.form.bill_type === "") {
this.crud.notify("请选择业务类型", CRUD.NOTIFICATION_TYPE.INFO);
return;
}
if (this.form.product_code === '') {
this.crud.notify('请选择生产区域!', CRUD.NOTIFICATION_TYPE.INFO)
return
if (this.form.product_code === "") {
this.crud.notify("请选择生产区域", CRUD.NOTIFICATION_TYPE.INFO);
return;
}
this.storId = this.form.product_code
this.dtlShow = true
this.storId = this.form.product_code;
this.dtlShow = true;
},
tableChanged5(rows) {
rows.forEach((item) => {
debugger
rows.forEach(item => {
debugger;
if (this.form.tableData.length !== 0) {
this.flagnow = false
this.flagnow = false;
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].material_id === item.material_id && this.form.tableData[i].pcsn === item.pcsn) {
this.flagnow = true
if (
this.form.tableData[i].material_id === item.material_id &&
this.form.tableData[i].pcsn === item.pcsn
) {
this.flagnow = true;
}
}
if (!this.flagnow) {
item.edit = true
this.form.tableData.splice(-1, 0, item)
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
item.edit = true;
this.form.tableData.splice(-1, 0, item);
this.form.total_qty =
parseFloat(this.form.total_qty) + parseFloat(item.plan_qty);
}
} else {
item.edit = true
this.form.tableData.splice(-1, 0, item)
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
item.edit = true;
this.form.tableData.splice(-1, 0, item);
this.form.total_qty =
parseFloat(this.form.total_qty) + parseFloat(item.plan_qty);
}
})
this.form.detail_count = this.form.tableData.length
});
this.form.detail_count = this.form.tableData.length;
},
setMaterValue(row) {
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].material_id === row.material_id) {
this.crud.notify('不允许添加相同物料')
return false
this.crud.notify("不允许添加相同物料");
return false;
}
}
this.nowrow.material_id = row.material_id
this.nowrow.material_code = row.material_code
this.nowrow.material_name = row.material_name
this.nowrow.qty_unit_id = row.base_unit_id
this.nowrow.qty_unit_name = row.unit_name
this.nowrow.plan_qty = '1'
this.nowrow.edit = false
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
this.nowrow.material_id = row.material_id;
this.nowrow.material_code = row.material_code;
this.nowrow.material_name = row.material_name;
this.nowrow.qty_unit_id = row.base_unit_id;
this.nowrow.qty_unit_name = row.unit_name;
this.nowrow.plan_qty = "1";
this.nowrow.edit = false;
this.form.tableData.splice(this.nowindex, 1, this.nowrow); // 通过splice 替换数据 触发视图更新
},
async insertdtl() {
if (this.form.bill_type === '') {
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
return
if (this.form.bill_type === "") {
this.crud.notify("请选择业务类型", CRUD.NOTIFICATION_TYPE.INFO);
return;
}
this.form.tableData.push({ material_id: '', material_code: '', material_name: '', pcsn: '', quality_scode: '00', plan_qty: '1', qty_unit_name: '', qty_unit_id: '', remark: '', edit: false })
this.form.detail_count = this.form.tableData.length
this.form.tableData.push({
material_id: "",
material_code: "",
material_name: "",
pcsn: "",
quality_scode: "00",
plan_qty: "1",
qty_unit_name: "",
qty_unit_id: "",
remark: "",
edit: false
});
this.form.detail_count = this.form.tableData.length;
},
deleteRow(index, rows) {
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
rows.splice(index, 1)
this.form.total_qty =
parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty);
rows.splice(index, 1);
}
}
}
};
</script>
<style>
@@ -379,7 +501,7 @@ export default {
margin-left: auto;
padding: 4px 4px;
}
.input-with-select {
.input-with-select {
background-color: #fff;
}
</style>

View File

@@ -49,39 +49,74 @@
:data="crud.data"
style="width: 100%;"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
:header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="instorage_time" label="入库日期" :min-width="flexWidth('instorage_time',crud.data,'入库日期')" />
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_name',crud.data,'物料规格')" />
<el-table-column prop="struct_code" label="点位" :min-width="flexWidth('struct_name',crud.data,'点位')" />
<el-table-column prop="pcsn" label="订单号" :min-width="flexWidth('pcsn',crud.data,'订单号')" />
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="可用数" />
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" />
<el-table-column
prop="instorage_time"
label="入库日期"
:min-width="flexWidth('instorage_time', crud.data, '入库日期')"
/>
<el-table-column
prop="material_code"
label="物料编码"
:min-width="flexWidth('material_code', crud.data, '物料编码')"
/>
<el-table-column
prop="material_name"
label="物料名称"
:min-width="flexWidth('material_name', crud.data, '物料名称')"
/>
<el-table-column
prop="material_spec"
label="物料规格"
:min-width="flexWidth('material_name', crud.data, '物料规格')"
/>
<el-table-column
prop="struct_code"
label="点位"
:min-width="flexWidth('struct_name', crud.data, '点位')"
/>
<el-table-column
prop="pcsn"
label="订单号"
:min-width="flexWidth('pcsn', crud.data, '订单号')"
/>
<el-table-column
show-overflow-tooltip
prop="plan_qty"
:formatter="crud.formatNum3"
label="可用数"
/>
<el-table-column
show-overflow-tooltip
prop="qty_unit_name"
label="重量单位"
/>
</el-table>
<!--分页组件-->
<pagination />
<span slot="footer" class="dialog-footer">
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
<el-button slot="left" type="info" @click="dialogVisible = false"
>关闭</el-button
>
<el-button slot="left" type="primary" @click="submit">保存</el-button>
</span>
</el-dialog>
</template>
<script>
import CRUD, { header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import pagination from '@crud/Pagination'
import CRUD, { header, presenter } from "@crud/crud";
import rrOperation from "@crud/RR.operation";
import pagination from "@crud/Pagination";
export default {
name: 'AddDtl',
name: "AddDtl",
components: { rrOperation, pagination },
cruds() {
return CRUD({
title: '用户', url: 'api/productOut/addDtl',
title: "用户",
url: "api/semiProductOut/addDtl",
optShow: {
add: false,
edit: false,
@@ -89,10 +124,8 @@ export default {
reset: true,
download: false
},
query: {
}
})
query: {}
});
},
mixins: [presenter(), header()],
props: {
@@ -110,54 +143,53 @@ export default {
data() {
return {
dialogVisible: false,
opendtlParam: '',
opendtlParam: "",
rows: [],
openShow: true
}
};
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
this.dialogVisible = newValue;
}
},
openParam: {
handler(newValue, oldValue) {
this.opendtlParam = newValue
this.opendtlParam = newValue;
}
}
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.mater_type = this.opendtlParam
this.crud.query.stor_id = this.storId
this.crud.query.mater_type = this.opendtlParam;
this.crud.query.stor_id = this.storId;
if (this.openShow) {
this.openShow = false
return false
this.openShow = false;
return false;
} else {
return true
return true;
}
},
close() {
this.crud.resetQuery(false)
this.crud.resetQuery(false);
// 清空grid数据
this.crud.data = undefined
this.$emit('update:dialogShow', false)
this.crud.data = undefined;
this.$emit("update:dialogShow", false);
},
open() {
this.crud.query.mater_type = this.opendtlParam
this.crud.query.mater_type = this.opendtlParam;
},
submit() {
this.rows = this.$refs.multipleTable.selection
this.rows = this.$refs.multipleTable.selection;
if (this.rows.length <= 0) {
this.$message('请先勾选物料')
return
this.$message("请先勾选物料");
return;
}
this.crud.resetQuery(false)
this.$emit('update:dialogShow', false)
this.$emit('tableChanged', this.rows)
this.crud.resetQuery(false);
this.$emit("update:dialogShow", false);
this.$emit("tableChanged", this.rows);
}
}
}
};
</script>