add:入库单主表处理:自定义入库单字段处理
This commit is contained in:
367
wms_pro/qd/src/views/wms/stor_manage/in/index.vue
Normal file
367
wms_pro/qd/src/views/wms/stor_manage/in/index.vue
Normal file
@@ -0,0 +1,367 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div >
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="单据类型">
|
||||
<el-select
|
||||
v-model="query.bill_type"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
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="生成方式">
|
||||
<el-select
|
||||
v-model="query.bill_type"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
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="单据日期">
|
||||
<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>
|
||||
|
||||
<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IO_BILL_STATUS"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="入库单号">
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="单据号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="生产车间">
|
||||
<el-select
|
||||
v-model="query.product_area"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
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>
|
||||
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="dis_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="divOpen"
|
||||
>
|
||||
分配
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="task_flag"
|
||||
@click="taskOpen"
|
||||
>
|
||||
作业任务
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="confirm_flag"
|
||||
@click="confirm"
|
||||
>
|
||||
强制确认
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
size="mini"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="status" label="单据状态" />
|
||||
<el-table-column prop="product_area" label="生产车间" width="130" show-overflow-tooltip />
|
||||
<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 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" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="canUd(scope.row)"
|
||||
:disabled-dle="canUd(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<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" />-->
|
||||
<!-- <TaskDialog :dialog-show.sync="taskShow" :open-param="taskOpenParam" />-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import formstruc from '@/views/wms/config_manage/formStruc/formstruc'
|
||||
import crudProductIn from '@/views/wms/stor_manage/in/storinvin'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
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 DivDialog from '@/views/wms/storage_manage/product/productIn/DivDialog'
|
||||
// import ViewDialog from '@/views/wms/storage_manage/product/productIn/ViewDialog'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'ProductIn',
|
||||
components: { formstruc, crudProductIn, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '',
|
||||
optShow: { add: true, reset: true },
|
||||
idField: 'iostorinv_id',
|
||||
url: '/api/stIvtIostorinvIn',
|
||||
crudMethod: { ...crudProductIn },
|
||||
props: {
|
||||
size: 10
|
||||
}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_CP_IN_TYPE', 'product_area'],
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {},
|
||||
dis_flag: true,
|
||||
task_flag: true,
|
||||
confirm_flag: true,
|
||||
disShow: false,
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
divShow: false,
|
||||
openParam: [],
|
||||
taskOpenParam: [],
|
||||
currentRow: null,
|
||||
storlist: [],
|
||||
storId: null,
|
||||
taskShow: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'user'
|
||||
])
|
||||
},
|
||||
mounted: function() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
|
||||
// this.storlist = res.content
|
||||
// })
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
formstruc.getHeader('STOR_IN').then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
},
|
||||
fun(val) {
|
||||
return Number(val).toFixed(3)
|
||||
},
|
||||
canUd(row) {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
this.buttonChange(row)
|
||||
} else if (val.length === 1) {
|
||||
this.buttonChange(row)
|
||||
} else {
|
||||
this.handleCurrentChange(null)
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
buttonChange(currentRow) {
|
||||
if (currentRow !== null) {
|
||||
this.currentRow = currentRow
|
||||
if (currentRow.bill_status === '10' || currentRow.bill_status === '20' || currentRow.bill_status === '30') {
|
||||
this.dis_flag = false
|
||||
} else {
|
||||
this.dis_flag = true
|
||||
}
|
||||
if (currentRow.bill_status === '30' || currentRow.bill_status === '20') {
|
||||
this.confirm_flag = false
|
||||
} else {
|
||||
this.confirm_flag = true
|
||||
}
|
||||
if (currentRow.bill_status !== '99') {
|
||||
this.task_flag = false
|
||||
} else {
|
||||
this.task_flag = true
|
||||
}
|
||||
}
|
||||
},
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.dis_flag = true
|
||||
this.confirm_flag = true
|
||||
this.task_flag = true
|
||||
this.currentRow = {}
|
||||
}
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_INV_CP_IN_TYPE[row.bill_type]
|
||||
},
|
||||
toView(row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
confirm() {
|
||||
if (!this.currentRow) {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudProductIn.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
|
||||
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
||||
},
|
||||
divOpen() {
|
||||
crudProductIn.getIosInvDtl({ 'bill_code': this.currentRow.bill_code }).then(res => {
|
||||
this.openParam = res
|
||||
this.storId = this.currentRow.stor_id
|
||||
this.billType = this.currentRow.bill_type
|
||||
this.divShow = true
|
||||
})
|
||||
},
|
||||
taskOpen() {
|
||||
crudProductIn.getIosInvDtl({ 'bill_code': this.currentRow.bill_code }).then(res => {
|
||||
this.taskOpenParam = res
|
||||
})
|
||||
this.taskShow = true
|
||||
},
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
138
wms_pro/qd/src/views/wms/stor_manage/in/storinvin.js
Normal file
138
wms_pro/qd/src/views/wms/stor_manage/in/storinvin.js
Normal file
@@ -0,0 +1,138 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/productIn',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/productIn/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/productIn/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getIosInvDis(data) {
|
||||
return request({
|
||||
url: '/api/productIn/getIosInvDis',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function vehicleCheck() {
|
||||
return request({
|
||||
url: '/api/productIn/vehicleCheck',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function confirmvehicle(data) {
|
||||
return request({
|
||||
url: '/api/productIn/confirmvehicle',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSect(data) {
|
||||
return request({
|
||||
url: '/api/stIvtSectattr/getSect',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function divStruct(data) {
|
||||
return request({
|
||||
url: '/api/productIn/divStruct',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function unDivStruct(data) {
|
||||
return request({
|
||||
url: '/api/productIn/unDivStruct',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function setPoint(data) {
|
||||
return request({
|
||||
url: '/api/productIn/setPoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function confirm(data) {
|
||||
return request({
|
||||
url: '/api/productIn/confirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function cancelConfirmvehicle(data) {
|
||||
return request({
|
||||
url: '/api/productIn/cancelConfirmvehicle',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function delTask(data) {
|
||||
return request({
|
||||
url: '/api/productIn/delTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sendTask(data) {
|
||||
return request({
|
||||
url: '/api/productIn/sendTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function confirmTask(data) {
|
||||
return request({
|
||||
url: '/api/productIn/confirmTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
del,
|
||||
getIosInvDis,
|
||||
vehicleCheck,
|
||||
confirmvehicle,
|
||||
getSect,
|
||||
divStruct,
|
||||
unDivStruct,
|
||||
setPoint,
|
||||
confirm,
|
||||
cancelConfirmvehicle,
|
||||
delTask,
|
||||
sendTask,
|
||||
confirmTask
|
||||
}
|
||||
Reference in New Issue
Block a user