add:移库,拣选
This commit is contained in:
@@ -39,7 +39,7 @@ service.interceptors.response.use(
|
||||
const reader = new FileReader()
|
||||
reader.readAsText(error.response.data, 'utf-8')
|
||||
reader.onload = function(e) {
|
||||
const errorMsg = JSON.parse(reader.result).message
|
||||
const errorMsg = JSON.parse(reader.result).msg
|
||||
Notification.error({
|
||||
title: errorMsg,
|
||||
duration: 5000
|
||||
@@ -48,7 +48,7 @@ service.interceptors.response.use(
|
||||
} else {
|
||||
let code = 0
|
||||
try {
|
||||
code = error.response.data.status
|
||||
code = error.response.data.code
|
||||
} catch (e) {
|
||||
if (error.toString().indexOf('Error: timeout') !== -1) {
|
||||
Notification.error({
|
||||
@@ -69,7 +69,7 @@ service.interceptors.response.use(
|
||||
} else if (code === 403) {
|
||||
router.push({ path: '/401' })
|
||||
} else {
|
||||
const errorMsg = error.response.data.message
|
||||
const errorMsg = error.response.data.msg
|
||||
if (errorMsg !== undefined) {
|
||||
Notification.error({
|
||||
title: errorMsg,
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
<el-table-column prop="material_model" label="型号" />
|
||||
<el-table-column prop="class_code" label="分类编码" />
|
||||
<el-table-column prop="class_name" label="物料分类" />
|
||||
<el-table-column prop="single_weight" label="物料单重" />
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
min-width="100"
|
||||
|
||||
@@ -300,6 +300,12 @@ export default {
|
||||
this.form.form_param = JSON.stringify(this.form.form_param)
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
if (this.form.form_param){
|
||||
this.form.form_param = JSON.parse(this.form.form_param)
|
||||
}
|
||||
return true
|
||||
},
|
||||
getFormSelect() {
|
||||
formstruc.getTypes().then((res) => { // 获取分类名称,查询根据分类编码查找对应分支树
|
||||
this.form_types = res
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
v-model="query.strategy_name"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="起始载具号"
|
||||
placeholder="策略名称"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="crud.toEdit(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handdeleted(scope.row)">删除</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="crud.doDelete(scope.row)">删除</el-button>
|
||||
<el-dropdown trigger="click" size="mini">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
|
||||
@@ -285,9 +285,14 @@ export default {
|
||||
data.material_code = row.material_code
|
||||
data.material_id = row.material_id
|
||||
data.material_spec = row.material_spec
|
||||
data.single_weight = row.single_weight
|
||||
data.form_data = {}
|
||||
this.dtlCols.forEach(a=>{
|
||||
this.$set(data.form_data,a.value,null)
|
||||
let item = ''
|
||||
if (a.value in data) {
|
||||
item = data[a.value];
|
||||
}
|
||||
this.$set(data.form_data,a.value,item)
|
||||
})
|
||||
this.tableData.splice(-1, 0, data)
|
||||
})
|
||||
@@ -322,8 +327,10 @@ export default {
|
||||
data.source_form_type = row.form_type
|
||||
data.source_form_id = row.id
|
||||
data.unit_id = row.unit_id
|
||||
data.single_weight = row.single_weight
|
||||
data.form_data = {}
|
||||
let row_form_data = row.form_data;
|
||||
let fowFormData = row.form_data;
|
||||
let row_form_data = {...fowFormData,...data};
|
||||
this.dtlCols.forEach(a=>{
|
||||
let item = ''
|
||||
if (a.value in row_form_data) {
|
||||
|
||||
@@ -316,12 +316,17 @@ export default {
|
||||
data.material_code = row.material_code
|
||||
data.material_id = row.material_id
|
||||
data.material_spec = row.material_spec
|
||||
data.single_weight = row.single_weight
|
||||
data.source_form_type = ''
|
||||
data.source_form_id = ''
|
||||
data.unit_id = row.unit_id
|
||||
data.form_data = {}
|
||||
this.dtlCols.forEach(a=>{
|
||||
this.$set(data.form_data,a.value,'')
|
||||
let item = ''
|
||||
if (a.value in data) {
|
||||
item = data[a.value];
|
||||
}
|
||||
this.$set(data.form_data,a.value,item)
|
||||
})
|
||||
this.tableData.splice(-1, 0, data)
|
||||
})
|
||||
@@ -351,10 +356,12 @@ export default {
|
||||
data.material_id = row.material_id
|
||||
data.material_spec = row.material_spec
|
||||
data.source_form_type = row.form_type
|
||||
data.single_weight = row.single_weight
|
||||
data.source_form_id = row.id
|
||||
data.unit_id = row.unit_id
|
||||
data.form_data = {}
|
||||
let row_form_data = row.form_data;
|
||||
let fowFormData = row.form_data;
|
||||
let row_form_data = {...fowFormData,...data};
|
||||
this.dtlCols.forEach(a=>{
|
||||
let item = ''
|
||||
if (a.value in row_form_data) {
|
||||
|
||||
@@ -309,12 +309,17 @@ export default {
|
||||
data.material_code = row.material_code
|
||||
data.material_id = row.material_id
|
||||
data.material_spec = row.material_spec
|
||||
data.single_weight = row.single_weight
|
||||
data.source_form_type = ''
|
||||
data.source_form_id = ''
|
||||
data.unit_id = row.unit_id
|
||||
data.form_data = {}
|
||||
this.dtlCols.forEach(a=>{
|
||||
this.$set(data.form_data,a.value,'')
|
||||
let item = ''
|
||||
if (a.value in data) {
|
||||
item = data[a.value];
|
||||
}
|
||||
this.$set(data.form_data,a.value,item)
|
||||
})
|
||||
this.tableData.splice(-1, 0, data)
|
||||
})
|
||||
@@ -343,11 +348,13 @@ export default {
|
||||
data.material_code = row.material_code
|
||||
data.material_id = row.material_id
|
||||
data.material_spec = row.material_spec
|
||||
data.single_weight = row.single_weight
|
||||
data.source_form_type = row.form_type
|
||||
data.source_form_id = row.id
|
||||
data.unit_id = row.unit_id
|
||||
data.form_data = {}
|
||||
let row_form_data = row.form_data;
|
||||
let fowFormData = row.form_data;
|
||||
let row_form_data = {...fowFormData,...data};
|
||||
this.dtlCols.forEach(a=>{
|
||||
let item = ''
|
||||
if (a.value in row_form_data) {
|
||||
|
||||
@@ -0,0 +1,227 @@
|
||||
<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="仓库选择">
|
||||
<el-input
|
||||
v-model="this.storCode"
|
||||
clearable
|
||||
disabled
|
||||
size="mini"
|
||||
placeholder="仓位编码"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓位搜索">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="仓位编码"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料编码模糊查询"
|
||||
/>
|
||||
</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="sect_name" label="库区" show-overflow-tooltip />
|
||||
<el-table-column prop="stor_name" label="仓库" show-overflow-tooltip />
|
||||
<el-table-column prop="struct_code" label="仓位编码" show-overflow-tooltip />
|
||||
<el-table-column prop="struct_name" label="仓位名称" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicle_code" label="载具编码" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.vehicle_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_name" label="物料规格" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="物料规格" show-overflow-tooltip />
|
||||
<el-table-column prop="pcsn" label="批次" show-overflow-tooltip />
|
||||
<el-table-column prop="qty" label="数量" show-overflow-tooltip />
|
||||
<el-table-column prop="frozen_qty" label="冻结数量" show-overflow-tooltip />
|
||||
<el-table-column prop="unit_id" label="单位" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
{{ tableEnum.label.bm_measure_unit[scope.row.unit_id] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="is_used" label="是否启用" >
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.is_used"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lock_type" label="锁定类型" >
|
||||
<template slot-scope="scope">
|
||||
{{ statusEnum.label.LOCK[scope.row.lock_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="h" label="高度" />
|
||||
<el-table-column prop="l" label="长度" />
|
||||
<el-table-column prop="w" 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 crudStructAttr from './structattr'
|
||||
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'
|
||||
|
||||
export default {
|
||||
name: 'StructDtl',
|
||||
components: { rrOperation, pagination, Treeselect },
|
||||
cruds() {
|
||||
return CRUD({ title: '仓库信息', url: 'api/structattr', crudMethod: { ...crudStructAttr }, optShow:
|
||||
{
|
||||
}})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
tableEnums: [ 'bm_measure_unit#unit_name#unit_id' ],
|
||||
statusEnums: [ 'LOCK' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isSingle: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
storCode: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
has: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
}
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
classes: [],
|
||||
tableRadio: null,
|
||||
class_idStr: null,
|
||||
checkrow: null,
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.query.stor_code = this.storCode
|
||||
this.query.has = this.has
|
||||
this.crud.toQuery()
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.storCode){
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
clickChange(item) {
|
||||
this.tableRadio = item
|
||||
},
|
||||
toView(vehicle_code){
|
||||
|
||||
},
|
||||
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)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
115
wms_pro/qd/src/views/wms/stor_manage/storIvtInfo/structattr.js
Normal file
115
wms_pro/qd/src/views/wms/stor_manage/storIvtInfo/structattr.js
Normal file
@@ -0,0 +1,115 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getIosInvDtl(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/getIosInvDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getVehicleTask(data) {
|
||||
return request({
|
||||
url: '/api/schBaseTask/getVehicleTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function vehicleCheck() {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/vehicleCheck',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function inDecision(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/inDecision',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function confirm(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/confirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function cancelDecision(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/cancelDecision',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function taskOpen(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/taskOpen',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function delTask(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/delTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sendTask(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/sendTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function confirmTask(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/confirmTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
del,
|
||||
getVehicleTask,
|
||||
getIosInvDtl,
|
||||
vehicleCheck,
|
||||
inDecision,
|
||||
cancelDecision,
|
||||
taskOpen,
|
||||
confirm
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
<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="1600px"
|
||||
@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="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="code">
|
||||
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item :label="col.lable">
|
||||
<el-select v-if="col.value == 'stor_code'"
|
||||
v-model="form.form_data[col.value]"
|
||||
clearable
|
||||
class="filter-item"
|
||||
placeholder="所属仓库"
|
||||
@change="changeStor"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in tableEnum.st_ivt_bsrealstorattr"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-if="col.value != 'stor_code'" :label="col.lable" v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 150px" />
|
||||
</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" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<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>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableData"
|
||||
style="width: 100%;"
|
||||
border
|
||||
highlight-current-row
|
||||
:row-class-name="tableRowClassName"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@row-click="handleDtlCurrentChange"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库" />
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="载具编码" />
|
||||
<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="pcsn" label="批次" />
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="物料数量" />
|
||||
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" >
|
||||
<template slot-scope="scope">
|
||||
{{ tableEnum.label.bm_measure_unit[scope.row.unit_id] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" width="160">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].form_data[item.value]" disabled class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" width="160">
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].remark" 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, tableData)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<StructAttrDialog
|
||||
:dialog-show.sync="structShow"
|
||||
:is-single="false"
|
||||
:storCode="stor_code"
|
||||
:has=true
|
||||
@setMaterValue="tableDtlMaterial"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import StructAttrDialog from '@/views/wms/stor_manage/storIvtInfo/StructAttrDialog'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import crudCheck from '@/views/wms/stor_manage/warehouse/checkStorage/check'
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
code: '',
|
||||
form_type: '',
|
||||
status: '',
|
||||
product_area: '',
|
||||
source_form_type: '',
|
||||
source_form_id: '',
|
||||
source_form_date: '',
|
||||
create_name: '',
|
||||
create_time: '',
|
||||
update_name: '',
|
||||
update_time: '',
|
||||
remark: '',
|
||||
form_data: {},
|
||||
proc_inst_id:''
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { formstruc, StructAttrDialog },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
statusEnums: [ 'FORM_STATUS', 'IOBILL_TYPE_IN' ],
|
||||
tableEnums: [ 'st_ivt_bsrealstorattr#stor_name#stor_code','bm_measure_unit#unit_name#unit_id' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
dtlCols:[],
|
||||
tableData:[],
|
||||
structs:[],
|
||||
endStructs:[],
|
||||
currentIndex:null,
|
||||
dialogVisible: false,
|
||||
structShow: false,
|
||||
structShow2: false,
|
||||
dis_flag: true,
|
||||
stor_code: '',
|
||||
has: 'has',
|
||||
rules: {
|
||||
bill_type: [
|
||||
{ required: true, message: '单据类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.tableData = [],
|
||||
this.structs = [],
|
||||
this.endStructs = [],
|
||||
formstruc.getHeader('st_ivt_check').then(res => {
|
||||
this.cols = res
|
||||
this.form.form_type = 'st_ivt_check'
|
||||
res.forEach(a => {
|
||||
this.form.form_data[a.value,'']
|
||||
})
|
||||
})
|
||||
formstruc.getHeader('st_ivt_checkdtl').then(res => {
|
||||
this.dtlCols = res
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.tableData = [],
|
||||
this.structs = [],
|
||||
this.endStructs = [],
|
||||
this.crud.cancelCU()
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
changeStor(stor){
|
||||
this.stor_code = stor
|
||||
},
|
||||
|
||||
insertEvent(row) {
|
||||
this.structShow = true
|
||||
},
|
||||
endStruct(row) {
|
||||
this.structShow2 = true
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
if (current !== null) {
|
||||
this.currentIndex = current.index
|
||||
this.dis_flag = false
|
||||
} else {
|
||||
this.currentIndex = null
|
||||
this.dis_flag = true
|
||||
}
|
||||
},
|
||||
submitCU() {
|
||||
// 提交前校验
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
return true
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
if (this.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
this.form.item = this.tableData
|
||||
crudCheck.add(this.form).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.close()
|
||||
this.dialogVisible
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
|
||||
deleteRow(index, rows) {
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
|
||||
tableDtlMaterial(rows) {
|
||||
rows.forEach((row) => {
|
||||
if (this.structs.includes(row.struct_code)){
|
||||
return
|
||||
}
|
||||
const data = {}
|
||||
this.structs.push(row.struct_code)
|
||||
data.sect_name = row.sect_name
|
||||
data.sect_code = row.sect_code
|
||||
data.stor_code = row.stor_code
|
||||
data.stor_name = row.stor_name
|
||||
data.struct_code = row.struct_code
|
||||
data.vehicle_code = row.vehicle_code
|
||||
data.material_spec = row.material_spec
|
||||
data.material_name = row.material_name
|
||||
data.material_id = row.material_id
|
||||
data.pcsn = row.pcsn
|
||||
data.qty = row.qty
|
||||
data.unit_id = row.unit_id
|
||||
data.form_type = 'st_ivt_checkdtl'
|
||||
data.form_data = {}
|
||||
this.dtlCols.forEach(a=>{
|
||||
let item = ''
|
||||
if (a.value in data) {
|
||||
item = data[a.value];
|
||||
}
|
||||
this.$set(data.form_data,a.value,item)
|
||||
})
|
||||
this.tableData.splice(-1, 0, data)
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,352 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
title="盘点作业"
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@close="close"
|
||||
>
|
||||
|
||||
<el-row :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" type="primary" @click="savePickMst">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="closeDialog">关闭</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" size="mini" label-width="100px" label-suffix=":">
|
||||
<el-form-item label="单据编号" prop="code">
|
||||
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型" prop="form_type">
|
||||
<el-input v-model="form.form_type" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select
|
||||
v-model="form.status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 180px;"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.FORM_STATUS"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="form.status" disabled clearable style="width: 210px"/>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="create_time">
|
||||
<!-- <el-date-picker v-model="form.create_time" type="date" placeholder="选择日期" style="width: 210px"-->
|
||||
<!-- value-format="yyyy-MM-dd" :disabled="true"/>-->
|
||||
<el-input v-model="form.create_time" disabled 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 disabled v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">盘点明细</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="right"/>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
:disabled="dis_flag"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="saveCheck()"
|
||||
>
|
||||
盘点确认
|
||||
</el-button>
|
||||
</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 prop="form_type" label="单据类型" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="vehicle_code" label="载具编码" show-overflow-tooltip width="120"/>
|
||||
<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 prop="qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="unit_id" label="数量" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ tableEnum.label.bm_measure_unit[scope.row.unit_id] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="item in statusEnum.FORM_STATUS">
|
||||
<span v-if="item.value === scope.row.status">{{ item.label }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="160" show-overflow-tooltip v-for="(item, index) in dtlCols" :key="item.value"
|
||||
:label="item.lable">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-if="item.value == 'check_qty'" v-model="scope.row.form_data[item.value]" @input="qtyClick(scope.row)" class="input-with-select" />
|
||||
<el-select disabled v-if="item.value == 'profit_loss'"
|
||||
v-model="scope.row.form_data[item.value]"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="盘点结果"
|
||||
class="filter-item"
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in outboundList"
|
||||
:key="item.key"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-if="item.value != 'check_qty' && item.value != 'profit_loss'" v-model="scope.row.form_data[item.value]" disabled class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="create_time" label="创建时间"/>
|
||||
<el-table-column prop="proc_inst_id" label="流程编码" show-overflow-tooltip width="120"/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import crudFormData from "./formData";
|
||||
import crudChek from "./check";
|
||||
|
||||
|
||||
export default {
|
||||
name: 'TaskDialog',
|
||||
components: { },
|
||||
mixins: [crud()],
|
||||
statusEnums: [ 'IOBILL_TYPE_OUT','FORM_STATUS' ],
|
||||
tableEnums: [ 'st_ivt_bsrealstorattr#stor_name#stor_code','bm_measure_unit#unit_name#unit_id' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
storId: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
dis_flag: true,
|
||||
cols: [],
|
||||
dtlCols: [],
|
||||
unitDict: [],
|
||||
disCols: [],
|
||||
disFormData: [],
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
vehicledis: [],
|
||||
vehicleform:{},
|
||||
un_assign_qty:0,
|
||||
currentDtl: null,
|
||||
|
||||
outboundList:[
|
||||
{"label":"盘盈","value":"1"},{"label":"盘亏","value":"0"},{"label":"实盘","value":"2"}
|
||||
],
|
||||
form: {},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setForm(row) {
|
||||
this.dialogVisible = true
|
||||
this.form = row
|
||||
let dtl_form_type = this.form.children[0].form_type;
|
||||
formstruc.getHeader(this.form.form_type).then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
formstruc.getHeader(dtl_form_type).then(res => {
|
||||
this.dtlCols = res
|
||||
})
|
||||
this.queryTableDtl(row.id)
|
||||
},
|
||||
addPickTask(){
|
||||
let dis_assign_qty = 0;
|
||||
this.tabledis.forEach(a=>{
|
||||
dis_assign_qty = dis_assign_qty+a.qty
|
||||
})
|
||||
if (!this.currentDtl) {
|
||||
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
let dtl = {};
|
||||
dtl.material_id = this.currentDtl.material_id
|
||||
dtl.material_name = this.currentDtl.material_name
|
||||
dtl.material_spec = this.currentDtl.material_spec
|
||||
dtl.material_pcsn = this.currentDtl.material_pcsn
|
||||
dtl.qty = this.currentDtl.assign_qty-dis_assign_qty
|
||||
dtl.pcsn = this.currentDtl.pcsn
|
||||
dtl.unit_id = this.currentDtl.unit_id
|
||||
dtl.form_type = 'Picking_Task'
|
||||
dtl.source_form_type = this.currentDtl.source_form_type
|
||||
dtl.source_form_id = this.currentDtl.id
|
||||
dtl.source_form_date = this.currentDtl.create_time
|
||||
dtl.parent_id = this.currentDtl.id
|
||||
dtl.form_data = {}
|
||||
this.disFormData.forEach(a => {
|
||||
dtl.form_data[a.value,'']
|
||||
})
|
||||
this.tabledis.push(dtl)
|
||||
},
|
||||
subRow(index){
|
||||
this.tabledis.splice(this.tabledis.indexOf(index),1)
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
if (current !== null) {
|
||||
this.tabledis = []
|
||||
this.currentDtl = current
|
||||
this.dis_flag = false
|
||||
// this.queryTableDis()
|
||||
} else {
|
||||
this.dis_flag = true
|
||||
this.tabledis = []
|
||||
this.currentDtl = {}
|
||||
}
|
||||
},
|
||||
changeTaskType(index,taskType) {
|
||||
if (taskType == "13"){
|
||||
let dis_assign_qty = 0;
|
||||
this.tabledis.forEach(a=>{
|
||||
dis_assign_qty = dis_assign_qty+a.qty
|
||||
})
|
||||
this.tabledis[index].qty = this.currentDtl.qty-dis_assign_qty
|
||||
}
|
||||
},
|
||||
saveCheck() {
|
||||
crudChek.saveCheckTask(this.currentDtl).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.queryTableDtl(this.currentDtl.parent_id)
|
||||
})
|
||||
},
|
||||
|
||||
queryTableDtl(id) {
|
||||
crudFormData.getSonFormData(id).then(res => {
|
||||
this.tableDtl = res
|
||||
})
|
||||
},
|
||||
queryTableDis() {
|
||||
if (this.currentDtl !== null) {
|
||||
crudFormData.getSonFormData(this.currentDtl.id).then(res => {
|
||||
this.tabledis = res
|
||||
})
|
||||
}
|
||||
},
|
||||
closeDialog(){
|
||||
this.dialogVisible = false
|
||||
this.tabledis = []
|
||||
this.tableDtl = []
|
||||
},
|
||||
savePickMst(){
|
||||
crudChek.updateStatus({"status":"13","id":this.form.id})
|
||||
this.closeDialog()
|
||||
},
|
||||
close() {
|
||||
this.form.tableMater = []
|
||||
this.form.dtl_row = null
|
||||
this.form.bucketunique = null
|
||||
this.sectProp = null
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('AddChanged')
|
||||
this.crud.refresh()
|
||||
this.$refs['form2'].resetFields()
|
||||
},
|
||||
qtyClick(row){
|
||||
if (row.form_data.check_qty > row.qty){
|
||||
this.$set(row.form_data, 'profit_loss', '1')
|
||||
}
|
||||
if (row.form_data.check_qty < row.qty){
|
||||
this.$set(row.form_data, 'profit_loss', '0')
|
||||
}
|
||||
if (row.form_data.check_qty == row.qty){
|
||||
this.$set(row.form_data, 'profit_loss', '2')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</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-span {
|
||||
padding: 10px 0px 10px 0px;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-form {
|
||||
padding: 10px 0px 0px 20px;
|
||||
}
|
||||
.crud-opts-right2 {
|
||||
padding-left: 77%;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,300 @@
|
||||
<!--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="100px" label-suffix=":">
|
||||
<el-form-item label="单据编号" prop="code">
|
||||
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型" prop="form_type">
|
||||
<el-input v-model="form.form_type" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select
|
||||
v-model="form.status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 180px;"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.FORM_STATUS"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item :label="col.lable">
|
||||
<el-select v-if="col.value == 'stor_code'"
|
||||
v-model="form.form_data[col.value]"
|
||||
disabled
|
||||
class="filter-item"
|
||||
placeholder="所属仓库"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in tableEnum.st_ivt_bsrealstorattr"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input disabled v-if="col.value != 'stor_code'" :label="col.lable" v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="备注" prop="create_time">
|
||||
<el-input v-model="form.remark" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="create_time">
|
||||
<el-input v-model="form.create_time" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="create_time">
|
||||
<el-input v-model="form.create_name" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="修改时间" prop="create_time">
|
||||
<el-input v-model="form.create_time" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="修改人" prop="create_time">
|
||||
<el-input v-model="form.create_name" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程编码" prop="create_time">
|
||||
<el-input v-model="form.proc_inst_id" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
</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 prop="form_type" label="单据类型" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="vehicle_code" label="载具编码" show-overflow-tooltip width="120"/>
|
||||
<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 prop="qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="unit_id" label="数量" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ tableEnum.label.bm_measure_unit[scope.row.unit_id] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="item in statusEnum.FORM_STATUS">
|
||||
<span v-if="item.value === scope.row.status">{{ item.label }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="130" show-overflow-tooltip v-for="(item, index) in dtlCols" :key="item.value"
|
||||
:label="item.lable">
|
||||
<template slot-scope="scope">
|
||||
<spen v-if="item.value =='stor_code'">{{ tableEnum.label.st_ivt_bsrealstorattr[scope.row.form_data[item.value]]}}</spen>
|
||||
<spen v-if="item.value =='profit_loss'">{{ statusEnum.label.profit_loss[scope.row.form_data[item.value]]}}</spen>
|
||||
<spen v-if="item.value !='stor_code' && item.value !='profit_loss'">{{ scope.row.form_data[item.value] }}</spen>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间"/>
|
||||
<el-table-column prop="proc_inst_id" label="流程编码" show-overflow-tooltip width="120"/>
|
||||
</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="vehicle_code" label="载具编码" align="center" />
|
||||
<el-table-column prop="qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="frozen_qty" :formatter="crud.formatNum3" label="分配数量" align="center" />
|
||||
<el-table-column prop="point_code1" label="起始位置" align="center" width="120"/>
|
||||
<el-table-column prop="point_code2" label="目的位置" align="center" width="120"/>
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column prop="status" label="任务状态" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="item in statusEnum.FORM_STATUS">
|
||||
<span v-if="item.value === scope.row.status">{{ item.label }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="source_form_type" label="源单类型" align="center" width="150"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单id" align="center" width="150"/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {crud} from '@crud/crud'
|
||||
import crudFormData, {getSonFormData} from './formData'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import crudStructattr from '@/views/wms/stor_manage/storIvtInfo/structattr'
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog',
|
||||
components: {formstruc, crudStructattr},
|
||||
mixins: [crud()],
|
||||
statusEnums: ['FORM_STATUS','profit_loss'],
|
||||
tableEnums: [ 'bm_measure_unit#unit_name#unit_id','st_ivt_bsrealstorattr#stor_name#stor_code' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols: [],
|
||||
dtlCols: [],
|
||||
disCols: [],
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
disFormData: {},
|
||||
billtypelist: [],
|
||||
storlist: [],
|
||||
currentdtl: null,
|
||||
currentDis: {},
|
||||
form: {},
|
||||
PickTaskType:[
|
||||
{"label":"拣选回库","value":"13"},{"label":"拣选出库","value":"23"}
|
||||
],
|
||||
outboundList:[
|
||||
{"label":"一楼出库口","value":"1101"},{"label":"二楼出库口","value":"2114"}
|
||||
],
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue) {
|
||||
this.form = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
|
||||
},
|
||||
setForm(row) {
|
||||
this.dialogVisible = true
|
||||
this.form = row
|
||||
let dtl_form_type = this.form.children[0].form_type;
|
||||
formstruc.getHeader(this.form.form_type).then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
formstruc.getHeader(dtl_form_type).then(res => {
|
||||
this.dtlCols = res
|
||||
})
|
||||
// formstruc.getHeader("Picking_Task").then(res => {
|
||||
// this.disCols = res
|
||||
// res.forEach(a => {
|
||||
// this.disFormData[a.value,'']
|
||||
// })
|
||||
// }),
|
||||
this.queryTableDtl(row.id)
|
||||
},
|
||||
close() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
debugger
|
||||
if (current !== null) {
|
||||
this.currentdtl = current
|
||||
this.queryTableDis(this.currentdtl)
|
||||
} 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) {
|
||||
crudFormData.getSonFormData(id).then(res => {
|
||||
this.tableDtl = res
|
||||
})
|
||||
},
|
||||
queryTableDis(currentDtl) {
|
||||
crudStructattr.getVehicleTask({ 'vehicle_code': currentDtl.vehicle_code }).then(res => {
|
||||
this.tabledis = res
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -0,0 +1,51 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/check/save',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/check',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/check',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updateStatus(data) {
|
||||
return request({
|
||||
url: '/api/check/updateStatus',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function saveCheckTask(data) {
|
||||
return request({
|
||||
url: '/api/check/saveCheckTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function taskopen(data) {
|
||||
return request({
|
||||
url: '/api/check/taskOpen',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {add, edit, del, updateStatus, taskopen, saveCheckTask}
|
||||
@@ -0,0 +1,49 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/pmFormData',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/pmFormData',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/pmFormData',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getFormType() {
|
||||
return request({
|
||||
url: 'api/bmFormStruc/getTypes',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function getParentFormTypes() {
|
||||
return request({
|
||||
url: 'api/bmFormStruc/getParentFormTypes',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function getSonFormData(id) {
|
||||
return request({
|
||||
url: 'api/pmFormData/getSonFormData/' + id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export default {add, edit, del, getFormType, getParentFormTypes, getSonFormData}
|
||||
@@ -0,0 +1,292 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="单据类型">
|
||||
<el-select
|
||||
v-model="query.form_type"
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="请选择/搜索"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery()"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in fromTypes"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols" v-if="hideShowDialog">
|
||||
<el-form-item label="col.lable">
|
||||
<label slot="label">{{ col.lable }}:</label>
|
||||
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="dis_flag"
|
||||
@click="disOpen"
|
||||
>
|
||||
盘点
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="task_flag"
|
||||
@click="taskOpen"
|
||||
>
|
||||
作业下发
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
@select="handleSelectionChange"
|
||||
:data="crud.data"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="code" label="单据编码" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-link v-if="scope.row.hasChildren" type="warning" @click="toView(scope.row)">{{
|
||||
scope.row.code
|
||||
}}
|
||||
</el-link>
|
||||
<span v-else>{{ scope.row.code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="item in statusEnum.FORM_STATUS">
|
||||
<span v-if="item.value === scope.row.status">{{ item.label }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item, index) in cols" :key="item.value" :label="item.lable" >
|
||||
<template slot-scope="scope">
|
||||
<spen v-if="item.value =='stor_code'">{{ tableEnum.label.st_ivt_bsrealstorattr[scope.row.form_data[item.value]]}}</spen>
|
||||
<spen v-if="item.value !='stor_code'">{{scope.row.form_data[item.value]}}</spen>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-for="(item, index) in cols"
|
||||
:key="item.value"
|
||||
width="130"
|
||||
show-overflow-tooltip
|
||||
:label="item.lable"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="create_time" label="创建时间" />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="update_time" label="修改时间" />
|
||||
<el-table-column prop="create_name" label="修改人" />
|
||||
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
align="center"
|
||||
width="180"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="crud.toEdit(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="toDelete(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog ref="viewDialog" />
|
||||
<ViewDialog ref="viewDialog" />
|
||||
<TaskDialog ref="taskDis"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudFormData from './formData'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import AddDialog from './AddDialog'
|
||||
import crudCheck from './check'
|
||||
import ViewDialog from './ViewDialog'
|
||||
import TaskDialog from './TaskDialog'
|
||||
|
||||
|
||||
// import UploadDialog from './UploadDialog'
|
||||
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
code: null,
|
||||
proc_inst_id: null,
|
||||
biz_id: null,
|
||||
boz_code: null,
|
||||
biz_date: null,
|
||||
form_type: null,
|
||||
status: null,
|
||||
create_time: null,
|
||||
create_name: null,
|
||||
material_id: null,
|
||||
qty: null,
|
||||
pcsn: null,
|
||||
vehicle_code: null,
|
||||
from_data: null,
|
||||
parent_id: null
|
||||
}
|
||||
export default {
|
||||
name: 'FormData',
|
||||
statusEnums: ['FORM_STATUS'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, AddDialog ,ViewDialog, TaskDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
tableEnums: [ 'st_ivt_bsrealstorattr#stor_name#stor_code' ],
|
||||
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '盘点单',
|
||||
url: 'api/pmFormData',
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
crudMethod: { ...crudFormData },
|
||||
optShow: {
|
||||
add: true,
|
||||
reset: true
|
||||
},
|
||||
query: {
|
||||
form_type:'st_ivt_check',
|
||||
form_data: {}
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols: [],
|
||||
classes: [],
|
||||
task_flag: true,
|
||||
currentRow: null,
|
||||
uploadShow: false,
|
||||
dis_flag: true,
|
||||
fromTypes: [],
|
||||
permission: {},
|
||||
rules: {},
|
||||
hideShowDialog: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created() {
|
||||
// 获取分类
|
||||
formstruc.getHeader('st_ivt_check').then(res => {
|
||||
this.cols = res
|
||||
res.forEach(a => {
|
||||
this.form.form_data[a.value, '']
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
ToExpandall() {
|
||||
const els = document.getElementsByClassName('el-table__expand-icon')
|
||||
if (this.crud.data.length !== 0 && els.length !== 0) {
|
||||
for (let j1 = 0; j1 < els.length; j1++) {
|
||||
els[j1].classList.add('dafult')
|
||||
}
|
||||
if (this.$el.getElementsByClassName('el-table__expand-icon--expanded')) {
|
||||
const open = this.$el.getElementsByClassName('el-table__expand-icon--expanded')
|
||||
for (let j = 0; j < open.length; j++) {
|
||||
open[j].classList.remove('dafult')
|
||||
}
|
||||
const dafult = this.$el.getElementsByClassName('dafult')
|
||||
for (let a = 0; a < dafult.length; a++) {
|
||||
|
||||
dafult[a].click()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
hideShow() {
|
||||
if (this.hideShowDialog) {
|
||||
// this.$set(this.query, 'form_query', {})
|
||||
}
|
||||
this.hideShowDialog = !this.hideShowDialog
|
||||
},
|
||||
toView(row) {
|
||||
if (row !== null) {
|
||||
this.$refs.viewDialog.setForm(row)
|
||||
}
|
||||
},
|
||||
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length === 1) {
|
||||
if (row.status == '10'){
|
||||
this.task_flag = false
|
||||
}else {
|
||||
this.task_flag = true
|
||||
}
|
||||
this.dis_flag = false
|
||||
this.currentRow = row
|
||||
} else {
|
||||
this.task_flag = true
|
||||
this.dis_flag = true
|
||||
this.currentRow = null
|
||||
}
|
||||
},
|
||||
|
||||
disOpen(row) {
|
||||
if (this.currentRow !== null) {
|
||||
this.$refs.taskDis.setForm(this.currentRow)
|
||||
}
|
||||
},
|
||||
taskOpen(row) {
|
||||
if (this.currentRow !== null) {
|
||||
crudCheck.taskopen(this.currentRow).then(res => {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
},
|
||||
toDelete(id) {
|
||||
if (id !== null) {
|
||||
crudCheck.del([id]).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,349 @@
|
||||
<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="1600px"
|
||||
@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="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="code">
|
||||
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-form-item :label="col.lable">
|
||||
<el-select v-if="col.value == 'stor_code'"
|
||||
v-model="form.form_data[col.value]"
|
||||
clearable
|
||||
class="filter-item"
|
||||
placeholder="所属仓库"
|
||||
@change="changeStor"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in tableEnum.st_ivt_bsrealstorattr"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-if="col.value != 'stor_code'" :label="col.lable" v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 150px" />
|
||||
</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" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<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"
|
||||
:disabled="dis_flag"
|
||||
@click="endStruct()"
|
||||
>
|
||||
分配终点
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableData"
|
||||
style="width: 100%;"
|
||||
border
|
||||
highlight-current-row
|
||||
:row-class-name="tableRowClassName"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@row-click="handleDtlCurrentChange"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库" />
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="载具编码" />
|
||||
<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="pcsn" label="批次" />
|
||||
<el-table-column show-overflow-tooltip prop="qty" label="物料数量" />
|
||||
<el-table-column show-overflow-tooltip prop="unit_id" label="单位" >
|
||||
<template slot-scope="scope">
|
||||
{{ tableEnum.label.bm_measure_unit[scope.row.unit_id] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="(item, index) in dtlCols" :key="item.value" :label="item.lable" width="160">
|
||||
<!-- <el-table-column prop="vehicle_code" label="载具编码" show-overflow-tooltip>-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-link type="warning" @click="toView(scope.row)">{{ scope.row.vehicle_code }}</el-link>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].form_data[item.value]" class="input-with-select" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<template scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].remark" rows="2" type="textarea"/>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<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, tableData)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<StructAttrDialog
|
||||
:dialog-show.sync="structShow"
|
||||
:is-single="false"
|
||||
:storCode="stor_code"
|
||||
:has=true
|
||||
@setMaterValue="tableDtlMaterial"
|
||||
/>
|
||||
<StructAttrDialog2
|
||||
:dialog-show.sync="structShow2"
|
||||
:is-single="true"
|
||||
:storCode="stor_code"
|
||||
:has=false
|
||||
@setMaterValue="tableDtlMaterial2"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import StructAttrDialog from '@/views/wms/stor_manage/storIvtInfo/StructAttrDialog'
|
||||
import StructAttrDialog2 from '@/views/wms/stor_manage/storIvtInfo/StructAttrDialog'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import crudMove from '@/views/wms/stor_manage/warehouse/move/move'
|
||||
|
||||
const defaultForm = {
|
||||
id: '',
|
||||
code: '',
|
||||
form_type: '',
|
||||
status: '',
|
||||
product_area: '',
|
||||
source_form_type: '',
|
||||
source_form_id: '',
|
||||
source_form_date: '',
|
||||
create_name: '',
|
||||
create_time: '',
|
||||
update_name: '',
|
||||
update_time: '',
|
||||
remark: '',
|
||||
form_data: {},
|
||||
proc_inst_id:''
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { formstruc, StructAttrDialog, StructAttrDialog2 },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
statusEnums: [ 'FORM_STATUS', 'IOBILL_TYPE_IN' ],
|
||||
tableEnums: [ 'st_ivt_bsrealstorattr#stor_name#stor_code','bm_measure_unit#unit_name#unit_id' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
dtlCols:[],
|
||||
tableData:[],
|
||||
structs:[],
|
||||
endStructs:[],
|
||||
currentIndex:null,
|
||||
dialogVisible: false,
|
||||
structShow: false,
|
||||
structShow2: false,
|
||||
dis_flag: true,
|
||||
stor_code: '',
|
||||
has: 'has',
|
||||
rules: {
|
||||
bill_type: [
|
||||
{ required: true, message: '单据类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.tableData = [],
|
||||
this.structs = [],
|
||||
this.endStructs = [],
|
||||
formstruc.getHeader('st_ivt_move').then(res => {
|
||||
this.cols = res
|
||||
this.form.form_type = 'st_ivt_move'
|
||||
res.forEach(a => {
|
||||
this.form.form_data[a.value,'']
|
||||
})
|
||||
})
|
||||
formstruc.getHeader('st_ivt_movedtl').then(res => {
|
||||
this.dtlCols = res
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.tableData = [],
|
||||
this.structs = [],
|
||||
this.endStructs = [],
|
||||
this.crud.cancelCU()
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
changeStor(stor){
|
||||
this.stor_code = stor
|
||||
},
|
||||
|
||||
insertEvent(row) {
|
||||
this.structShow = true
|
||||
},
|
||||
endStruct(row) {
|
||||
this.structShow2 = true
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
if (current !== null) {
|
||||
this.currentIndex = current.index
|
||||
this.dis_flag = false
|
||||
} else {
|
||||
this.currentIndex = null
|
||||
this.dis_flag = true
|
||||
}
|
||||
},
|
||||
submitCU() {
|
||||
// 提交前校验
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
return true
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
if (this.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
this.form.item = this.tableData
|
||||
crudMove.add(this.form).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.close()
|
||||
this.dialogVisible
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
|
||||
deleteRow(index, rows) {
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
|
||||
tableDtlMaterial(rows) {
|
||||
rows.forEach((row) => {
|
||||
if (this.structs.includes(row.struct_code)){
|
||||
return
|
||||
}
|
||||
const data = {}
|
||||
this.structs.push(row.struct_code)
|
||||
data.sect_name = row.sect_name
|
||||
data.sect_code = row.sect_code
|
||||
data.stor_code = row.stor_code
|
||||
data.stor_name = row.stor_name
|
||||
data.start_struct_code = row.struct_code
|
||||
data.vehicle_code = row.vehicle_code
|
||||
data.material_spec = row.material_spec
|
||||
data.material_name = row.material_name
|
||||
data.material_id = row.material_id
|
||||
data.pcsn = row.pcsn
|
||||
data.qty = row.qty
|
||||
data.unit_id = row.unit_id
|
||||
data.form_type = 'st_ivt_movedtl'
|
||||
data.form_data = {}
|
||||
this.dtlCols.forEach(a=>{
|
||||
let item = ''
|
||||
if (a.value in data) {
|
||||
item = data[a.value];
|
||||
}
|
||||
this.$set(data.form_data,a.value,item)
|
||||
})
|
||||
this.tableData.splice(-1, 0, data)
|
||||
|
||||
})
|
||||
},
|
||||
tableDtlMaterial2(row) {
|
||||
if (this.endStructs.includes(row.struct_code)){
|
||||
this.crud.notify('当前目标货位已经分配,不允许选择相同货位', CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
return
|
||||
}
|
||||
if (this.currentIndex!=null){
|
||||
let end_struct_code =row.struct_code
|
||||
this.endStructs.push(end_struct_code)
|
||||
this.$set(this.tableData[this.currentIndex].form_data,"end_struct_code",end_struct_code)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,284 @@
|
||||
<!--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="100px" label-suffix=":">
|
||||
<el-form-item label="单据编号" prop="code">
|
||||
<el-input v-model="form.code" disabled placeholder="系统生成" clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型" prop="form_type">
|
||||
<el-input v-model="form.form_type" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select
|
||||
v-model="form.status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 180px;"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusEnum.FORM_STATUS"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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 disabled v-model="form.form_data[col.value]" :value="col.value" clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item label="备注" prop="create_time">
|
||||
<el-input v-model="form.remark" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="create_time">
|
||||
<el-input v-model="form.create_time" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="create_time">
|
||||
<el-input v-model="form.create_name" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="修改时间" prop="create_time">
|
||||
<el-input v-model="form.create_time" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="修改人" prop="create_time">
|
||||
<el-input v-model="form.create_name" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程编码" prop="create_time">
|
||||
<el-input v-model="form.proc_inst_id" disabled clearable style="width: 210px"/>
|
||||
</el-form-item>
|
||||
</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 prop="form_type" label="单据类型" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="vehicle_code" label="载具编码" show-overflow-tooltip width="120"/>
|
||||
<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 prop="qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="unit_id" label="数量" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ tableEnum.label.bm_measure_unit[scope.row.unit_id] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="item in statusEnum.FORM_STATUS">
|
||||
<span v-if="item.value === scope.row.status">{{ item.label }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="130" show-overflow-tooltip v-for="(item, index) in dtlCols" :key="item.value"
|
||||
:label="item.lable">
|
||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间"/>
|
||||
<el-table-column prop="proc_inst_id" label="流程编码" show-overflow-tooltip width="120"/>
|
||||
</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="vehicle_code" label="载具编码" align="center" />
|
||||
<el-table-column prop="qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="frozen_qty" :formatter="crud.formatNum3" label="分配数量" align="center" />
|
||||
<el-table-column prop="point_code1" label="起始位置" align="center" width="120"/>
|
||||
<el-table-column prop="point_code2" label="目的位置" align="center" width="120"/>
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column prop="status" label="任务状态" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="item in statusEnum.FORM_STATUS">
|
||||
<span v-if="item.value === scope.row.status">{{ item.label }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="source_form_type" label="源单类型" align="center" width="150"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单id" align="center" width="150"/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {crud} from '@crud/crud'
|
||||
import crudFormData, {getSonFormData} from './formData'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import crudStructattr from '@/views/wms/stor_manage/storIvtInfo/structattr'
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog',
|
||||
components: {formstruc, crudStructattr},
|
||||
mixins: [crud()],
|
||||
statusEnums: ['FORM_STATUS'],
|
||||
tableEnums: [ 'bm_measure_unit#unit_name#unit_id' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols: [],
|
||||
dtlCols: [],
|
||||
disCols: [],
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
disFormData: {},
|
||||
billtypelist: [],
|
||||
storlist: [],
|
||||
currentdtl: null,
|
||||
currentDis: {},
|
||||
form: {},
|
||||
PickTaskType:[
|
||||
{"label":"拣选回库","value":"13"},{"label":"拣选出库","value":"23"}
|
||||
],
|
||||
outboundList:[
|
||||
{"label":"一楼出库口","value":"1101"},{"label":"二楼出库口","value":"2114"}
|
||||
],
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue) {
|
||||
this.form = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
|
||||
},
|
||||
setForm(row) {
|
||||
this.dialogVisible = true
|
||||
this.form = row
|
||||
let dtl_form_type = this.form.children[0].form_type;
|
||||
formstruc.getHeader(this.form.form_type).then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
formstruc.getHeader(dtl_form_type).then(res => {
|
||||
this.dtlCols = res
|
||||
})
|
||||
// formstruc.getHeader("Picking_Task").then(res => {
|
||||
// this.disCols = res
|
||||
// res.forEach(a => {
|
||||
// this.disFormData[a.value,'']
|
||||
// })
|
||||
// }),
|
||||
this.queryTableDtl(row.id)
|
||||
},
|
||||
close() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
debugger
|
||||
if (current !== null) {
|
||||
this.currentdtl = current
|
||||
this.queryTableDis(this.currentdtl)
|
||||
} 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) {
|
||||
crudFormData.getSonFormData(id).then(res => {
|
||||
this.tableDtl = res
|
||||
})
|
||||
},
|
||||
queryTableDis(currentDtl) {
|
||||
crudStructattr.getVehicleTask({ 'vehicle_code': currentDtl.vehicle_code }).then(res => {
|
||||
this.tabledis = res
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -0,0 +1,49 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/pmFormData',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/pmFormData',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/pmFormData',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getFormType() {
|
||||
return request({
|
||||
url: 'api/bmFormStruc/getTypes',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function getParentFormTypes() {
|
||||
return request({
|
||||
url: 'api/bmFormStruc/getParentFormTypes',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function getSonFormData(id) {
|
||||
return request({
|
||||
url: 'api/pmFormData/getSonFormData/' + id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export default {add, edit, del, getFormType, getParentFormTypes, getSonFormData}
|
||||
271
wms_pro/qd/src/views/wms/stor_manage/warehouse/move/index.vue
Normal file
271
wms_pro/qd/src/views/wms/stor_manage/warehouse/move/index.vue
Normal file
@@ -0,0 +1,271 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="单据类型">
|
||||
<el-select
|
||||
v-model="query.form_type"
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="请选择/搜索"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery()"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in fromTypes"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<template v-for="(col,index) in cols" v-if="hideShowDialog">
|
||||
<el-form-item label="col.lable">
|
||||
<label slot="label">{{ col.lable }}:</label>
|
||||
<el-input v-model="query.form_query[col.value]" :value="col.value" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="task_flag"
|
||||
@click="taskOpen"
|
||||
>
|
||||
作业下发
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
@select="handleSelectionChange"
|
||||
:data="crud.data"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="code" label="单据编码" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-link v-if="scope.row.hasChildren" type="warning" @click="toView(scope.row)">{{
|
||||
scope.row.code
|
||||
}}
|
||||
</el-link>
|
||||
<span v-else>{{ scope.row.code }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120" />
|
||||
<el-table-column prop="status" label="单据状态" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="item in statusEnum.FORM_STATUS">
|
||||
<span v-if="item.value === scope.row.status">{{ item.label }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-for="(item, index) in cols"
|
||||
:key="item.value"
|
||||
width="130"
|
||||
show-overflow-tooltip
|
||||
:label="item.lable"
|
||||
>
|
||||
<template slot-scope="scope">{{ scope.row.form_data[item.value] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="create_time" label="创建时间" />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="update_time" label="修改时间" />
|
||||
<el-table-column prop="create_name" label="修改人" />
|
||||
<el-table-column prop="proc_inst_id" label="对应流程实例id" show-overflow-tooltip width="120" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
align="center"
|
||||
width="180"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="crud.toEdit(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="toDelete(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog ref="viewDialog" />
|
||||
<ViewDialog ref="viewDialog" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudFormData from './formData'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import AddDialog from './AddDialog'
|
||||
import crudmove from './move'
|
||||
import ViewDialog from './ViewDialog'
|
||||
|
||||
|
||||
// import UploadDialog from './UploadDialog'
|
||||
|
||||
const defaultForm = {
|
||||
id: null,
|
||||
code: null,
|
||||
proc_inst_id: null,
|
||||
biz_id: null,
|
||||
boz_code: null,
|
||||
biz_date: null,
|
||||
form_type: null,
|
||||
status: null,
|
||||
create_time: null,
|
||||
create_name: null,
|
||||
material_id: null,
|
||||
qty: null,
|
||||
pcsn: null,
|
||||
vehicle_code: null,
|
||||
from_data: null,
|
||||
parent_id: null
|
||||
}
|
||||
export default {
|
||||
name: 'FormData',
|
||||
statusEnums: ['FORM_STATUS'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, AddDialog ,ViewDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '移库单',
|
||||
url: 'api/pmFormData',
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
crudMethod: { ...crudFormData },
|
||||
optShow: {
|
||||
add: true,
|
||||
reset: true
|
||||
},
|
||||
query: {
|
||||
form_type:'st_ivt_move',
|
||||
form_data: {}
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols: [],
|
||||
classes: [],
|
||||
task_flag: true,
|
||||
currentRow: null,
|
||||
uploadShow: false,
|
||||
dis_flag: true,
|
||||
fromTypes: [],
|
||||
permission: {},
|
||||
rules: {},
|
||||
hideShowDialog: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created() {
|
||||
// 获取分类
|
||||
formstruc.getHeader('st_ivt_move').then(res => {
|
||||
this.cols = res
|
||||
res.forEach(a => {
|
||||
this.form.form_data[a.value, '']
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
ToExpandall() {
|
||||
const els = document.getElementsByClassName('el-table__expand-icon')
|
||||
if (this.crud.data.length !== 0 && els.length !== 0) {
|
||||
for (let j1 = 0; j1 < els.length; j1++) {
|
||||
els[j1].classList.add('dafult')
|
||||
}
|
||||
if (this.$el.getElementsByClassName('el-table__expand-icon--expanded')) {
|
||||
const open = this.$el.getElementsByClassName('el-table__expand-icon--expanded')
|
||||
for (let j = 0; j < open.length; j++) {
|
||||
open[j].classList.remove('dafult')
|
||||
}
|
||||
const dafult = this.$el.getElementsByClassName('dafult')
|
||||
for (let a = 0; a < dafult.length; a++) {
|
||||
|
||||
dafult[a].click()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
hideShow() {
|
||||
if (this.hideShowDialog) {
|
||||
// this.$set(this.query, 'form_query', {})
|
||||
}
|
||||
this.hideShowDialog = !this.hideShowDialog
|
||||
},
|
||||
toView(row) {
|
||||
if (row !== null) {
|
||||
this.$refs.viewDialog.setForm(row)
|
||||
}
|
||||
},
|
||||
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length === 1) {
|
||||
if (row.status == '10'){
|
||||
this.task_flag = false
|
||||
}else {
|
||||
this.task_flag = true
|
||||
}
|
||||
this.dis_flag = false
|
||||
this.currentRow = row
|
||||
} else {
|
||||
this.task_flag = true
|
||||
this.dis_flag = true
|
||||
this.currentRow = null
|
||||
}
|
||||
},
|
||||
|
||||
disOpen(row) {
|
||||
if (this.currentRow !== null) {
|
||||
this.$refs.taskDis.setForm(this.currentRow)
|
||||
}
|
||||
},
|
||||
taskOpen(row) {
|
||||
if (this.currentRow !== null) {
|
||||
crudmove.taskopen(this.currentRow).then(res => {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
},
|
||||
toDelete(id) {
|
||||
if (id !== null) {
|
||||
crudmove.del([id]).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
42
wms_pro/qd/src/views/wms/stor_manage/warehouse/move/move.js
Normal file
42
wms_pro/qd/src/views/wms/stor_manage/warehouse/move/move.js
Normal file
@@ -0,0 +1,42 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/move/save',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/move',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/move',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updateStatus(data) {
|
||||
return request({
|
||||
url: '/api/move/updateStatus',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function taskopen(data) {
|
||||
return request({
|
||||
url: '/api/move/taskOpen',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {add, edit, del, updateStatus, taskopen}
|
||||
@@ -92,8 +92,8 @@
|
||||
size="mini"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="handleDtlCurrentChange"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column prop="form_type" label="单据类型" show-overflow-tooltip width="120"/>
|
||||
<el-table-column prop="material_id" label="物料id" show-overflow-tooltip width="120"/>
|
||||
|
||||
Reference in New Issue
Block a user