add:入库明细新增
This commit is contained in:
218
wms_pro/qd/src/views/wms/base_manage/material/MaterDialog.vue
Normal file
218
wms_pro/qd/src/views/wms/base_manage/material/MaterDialog.vue
Normal file
@@ -0,0 +1,218 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="物料选择"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="物料类别">
|
||||
<treeselect
|
||||
v-model="query.material_type_id"
|
||||
:load-options="loadClass"
|
||||
:options="classes"
|
||||
style="width: 200px;"
|
||||
placeholder="选择物料类别"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="模糊搜索">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="编码、名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
size="mini"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="200" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="规格" show-overflow-tooltip />
|
||||
<el-table-column prop="material_model" label="型号" />
|
||||
<el-table-column prop="class_code" label="分类编码" />
|
||||
<el-table-column prop="class_name" label="物料分类" />
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
min-width="100"
|
||||
prop="product_series_name"
|
||||
label="系列"
|
||||
/>
|
||||
<el-table-column prop="unit_name" label="计量单位" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudMaterialbase from '@/views/wms/base_manage/material/material'
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudClassstandard from '@/views/wms/base_manage/class_standard/classstandard'
|
||||
|
||||
export default {
|
||||
name: 'MaterDtl',
|
||||
components: { rrOperation, pagination, Treeselect },
|
||||
cruds() {
|
||||
return CRUD({ title: '物料', url: 'api/bmMaterial', crudMethod: { ...crudMaterialbase }, optShow: {}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
dicts: ['product_series'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
materOptCode: {
|
||||
type: String,
|
||||
default: '00'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
classes: [],
|
||||
tableRadio: null,
|
||||
class_idStr: null,
|
||||
checkrow: null,
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
seriesFormat(row) {
|
||||
return this.dict.label.product_series[row.product_series]
|
||||
},
|
||||
open() {
|
||||
const param = {
|
||||
'materOpt_code': this.materOptCode
|
||||
}
|
||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||
this.class_idStr = res.class_idStr
|
||||
this.crud.query.class_idStr = res.class_idStr
|
||||
this.crud.toQuery()
|
||||
this.queryClassId()
|
||||
})
|
||||
},
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
}
|
||||
crudClassstandard.queryClassById(param).then(res => {
|
||||
this.classes = res.content.map(obj => {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (this.isSingle) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
} else {
|
||||
this.checkrow = row
|
||||
}
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
},
|
||||
close() {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
// 处理单选
|
||||
if (this.isSingle && this.tableRadio) {
|
||||
this.dialogVisible = false
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('setMaterValue', this.tableRadio)
|
||||
return
|
||||
}
|
||||
this.rows = this.$refs.table.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选物料')
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('setMaterValue', this.rows)
|
||||
},
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
480
wms_pro/qd/src/views/wms/stor_manage/in/AddDialog.vue
Normal file
480
wms_pro/qd/src/views/wms/stor_manage/in/AddDialog.vue
Normal file
@@ -0,0 +1,480 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="crud.status.title"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
width="1200px"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
</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>
|
||||
</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-item label="单据号" prop="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable 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="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="bill_type">
|
||||
<el-select
|
||||
v-model="form.bill_type"
|
||||
style="width: 210px"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="业务类型"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_CP_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="stor_id">
|
||||
<label slot="label">仓库</label>
|
||||
<el-select
|
||||
v-model="form.stor_id"
|
||||
clearable
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
:disabled="crud.status.view > 0"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</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>
|
||||
</el-form-item>
|
||||
<el-form-item label="总数量" prop="total_qty">
|
||||
<label slot="label">总 数 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="0"
|
||||
disabled
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item-->
|
||||
<!-- v-for="(col,index) in cols"-->
|
||||
<!-- :label="col.lable"-->
|
||||
<!-- :value="col.value"-->
|
||||
<!-- >-->
|
||||
<!-- <el-input v-model="col.value" clearable style="width: 210px" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{col.lable}}:</label>
|
||||
<el-input v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="insertEvent()"
|
||||
>
|
||||
添加物料
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="insertdtl()"
|
||||
>
|
||||
新增一行
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="form.tableData"
|
||||
style="width: 100%;"
|
||||
border
|
||||
: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="物料编码" 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-plus" @click="queryMater(scope.$index, scope.row)" />
|
||||
</el-input>
|
||||
<span v-show="scope.row.edit">{{ scope.row.material_code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="入库数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="form.tableData[scope.$index].qty"
|
||||
size="small"
|
||||
controls-position="right"
|
||||
precision="3"
|
||||
:min="0"
|
||||
@change="changeQty"
|
||||
/>
|
||||
<span v-show="scope.row.edit">{{ scope.row.qty }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="form.tableData[scope.$index].qty_unit_id"
|
||||
style="width: 210px"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单位"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_CP_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="quality_scode" label="品质">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="form.tableData[scope.$index].quality_scode"
|
||||
style="width: 210px"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="品质"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_CP_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="single_wt" label="单重" width="190" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="form.tableData[scope.$index].single_wt" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" width="190" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="form.tableData[scope.$index].pcsn" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="stor_code" label="仓库" width="190" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="form.tableData[scope.$index].stor_code" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="shipper" label="货主" width="190" align="center">
|
||||
<template scope="scope">
|
||||
<el-input v-model="form.tableData[scope.$index].shipper" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" 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)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<MaterDialog
|
||||
:dialog-show.sync="materShow"
|
||||
:is-single="false"
|
||||
:mater-opt-code="materType"
|
||||
@setMaterValue="tableDtlMaterial"
|
||||
/>
|
||||
|
||||
<AddDtl
|
||||
:dialog-show.sync="dtlShow"
|
||||
:is-single="false"
|
||||
@tableChanged="tableChanged2"
|
||||
/>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import crudProductIn from '@/views/wms/stor_manage/in/storinvin'
|
||||
import MaterDialog from '@/views/wms/base_manage/material/MaterDialog'
|
||||
import AddDtl from '@/views/wms/stor_manage/in/AddDtl'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
|
||||
// import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
|
||||
|
||||
const defaultForm = {
|
||||
bill_code: '',
|
||||
product_code: '',
|
||||
bill_status: '10',
|
||||
total_qty: '0',
|
||||
detail_count: '0',
|
||||
bill_type: '',
|
||||
remark: '',
|
||||
workshop_id: '',
|
||||
stor_id: '',
|
||||
biz_date: new Date(),
|
||||
create_mode: '',
|
||||
tableData: [],
|
||||
form_data: {}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { formstruc, MaterDialog, AddDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_CP_IN_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area', 'PCS_SAL_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
dtlShow: false,
|
||||
opendtlParam: null,
|
||||
materType: '03', // 关键成品
|
||||
storlist: [],
|
||||
billtypelist: [],
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
formstruc.getHeader('STOR_IN').then(res => {
|
||||
this.cols = res
|
||||
res.forEach(a => {
|
||||
this.form.form_data[a.value,'']
|
||||
})
|
||||
})
|
||||
// crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
|
||||
// this.storlist = res.content
|
||||
// })
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
// 获取入库单明细
|
||||
crudProductIn.getIosInvDtl({ '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]() {
|
||||
crudProductIn.getIosInvDtl({ '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 true
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
if (!row.qty) {
|
||||
this.crud.notify('数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
const material_code = rows[index].material_code
|
||||
let len = rows.length
|
||||
while (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].qty)
|
||||
rows.splice(index, 1)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
tableDtlMaterial(rows) {
|
||||
rows.forEach((row) => {
|
||||
const data = {}
|
||||
data.material_id = row.material_id
|
||||
data.material_code = row.material_code
|
||||
data.material_name = row.material_name
|
||||
data.material_spec = row.material_spec
|
||||
data.qty = row.sale_qty
|
||||
data.qty_unit_name = row.qty_unit_name
|
||||
data.qty_unit_id = row.qty_unit_id
|
||||
data.base_billdtl_id = row.sale_id
|
||||
data.base_bill_type = row.sale_type
|
||||
data.base_bill_code = row.sale_code
|
||||
data.base_bill_table = row.seq_no
|
||||
data.unit_weight = row.unit_weight
|
||||
data.edit = true
|
||||
this.form.tableData.splice(-1, 0, data)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(data.qty)
|
||||
})
|
||||
},
|
||||
tableChanged2(rows) {
|
||||
rows.forEach((row) => {
|
||||
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((item) => {
|
||||
if (item.base_bill_code === row.sale_code && item.base_bill_table === row.seq_no) {
|
||||
same_mater = false
|
||||
}
|
||||
})
|
||||
if (same_mater) {
|
||||
const data = {}
|
||||
data.material_id = row.material_id
|
||||
data.material_code = row.material_code
|
||||
data.material_name = row.material_name
|
||||
data.material_spec = row.material_spec
|
||||
data.qty = row.sale_qty
|
||||
data.qty_unit_name = row.qty_unit_name
|
||||
data.qty_unit_id = row.qty_unit_id
|
||||
data.base_billdtl_id = row.sale_id
|
||||
data.base_bill_type = row.sale_type
|
||||
data.base_bill_code = row.sale_code
|
||||
data.base_bill_table = row.seq_no
|
||||
data.unit_weight = row.unit_weight
|
||||
data.edit = true
|
||||
this.form.tableData.splice(-1, 0, data)
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(data.qty)
|
||||
}
|
||||
})
|
||||
},
|
||||
insertEvent(row) {
|
||||
this.materShow = true
|
||||
},
|
||||
queryMater(index, row) {
|
||||
this.nowindex = index
|
||||
this.nowrow = row
|
||||
this.materShow = true
|
||||
},
|
||||
insertdtl() {
|
||||
if (this.form.bill_type === '') {
|
||||
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.form.tableData.push({ edit: false, qty: '0' })
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
changeQty() {
|
||||
this.form.total_qty = 0
|
||||
this.form.tableData.forEach((item) => {
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.qty)
|
||||
})
|
||||
},
|
||||
formatBaseType(row) {
|
||||
return this.dict.label.PCS_SAL_TYPE[row.base_bill_type]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
203
wms_pro/qd/src/views/wms/stor_manage/in/AddDtl.vue
Normal file
203
wms_pro/qd/src/views/wms/stor_manage/in/AddDtl.vue
Normal file
@@ -0,0 +1,203 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="物料新增"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1200px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="销售单号">
|
||||
<el-input
|
||||
v-model="query.sale_code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="销售单号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="客户编码">
|
||||
<el-input
|
||||
v-model="query.cust_code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="客户编码"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!--
|
||||
<el-form-item label="创建日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation />
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
@select="handleSelectionChange"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="clickChange"
|
||||
>
|
||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sale_code" label="销售单号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="seq_no" label="行号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sale_type" label="销售单类型" :formatter="formterType" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" :formatter="formterStatus" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sale_qty" label="销售数量" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="cust_code" label="客户编码" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="cust_name" label="客户名称" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="product_qty" label="生产数量" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="qty_unit_name" label="单位" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="plandeliver_date" label="计划交期" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="create_name" label="创建人" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="create_time" label="创建时间" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import crudProductIn from '@/views/wms/stor_manage/in/storinvin'
|
||||
|
||||
const start = new Date()
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
dicts: ['PCS_SAL_TYPE', 'PCS_SALE_STATUS'],
|
||||
components: { crudOperation, rrOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '用户',
|
||||
url: '/api/mpsSaleOrder',
|
||||
crudMethod: {},
|
||||
optShow: {
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
opendtlParam: {
|
||||
type: Object
|
||||
},
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
rows: [],
|
||||
tableRadio: null,
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.crud.query.bill_type = '0001'
|
||||
return true
|
||||
},
|
||||
open() {
|
||||
this.query.status = '10'
|
||||
this.crud.toQuery()
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (this.isSingle) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
} else {
|
||||
this.checkrow = row
|
||||
}
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
// 处理单选
|
||||
if (this.isSingle && this.tableRadio) {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.tableRadio)
|
||||
return
|
||||
}
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先勾选物料')
|
||||
return
|
||||
}
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('tableChanged', this.rows)
|
||||
},
|
||||
formterType(row) {
|
||||
return this.dict.label.PCS_SAL_TYPE[row.sale_type]
|
||||
},
|
||||
formterStatus(row) {
|
||||
return this.dict.label.PCS_SALE_STATUS[row.status]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
294
wms_pro/qd/src/views/wms/stor_manage/in/ViewDialog.vue
Normal file
294
wms_pro/qd/src/views/wms/stor_manage/in/ViewDialog.vue
Normal file
@@ -0,0 +1,294 @@
|
||||
<!--suppress ALL -->
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
title="入库详情"
|
||||
:visible.sync="dialogVisible"
|
||||
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">单 据 号:</label>
|
||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓 库">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
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="业务类型">
|
||||
<el-select
|
||||
v-model="form.bill_type"
|
||||
style="width: 210px"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
:disabled="true"
|
||||
placeholder="业务类型"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_CP_IN_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>
|
||||
</el-form-item>
|
||||
<el-form-item label="总数量" prop="total_qty">
|
||||
<label slot="label">总 数 量:</label>
|
||||
<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-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="true" />
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item label="col.lable" prop="bill_code">
|
||||
<label slot="label">{{col.lable}}:</label>
|
||||
<el-input v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-form>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span2">入库明细</span>
|
||||
</div>
|
||||
<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-column type="index" label="序号" width="55" align="center" />
|
||||
<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" />
|
||||
<el-table-column prop="pcsn" label="批次" width="150" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_type" label="源单类型" :formatter="formatBaseType" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_code" label="源单号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_table" label="源单行号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">作业明细</span>
|
||||
</div>
|
||||
<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-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" />
|
||||
<el-table-column prop="pcsn" label="批次" align="center" width="150" />
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="bucketunique" label="箱号" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="数量 align="center" />
|
||||
<el-table-column prop="point_code1" label="起始位置" align="center" />
|
||||
<el-table-column prop="struct_code" label="目的位置" align="center" />
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column prop="task_status" label="任务状态" align="center" :formatter="formatStatus"/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { crud } from '@crud/crud'
|
||||
import crudProductIn from '@/views/wms/stor_manage/in/storinvin'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog',
|
||||
components: { formstruc },
|
||||
mixins: [crud()],
|
||||
dicts: ['ST_INV_CP_IN_TYPE', 'product_area', 'IO_BILL_STATUS', 'task_status', 'SCH_TASK_TYPE_DTL', 'PCS_SAL_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
billtypelist: [],
|
||||
storlist: [],
|
||||
currentdtl: null,
|
||||
currentDis: {},
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue) {
|
||||
this.form = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
formstruc.getHeader('STOR_IN').then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
},
|
||||
setForm(row) {
|
||||
this.dialogVisible = true
|
||||
this.form = row
|
||||
this.queryTableDtl(row.id)
|
||||
},
|
||||
close() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
||||
},
|
||||
taskdtl_typeFormat(row) {
|
||||
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
|
||||
},
|
||||
task_statusFormat(row) {
|
||||
return this.dict.label.task_status[row.task_status]
|
||||
},
|
||||
work_statusFormat(row) {
|
||||
return this.dict.label.work_status[row.work_status]
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
if (current !== null) {
|
||||
this.tabledis = []
|
||||
this.currentdtl = current
|
||||
this.queryTableDdis()
|
||||
} else {
|
||||
this.tabledis = []
|
||||
this.currentdtl = {}
|
||||
}
|
||||
},
|
||||
invtypeFormat(row, column) {
|
||||
for (const item of this.billtypelist) {
|
||||
if (item.code === row.source_bill_type) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
handleDisCurrentChange(current) {
|
||||
this.currentDis = current
|
||||
},
|
||||
queryTableDtl(id) {
|
||||
crudProductIn.getIosInvDtl(id).then(res => {
|
||||
this.tableDtl = res
|
||||
})
|
||||
},
|
||||
queryTableDdis() {
|
||||
if (this.currentdtl !== null) {
|
||||
crudProductIn.getIosInvDis({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
|
||||
this.tabledis = res
|
||||
}).catch(() => {
|
||||
this.tabledis = []
|
||||
})
|
||||
}
|
||||
},
|
||||
formatStatus(row) {
|
||||
return this.dict.label.task_status[row.task_status]
|
||||
},
|
||||
formatBaseType(row) {
|
||||
return this.dict.label.PCS_SAL_TYPE[row.base_bill_type]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size:20px;
|
||||
color:#303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span2 {
|
||||
padding: 0px 0px 20px 0px;
|
||||
}
|
||||
.crud-opts2 {
|
||||
padding: 10px 0px 0px 50px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -162,7 +162,7 @@
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="code" width="130" label="单据号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.code }}</el-link>
|
||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="status" label="单据状态" />
|
||||
@@ -170,9 +170,14 @@
|
||||
<el-table-column show-overflow-tooltip prop="form_type" min-width="120" label="单据类型" />
|
||||
<el-table-column show-overflow-tooltip prop="biz_code" label="仓库" min-width="120" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-table-column :prop="col.value" :label="col.lable" width="120px" show-overflow-tooltip />
|
||||
</template>
|
||||
|
||||
<el-table-column v-for="(item, index) in cols" :key="item.value" :label="item.lable" >
|
||||
<template slot-scope="scope">{{scope.row.form_data[item.value]}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <template v-for="(col,index) in cols">-->
|
||||
<!-- <el-table-column :prop="col.value" :label="col.lable" width="120px" show-overflow-tooltip />-->
|
||||
<!-- </template>-->
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="创建人" align="center" prop="create_id" />
|
||||
<el-table-column label="创建时间" align="center" prop="create_time" width="150" />
|
||||
@@ -190,9 +195,9 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<!-- <AddDialog @AddChanged="querytable" />-->
|
||||
<!-- <ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />-->
|
||||
<!-- <DivDialog :dialog-show.sync="divShow" :stor-id="storId" :open-param="openParam" @AddChanged="querytable" />-->
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog ref="itemview"/>
|
||||
<!-- <DivDialog :dialog-show.sync="divShow" :stor-id="storId" :open-param="openParam" @AddChanged="querytable" />-->
|
||||
<!-- <TaskDialog :dialog-show.sync="taskShow" :open-param="taskOpenParam" />-->
|
||||
</div>
|
||||
</template>
|
||||
@@ -205,14 +210,14 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
// import AddDialog from '@/views/wms/storage_manage/product/productIn/AddDialog'
|
||||
import AddDialog from '@/views/wms/stor_manage/in/AddDialog'
|
||||
// import DivDialog from '@/views/wms/storage_manage/product/productIn/DivDialog'
|
||||
// import ViewDialog from '@/views/wms/storage_manage/product/productIn/ViewDialog'
|
||||
import ViewDialog from '@/views/wms/stor_manage/in/ViewDialog'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'ProductIn',
|
||||
components: { formstruc, crudProductIn, crudOperation, rrOperation, udOperation, pagination },
|
||||
components: { AddDialog, ViewDialog, formstruc, crudProductIn, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '',
|
||||
@@ -323,8 +328,9 @@ export default {
|
||||
return this.dict.label.ST_INV_CP_IN_TYPE[row.bill_type]
|
||||
},
|
||||
toView(row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
if (row !== null) {
|
||||
this.$refs.itemview.setForm(row)
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
if (!this.currentRow) {
|
||||
|
||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/productIn',
|
||||
url: '/api/stIvtIostorinvIn',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function add(data) {
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/productIn/delete',
|
||||
url: '/api/stIvtIostorinvIn/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
@@ -18,15 +18,22 @@ export function del(ids) {
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/productIn/update',
|
||||
url: '/api/stIvtIostorinvIn/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getIosInvDtl(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinvIn/getIosInvDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getIosInvDis(data) {
|
||||
return request({
|
||||
url: '/api/productIn/getIosInvDis',
|
||||
url: '/api/stIvtIostorinvIn/getIosInvDis',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -34,14 +41,14 @@ export function getIosInvDis(data) {
|
||||
|
||||
export function vehicleCheck() {
|
||||
return request({
|
||||
url: '/api/productIn/vehicleCheck',
|
||||
url: '/api/stIvtIostorinvIn/vehicleCheck',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function confirmvehicle(data) {
|
||||
return request({
|
||||
url: '/api/productIn/confirmvehicle',
|
||||
url: '/api/stIvtIostorinvIn/confirmvehicle',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -57,7 +64,7 @@ export function getSect(data) {
|
||||
|
||||
export function divStruct(data) {
|
||||
return request({
|
||||
url: '/api/productIn/divStruct',
|
||||
url: '/api/stIvtIostorinvIn/divStruct',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -65,7 +72,7 @@ export function divStruct(data) {
|
||||
|
||||
export function unDivStruct(data) {
|
||||
return request({
|
||||
url: '/api/productIn/unDivStruct',
|
||||
url: '/api/stIvtIostorinvIn/unDivStruct',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -73,7 +80,7 @@ export function unDivStruct(data) {
|
||||
|
||||
export function setPoint(data) {
|
||||
return request({
|
||||
url: '/api/productIn/setPoint',
|
||||
url: '/api/stIvtIostorinvIn/setPoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -81,7 +88,7 @@ export function setPoint(data) {
|
||||
|
||||
export function confirm(data) {
|
||||
return request({
|
||||
url: '/api/productIn/confirm',
|
||||
url: '/api/stIvtIostorinvIn/confirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -89,7 +96,7 @@ export function confirm(data) {
|
||||
|
||||
export function cancelConfirmvehicle(data) {
|
||||
return request({
|
||||
url: '/api/productIn/cancelConfirmvehicle',
|
||||
url: '/api/stIvtIostorinvIn/cancelConfirmvehicle',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -97,7 +104,7 @@ export function cancelConfirmvehicle(data) {
|
||||
|
||||
export function delTask(data) {
|
||||
return request({
|
||||
url: '/api/productIn/delTask',
|
||||
url: '/api/stIvtIostorinvIn/delTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -105,7 +112,7 @@ export function delTask(data) {
|
||||
|
||||
export function sendTask(data) {
|
||||
return request({
|
||||
url: '/api/productIn/sendTask',
|
||||
url: '/api/stIvtIostorinvIn/sendTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -113,7 +120,7 @@ export function sendTask(data) {
|
||||
|
||||
export function confirmTask(data) {
|
||||
return request({
|
||||
url: '/api/productIn/confirmTask',
|
||||
url: '/api/stIvtIostorinvIn/confirmTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -124,6 +131,7 @@ export default {
|
||||
edit,
|
||||
del,
|
||||
getIosInvDis,
|
||||
getIosInvDtl,
|
||||
vehicleCheck,
|
||||
confirmvehicle,
|
||||
getSect,
|
||||
|
||||
Reference in New Issue
Block a user