Merge branch 'master' of http://121.40.234.130:8899/root/hl_one
# Conflicts: # mes/hd/nladmin-system/src/main/java/org/nl/wms/mps_manage/ordermanage/controller/saleOrder/MpsSaleOrderController.java # mes/hd/nladmin-system/src/main/java/org/nl/wms/mps_manage/ordermanage/service/saleOrder/IMpsSaleOrderService.java # mes/hd/nladmin-system/src/main/java/org/nl/wms/mps_manage/ordermanage/service/saleOrder/dao/mapper/MpsSaleOrderMapper.java # mes/hd/nladmin-system/src/main/java/org/nl/wms/mps_manage/ordermanage/service/saleOrder/dao/mapper/xml/MpsSaleOrderMapper.xml # mes/hd/nladmin-system/src/main/java/org/nl/wms/mps_manage/ordermanage/service/saleOrder/impl/MpsSaleOrderServiceImpl.java # mes/hd/nladmin-system/src/main/java/org/nl/wms/storage_manage/productmanage/controller/iostorInv/IStivtlostorivnCpOutController.java # mes/hd/nladmin-system/src/main/java/org/nl/wms/storage_manage/productmanage/service/iostorInv/IStIvtIostorinvCpOutService.java # mes/hd/nladmin-system/src/main/java/org/nl/wms/storage_manage/productmanage/service/iostorInv/impl/StIvtIostorinvCpOutServiceImpl.java # mes/hd/nladmin-system/src/main/java/org/nl/wms/storage_manage/productmanage/service/structIvt/IStIvtStructivtCpService.java # mes/hd/nladmin-system/src/main/java/org/nl/wms/storage_manage/productmanage/service/structIvt/impl/StIvtStructivtCpServiceImpl.java # mes/hd/nladmin-system/src/main/java/org/nl/wms/storage_manage/productmanage/util/ChangeIvtUtil.java # mes/qd/src/views/wms/storage_manage/product/productIn/AddDtl.vue # mes/qd/src/views/wms/storage_manage/product/productOut/AddDialog.vue # mes/qd/src/views/wms/storage_manage/product/productOut/DivDialog.vue # mes/qd/src/views/wms/storage_manage/product/productOut/productout.js
This commit is contained in:
@@ -62,6 +62,28 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车间" prop="workshop_id">
|
||||
<label slot="label">车间</label>
|
||||
<el-select
|
||||
v-model="form.workshop_id"
|
||||
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>
|
||||
<el-form-item label="仓位" prop="struct_id">
|
||||
<label slot="label">仓位:</label>
|
||||
<el-input v-model="form.struct_id" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="bill_status">
|
||||
<el-select
|
||||
v-model="form.bill_status"
|
||||
@@ -204,7 +226,7 @@ import CRUD, { crud, form } from '@crud/crud'
|
||||
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import AddDtl from '@/views/wms/storage_manage/product/productIn/AddDtl'
|
||||
import crudStorattr, {getStor} from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import crudStorattr from "@/api/wms/basedata/st/storattr"
|
||||
|
||||
const defaultForm = {
|
||||
bill_code: '',
|
||||
@@ -266,7 +288,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
|
||||
crudStorattr.queryStor().then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
|
||||
@@ -208,18 +208,6 @@
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column align="center" label="操作" width="170" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
:disabled="disabledIos(scope.row)"
|
||||
icon="el-icon-delete"
|
||||
@click.native.prevent="deleteRow(scope.$index, form.tableMater)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
@@ -297,14 +285,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
disabledIos(row) {
|
||||
debugger
|
||||
if (row.iostorinvdis_id === undefined) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
open() {
|
||||
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
this.sects = res.content
|
||||
@@ -401,9 +381,6 @@ export default {
|
||||
this.form.tableMater.splice(-1, 0, item)
|
||||
}
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
},
|
||||
@@ -464,14 +441,9 @@ export default {
|
||||
return
|
||||
}
|
||||
crudProductIn.confirmvehicle(this.form).then(res => {
|
||||
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => {
|
||||
this.form.vehicle_code = ''
|
||||
this.form.bucketunique = ''
|
||||
this.openParam = res
|
||||
this.form.tableMater = []
|
||||
this.dis_row = null
|
||||
this.crud.notify('组盘成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
this.crud.notify('组盘成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.form.vehicle_code = ''
|
||||
this.form.bucketunique = ''
|
||||
})
|
||||
|
||||
},
|
||||
@@ -515,6 +487,25 @@ export default {
|
||||
row.qty = row.storage_qty
|
||||
this.bucketuniqueObj = row
|
||||
},
|
||||
divPoint() {
|
||||
if (!this.form.point_code) {
|
||||
this.crud.notify('请选择入库点', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.form.tableMater.length === 0) {
|
||||
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudProductIn.divPoint(this.form).then(res => {
|
||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
crudProductIn.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.crud.notify('设置起点成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
},
|
||||
divStruct() {
|
||||
if (this.dis_row === null) {
|
||||
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
@@ -528,16 +519,17 @@ export default {
|
||||
if (this.form.checked) {
|
||||
this.divBtn = true
|
||||
|
||||
debugger
|
||||
this.dis_row.stor_id = this.stor_id
|
||||
this.dis_row.sect_id = this.sect_id
|
||||
crudProductIn.divStruct(this.dis_row).then(res => {
|
||||
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.dis_row.iostorinv_id }).then(res => {
|
||||
/* crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
|
||||
this.openParam = res
|
||||
this.form.tableMater = []
|
||||
this.dis_row = null
|
||||
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
crudProductIn.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.divBtn = false
|
||||
this.crud.notify('分配货位成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})*/
|
||||
}).finally(() => {
|
||||
this.divBtn = false
|
||||
})
|
||||
@@ -547,36 +539,23 @@ export default {
|
||||
}
|
||||
},
|
||||
unDivStruct() {
|
||||
if (this.dis_row === null) {
|
||||
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
if (this.form.tableMater.length <= 0) {
|
||||
this.crud.notify('不存在载具明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
|
||||
crudProductIn.unDivStruct(this.dis_row).then(res => {
|
||||
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.dis_row.iostorinv_id }).then(res => {
|
||||
const flag = this.form.tableMater.some(mater => !mater.struct_code)
|
||||
if (flag) {
|
||||
this.crud.notify('明细存在未分配货位!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// 如果勾选了,直接跳后台
|
||||
crudProductIn.unDivStruct(this.form).then(res => {
|
||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
|
||||
this.openParam = res
|
||||
this.form.tableMater = []
|
||||
this.dis_row = null
|
||||
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
},
|
||||
divPoint() {
|
||||
if (!this.form.point_code) {
|
||||
this.crud.notify('请选择入库点', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.dis_row === null) {
|
||||
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.dis_row.point_code = this.form.point_code
|
||||
crudProductIn.setPoint(this.dis_row).then(res => {
|
||||
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.dis_row.iostorinv_id }).then(res => {
|
||||
this.openParam = res
|
||||
this.form.tableMater = []
|
||||
this.dis_row = null
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
crudProductIn.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -235,13 +235,13 @@ export default {
|
||||
this.currentDis = current
|
||||
},
|
||||
queryTableDtl() {
|
||||
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||
crudProductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||
this.tableDtl = res
|
||||
})
|
||||
},
|
||||
queryTableDdis() {
|
||||
if (this.currentdtl !== null) {
|
||||
crudProductIn.getIosInvDis({ "iostorinvdtl_id": this.currentdtl.iostorinvdtl_id }).then(res => {
|
||||
crudProductIn.getDisTask({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
|
||||
this.tabledis = res
|
||||
}).catch(() => {
|
||||
this.tabledis = []
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
>
|
||||
分配
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
@@ -151,7 +151,7 @@
|
||||
@click="divOpen"
|
||||
>
|
||||
作业任务
|
||||
</el-button>-->
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -186,7 +186,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" label="单据类型" :formatter="bill_typeFormat" />
|
||||
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库" min-width="120"/>
|
||||
<!-- <el-table-column prop="" label="生产车间" width="130" show-overflow-tooltip />-->
|
||||
<el-table-column prop="" label="生产车间" width="130" show-overflow-tooltip />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
|
||||
<el-table-column label="总重量" align="center" prop="total_qty">
|
||||
<template slot-scope="scope">
|
||||
@@ -235,7 +235,7 @@ import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
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 crudStorattr, {getStor} from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import crudStorattr from '@/api/wms/basedata/st/storattr'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -281,7 +281,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
|
||||
crudStorattr.queryStor().then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
@@ -341,7 +341,7 @@ export default {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudProductIn.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
|
||||
crudProductIn.confirm(this.currentRow).then(res => {
|
||||
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
|
||||
@@ -66,31 +66,7 @@ export function getSect(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',
|
||||
url: '/api/stIvtSectattr/divStruct',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@@ -105,8 +81,5 @@ export default {
|
||||
vehicleCheck,
|
||||
confirmvehicle,
|
||||
getSect,
|
||||
divStruct,
|
||||
unDivStruct,
|
||||
setPoint,
|
||||
confirm
|
||||
divStruct
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!--suppress ALL -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
@@ -127,32 +128,6 @@
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" label="单据类型" :formatter="bill_typeFormat" />
|
||||
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库" min-width="120"/>
|
||||
<!-- <el-table-column prop="" label="生产车间" width="130" show-overflow-tooltip />-->
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
|
||||
<el-table-column label="总重量" align="center" prop="total_qty">
|
||||
<template slot-scope="scope">
|
||||
{{ fun(scope.row.total_qty) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="明细数" align="center" prop="detail_count" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="创建人" align="center" prop="create_name" />
|
||||
<el-table-column label="创建时间" align="center" prop="create_time" width="150" />
|
||||
<el-table-column label="修改人" align="center" prop="update_name" />
|
||||
<el-table-column label="修改时间" align="center" prop="update_time" width="150" />
|
||||
<el-table-column label="分配人" align="center" prop="dis_name" width="140px" />
|
||||
<el-table-column label="分配时间" align="center" prop="dis_time" width="150" />
|
||||
<el-table-column label="确认人" align="center" prop="confirm_name" width="150" />
|
||||
<el-table-column label="确认时间" align="center" prop="confirm_time" width="150" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
@@ -163,6 +138,27 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="80" prop="bill_status" label="单据状态" />
|
||||
<el-table-column show-overflow-tooltip prop="product_code" label="生产车间" width="80" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" label="业务类型" />
|
||||
<el-table-column show-overflow-tooltip width="100" prop="biz_date" label="业务日期" />
|
||||
<el-table-column show-overflow-tooltip label="明细数" align="center" prop="detail_count" width="60" />
|
||||
<el-table-column show-overflow-tooltip label="总重量" align="center" prop="total_qty" width="100" />
|
||||
<el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="100" />
|
||||
<el-table-column show-overflow-tooltip label="制单人" align="center" prop="create_name" />
|
||||
<el-table-column show-overflow-tooltip label="制单时间" align="center" prop="create_time" width="140" />
|
||||
<el-table-column show-overflow-tooltip label="修改人" align="center" prop="create_name" />
|
||||
<el-table-column show-overflow-tooltip label="修改时间" align="center" prop="update_time" width="140" />
|
||||
<el-table-column show-overflow-tooltip label="分配人" align="center" prop="dis_name" />
|
||||
<el-table-column show-overflow-tooltip label="分配时间" align="center" prop="dis_time" width="140" />
|
||||
<el-table-column show-overflow-tooltip label="确认人" align="center" prop="confirm_name" />
|
||||
<el-table-column show-overflow-tooltip label="确认时间" align="center" prop="confirm_time" width="140" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -183,7 +179,7 @@ import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/storage_manage/product/productOut/AddDialog'
|
||||
import DivDialog from '@/views/wms/storage_manage/product/productOut/DivDialog'
|
||||
import ViewDialog from '@//views/wms/storage_manage/product/productOut/ViewDialog'
|
||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
|
||||
|
||||
export default {
|
||||
name: 'ProductOut',
|
||||
@@ -234,14 +230,11 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
|
||||
this.storlist = res.content
|
||||
crudProductIn.queryStor().then(res => {
|
||||
this.storlist = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
fun(val) {
|
||||
return Number(val).toFixed(3)
|
||||
},
|
||||
canUd(row) {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
@@ -300,9 +293,9 @@ export default {
|
||||
return row.bill_status !== '99'
|
||||
},
|
||||
divOpen() {
|
||||
productOut.getIosInvDtl({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
|
||||
productOut.getOutBillDtl({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
|
||||
this.openParam = res
|
||||
this.storId = this.currentRow.stor_id
|
||||
this.storId = this.currentRow.product_code
|
||||
this.divShow = true
|
||||
this.mstrow = this.currentRow
|
||||
})
|
||||
|
||||
@@ -216,7 +216,7 @@ import AddDialog from '@/views/wms/storage_manage/rawproduct/rawProductIn/AddDia
|
||||
import DivDialog from '@/views/wms/storage_manage/rawproduct/rawProductIn/DivDialog'
|
||||
import ViewDialog from '@/views/wms/storage_manage/rawproduct/rawProductIn/ViewDialog'
|
||||
import {mapGetters} from 'vuex'
|
||||
import crudStorattr from "@/views/wms/storage_manage/basedata/basedata";
|
||||
import crudStorattr from "@/api/wms/basedata/st/storattr";
|
||||
|
||||
export default {
|
||||
name: 'RawProductIn',
|
||||
@@ -262,7 +262,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudStorattr.getStor({"stor_type": "3"}).then(res => {
|
||||
crudStorattr.queryStor({"stor_type": "3"}).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
|
||||
@@ -223,10 +223,10 @@
|
||||
import CRUD, {crud, form} from '@crud/crud'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import BillDtl from '@/views/wms/storage_manage/rawproduct/rawProductIn/AddDtl'
|
||||
import crudStorattr from "@/api/wms/basedata/st/storattr";
|
||||
import crudProductOut from '@/views/wms/storage_manage/rawproduct/rawProductOut/rawproductout'
|
||||
import crudStructattr from "@/api/wms/basedata/st/structattr";
|
||||
import StructIvt from "@/views/wms/storage_manage/rawproduct/rawProductOut/StructIvt";
|
||||
import crudStorattr from "@/views/wms/storage_manage/basedata/basedata";
|
||||
|
||||
const defaultForm = {
|
||||
bill_code: '',
|
||||
@@ -293,7 +293,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudStorattr.getStor({"stor_type": "3"}).then(res => {
|
||||
crudStorattr.queryStor({"stor_type": "3"}).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
|
||||
@@ -216,7 +216,7 @@ import AddDialog from '@/views/wms/storage_manage/rawproduct/rawProductOut/AddDi
|
||||
import DivDialog from '@/views/wms/storage_manage/rawproduct/rawProductOut/DivDialog'
|
||||
import ViewDialog from '@/views/wms/storage_manage/rawproduct/rawProductOut/ViewDialog'
|
||||
import {mapGetters} from 'vuex'
|
||||
import crudStorattr from "@/views/wms/storage_manage/basedata/basedata";
|
||||
import crudStorattr from "@/api/wms/basedata/st/storattr";
|
||||
|
||||
export default {
|
||||
name: 'RawProductOut',
|
||||
@@ -262,7 +262,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudStorattr.getStor({"stor_type": "3"}).then(res => {
|
||||
crudStorattr.queryStor({"stor_type": "3"}).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
|
||||
@@ -0,0 +1,410 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="crud.status.title"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
width="1200px"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="单据号" prop="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="product_code">
|
||||
<label slot="label">所属仓库2:</label>
|
||||
<el-select
|
||||
v-model="form.stor_id"
|
||||
clearable
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
:disabled="crud.status.view > 0"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库点" prop="point_code">
|
||||
<label slot="label">入库点:</label>
|
||||
<el-select
|
||||
v-model="form.point_code"
|
||||
clearable
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
:disabled="crud.status.view > 0"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="bill_type">
|
||||
<el-select
|
||||
v-model="form.bill_type"
|
||||
clearable
|
||||
placeholder="业务类型"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
:disabled="crud.status.view > 0"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.bill_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="bill_status">
|
||||
<el-select
|
||||
v-model="form.bill_status"
|
||||
clearable
|
||||
style="width: 210px"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IO_BILL_STATUS"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="明细数" prop="detail_count">
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
:min="0"
|
||||
disabled
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="biz_date">
|
||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px" value-format="yyyy-MM-dd" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<div v-show="crud.status.add === 1" 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="form.tableData"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip prop="base_bill_code" label="订单号">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="form.tableData[scope.$index].base_bill_code"
|
||||
clearable
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
size="small"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="form.tableData[scope.$index].plan_qty"
|
||||
size="small"
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
precision="3"
|
||||
:min="0"
|
||||
@change="changeQty"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="unit_weight" label="单重">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="form.tableData[scope.$index].unit_weight"
|
||||
size="small"
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
precision="3"
|
||||
:min="0"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="form.tableData[scope.$index].storagevehicle_code"
|
||||
clearable
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
size="small"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="crud.status.add === 1" align="center" label="操作" width="170" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click.native.prevent="deleteRow(scope.$index, form.tableData)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<MaterDtl
|
||||
:dialog-show.sync="materShow"
|
||||
:is-single="false"
|
||||
:mater-opt-code="materType"
|
||||
@setMaterValue="tableChanged"
|
||||
/>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import crudsemiproductIn from '@/views/wms/storage_manage/semiproduct/semiproductIn/semiproductIn'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
|
||||
const defaultForm = {
|
||||
bill_code: '',
|
||||
product_code: 'A1',
|
||||
bill_status: '1',
|
||||
total_qty: '0',
|
||||
detail_count: '0',
|
||||
bill_type: '',
|
||||
remark: '',
|
||||
biz_date: new Date(),
|
||||
create_mode: '',
|
||||
tableData: []
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { MaterDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
|
||||
cruds() {
|
||||
return CRUD({ title: '入库新增', crudMethod: { ...crudsemiproductIn }})
|
||||
},
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
dtlShow: false,
|
||||
opendtlParam: null,
|
||||
materType: '03', // 关键成品
|
||||
storlist: [],
|
||||
billtypelist: [],
|
||||
rules: {
|
||||
product_code: [
|
||||
{ required: true, message: '生产车间不能为空', trigger: 'blur' }
|
||||
],
|
||||
bill_type: [
|
||||
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
biz_date: [
|
||||
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudsemiproductIn.queryStor().then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
// 获取入库单明细
|
||||
crudsemiproductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
this.form.tableData.splice(i, 1, row)
|
||||
}
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
crudsemiproductIn.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
||||
this.form.tableData = res.content
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
this.form.tableData.splice(i, 1, row)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
// 提交前校验
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
if (!row.base_bill_code) {
|
||||
this.crud.notify('订单号', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!row.plan_qty) {
|
||||
this.crud.notify('数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!this.form.stor_id) {
|
||||
this.crud.notify('所属仓库不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!this.form.point_code) {
|
||||
this.crud.notify('入库点不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!row.storagevehicle_code) {
|
||||
this.crud.notify('载具不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!row.unit_weight) {
|
||||
this.crud.notify('单重不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
const material_code = rows[index].material_code
|
||||
let len = rows.length
|
||||
while (len--) {
|
||||
const obj = rows[len]
|
||||
if (material_code === obj.material_code) {
|
||||
const index = rows.indexOf(obj)
|
||||
if (index > -1) { // 移除找到的指定元素
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
|
||||
rows.splice(index, 1)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
tableChanged(rows) {
|
||||
// 对新增的行进行校验不能存在相同物料批次
|
||||
rows.forEach((item) => {
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((row) => {
|
||||
if (row.material_code === item.material_code) {
|
||||
same_mater = false
|
||||
}
|
||||
})
|
||||
if (same_mater) {
|
||||
item.quality_scode = '01'
|
||||
item.ivt_level = '01'
|
||||
item.is_active = '1'
|
||||
item.plan_qty = '1'
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
||||
this.form.tableData.splice(-1, 0, item)
|
||||
}
|
||||
})
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
insertEvent(row) {
|
||||
this.materShow = true
|
||||
},
|
||||
changeQty() {
|
||||
this.form.total_qty = 0
|
||||
this.form.tableData.forEach((item) => {
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user