This commit is contained in:
zhangzq
2026-06-01 15:03:53 +08:00
parent e5677ec7d1
commit 4d24d4ac7d
737 changed files with 159 additions and 289 deletions

View File

@@ -313,7 +313,7 @@ export default {
rows.forEach((item) => {
let same_mater = true
this.form.tableData.forEach((row) => {
if (row.pcsn === item.pcsn && row.material_id === item.material_id && row.storagevehicle_code === item.storagevehicle_code) {
if (row.pcsn === item.pcsn) {
same_mater = false
}
})

View File

@@ -77,12 +77,12 @@ import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker/index'
import group, { getAllGroupInfo } from '@/views/wms/basedata/group/group.js'
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
const start = new Date()
export default {
name: 'AddDtl',
components: { crudOperation, rrOperation, pagination, DateRangePicker, group },
components: { crudOperation, rrOperation, pagination, DateRangePicker },
cruds() {
return CRUD({
title: '用户',
@@ -149,10 +149,10 @@ export default {
console.log('获取的rows:')
console.log(this.rows)
this.$emit('tableChanged', this.rows)
group.getAllGroupInfo(this.rows).then(res => {
this.rows = res.content
this.$emit('tableChanged', this.rows)
})
// crudRawAssist.queryBoxMater(this.rows).then(res => {
// this.rows = res
// this.$emit('tableChanged', this.rows)
// })
// this.form = this.$options.data().form
}
}

View File

@@ -72,20 +72,6 @@
label="数量"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="assign_qty"
:formatter="crud.formatNum3"
label="分配数量"
align="center"
/>
<el-table-column
show-overflow-tooltip
prop="unassign_qty"
:formatter="crud.formatNum3"
label="未分配数量"
align="center"
/>
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" align="center" />
<el-table-column show-overflow-tooltip prop="source_bill_type" label="源单类型" align="center" />
@@ -169,13 +155,10 @@
:data="form.tableMater"
style="width: 100%;"
max-height="300"
highlight-current-row
@row-click="clcikDisRow"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具编码" align="center" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" align="center" />
@@ -232,7 +215,7 @@ export default {
type: String,
default: null
},
storCode: {
storId: {
type: String,
default: null
}
@@ -253,7 +236,6 @@ export default {
sect_val: null,
form: {
dtl_row: null,
dis_row: null,
storage_qty: '',
point_code: null,
checked: true,
@@ -273,7 +255,7 @@ export default {
},
methods: {
open() {
crudSectattr.getSectCode({ 'stor_code': this.storCode }).then(res => {
crudSectattr.getSectCode({ 'stor_id': this.storId }).then(res => {
this.sects = res.content
})
@@ -301,15 +283,11 @@ export default {
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code }).then(res => {
this.openParam = res
this.form.dtl_row = res[row.index]
this.form.dis_row = null
})
crudRawAssist.getDisDtl(row).then(res => {
this.form.tableMater = res
})
},
clcikDisRow(row, column, event) {
this.form.dis_row = row
},
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex
},
@@ -391,10 +369,6 @@ export default {
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (!this.form.dis_row) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
// 如果勾选了,直接跳后台
if (this.form.checked) {
if (!this.sect_code) {
@@ -411,7 +385,6 @@ export default {
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
this.form.tableMater = res
this.divBtn = false
this.form.dis_row = null
this.crud.notify('分配货位成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
}).finally(() => {
@@ -430,8 +403,9 @@ export default {
this.crud.notify('不存在载具明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (!this.form.dis_row) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
const flag = this.form.tableMater.some(mater => !mater.struct_code)
if (flag) {
this.crud.notify('明细存在未分配货位!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
// 如果勾选了,直接跳后台
@@ -441,7 +415,6 @@ export default {
})
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
this.form.tableMater = res
this.form.dis_row = null
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
})

View File

@@ -379,7 +379,7 @@ export default {
divOpen() {
crudRawAssist.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '1' }).then(res => {
this.openParam = res
this.storCode = this.currentRow.stor_code
this.storId = this.currentRow.stor_id
this.billType = this.currentRow.bill_type
this.divShow = true
})

View File

@@ -157,14 +157,21 @@
disabled
/>
</el-form-item>
<el-form-item label="出库" prop="gender2">
<el-cascader
placeholder="请选择"
:options="outBoundRegion"
:props="{ checkStrictly: true }"
<el-form-item label="出库" prop="point_code">
<el-select
v-model="form2.point_code"
clearable
@change="outBoundChange"
/>
placeholder="请选择"
class="filter-item"
style="width: 150px;"
>
<el-option
v-for="item in pointList"
:key="item.point_code"
:label="item.point_name"
:value="item.point_code"
/>
</el-select>
</el-form-item>
</el-form>
</div>
@@ -204,7 +211,6 @@
<el-table-column prop="material_name" label="物料名称" width="170px" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
<el-table-column prop="storagevehicle_code" label="载具号" width="150px" :min-width="flexWidth('storagevehicle_code',crud.data,'载具号')" />
<el-table-column prop="pcsn" label="批次号" width="150px" :min-width="flexWidth('pcsn',crud.data,'批次号')" />
<el-table-column show-overflow-tooltip prop="qty" label="物料总数" :formatter="crud.formatNum3" align="center" />
<el-table-column show-overflow-tooltip prop="plan_qty" label="出库重量" :formatter="crud.formatNum3" align="center" width="120px" :min-width="flexWidth('plan_qty',crud.data,'出库重量')">
<template scope="scope">
<el-input-number v-show="mstrow.bill_type === '1011'" v-model="scope.row.plan_qty" :precision="3" :controls="false" :min="1" style="width: 90px" />
@@ -233,7 +239,7 @@ import CRUD, { crud } from '@crud/crud'
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
import StructIvt from '@/views/wms/st/outbill/StructIvt'
import PointDialog from '@/views/wms/sch/point/PointDialog'
import crudPoint, { getRegionPoints } from '@/views/wms/sch/point/schBasePoint'
import crudPoint from '@/views/wms/sch/point/schBasePoint'
import crudSectattr from '@/views/wms/basedata/sectattr/sectattr'
import { autoCancel, getOutBillDis } from './checkoutbill'
@@ -254,7 +260,7 @@ export default {
type: Array,
default: () => { return [] }
},
storCode: {
storId: {
type: String,
default: null
}
@@ -286,11 +292,9 @@ export default {
form2: {
unassign_qty: '0',
assign_qty: '0',
point_code: '',
region_code: ''
point_code: ''
},
sects: [],
outBoundRegion: [],
pointList: [],
rules: {
}
@@ -316,11 +320,13 @@ export default {
},
methods: {
open() {
crudSectattr.getSectCode({ 'stor_code': this.storCode }).then(res => {
crudSectattr.getSectCode({ 'stor_id': this.storId }).then(res => {
this.sects = res.content
})
crudPoint.getRegionPoints({ 'region_code': 'CKQ' }).then(res => {
this.outBoundRegion = res.content
const area_type = 'CKQ'
crudPoint.getPointList({ 'region_code': area_type }).then(res => {
this.pointList = res
})
},
close() {
@@ -334,11 +340,10 @@ export default {
},
PointChanged(row) {
this.form2.point_code = row.point_code
this.form2.region_code = row.region_code
},
openStructIvt() {
this.currentRow.remark = ''
this.currentRow.stor_code = this.storCode
this.currentRow.stor_id = this.storId
this.loadingAlldiv = true
checkoutbill.getStructIvt(this.currentRow).then(res => {
this.openParam = res
@@ -363,20 +368,6 @@ export default {
this.mstrow.sect_code = val[1]
}
},
outBoundChange(val) {
if (val.length === 1) {
this.form2.region_code = val[0]
this.form2.point_code = ''
}
if (val.length === 0) {
this.form2.region_code = ''
this.form2.point_code = ''
}
if (val.length === 2) {
this.form2.region_code = val[0]
this.form2.point_code = val[1]
}
},
tabledisabled(row) {
if ((row.work_status === '00' || row.work_status === '01') && row.is_issued === '0') {
return false
@@ -469,14 +460,13 @@ export default {
}
},
allSetPointAllDtl() {
if (this.form2.regon_code === '') {
if (this.form2.point_code === '') {
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.loadingSetAllPoint = true
const data = {
'point_code': this.form2.point_code,
'region_code': this.form2.region_code,
'iostorinv_id': this.mstrow.iostorinv_id,
'bill_code': this.mstrow.bill_code,
'checked': this.checked

View File

@@ -93,11 +93,7 @@
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘编码" align="center" width="250px" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column show-overflow-tooltip sortable prop="pcsn" label="批次号" align="center" width="150px" />
<el-table-column show-overflow-tooltip prop="qty" label="可出重量" :formatter="crud.formatNum3" align="center" >
<template slot-scope="scope">
<el-input v-model="scope.row.qty" clearable style="width: 120px"></el-input>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可出重量" :formatter="crud.formatNum3" align="center" />
<el-table-column align="center" label="操作" width="160" fixed="right">
<template scope="scope">
<el-button v-show="!scope.row.edit" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
@@ -204,15 +200,15 @@ export default {
}
row.edit = !row.edit
if (row.edit) {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - parseFloat(row.qty)
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.qty)
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - parseFloat(row.canuse_qty)
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.canuse_qty)
} else {
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.qty)
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.canuse_qty)
// 如果待分配重量等于0则 明细重量 - 已分配重量
if (parseInt(this.queryrow.unassign_qty) === 0) {
this.queryrow.unassign_qty = parseFloat(this.goal_unassign_qty) - parseFloat(this.queryrow.assign_qty)
} else {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.qty)
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.canuse_qty)
}
if (this.queryrow.unassign_qty > this.goal_unassign_qty) {
this.queryrow.unassign_qty = JSON.parse(JSON.stringify(this.goal_unassign_qty))

View File

@@ -203,7 +203,7 @@
</div>
<AddDialog @AddChanged="querytable" />
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
<DivDialog :dialog-show.sync="divShow" :open-array="openParam" :stor-code="storCode" :rowmst="mstrow" @DivChanged="querytable" />
<DivDialog :dialog-show.sync="divShow" :open-array="openParam" :stor-id="storId" :rowmst="mstrow" @DivChanged="querytable" />
</div>
</template>
@@ -262,7 +262,7 @@ export default {
checkrows: [],
storlist: [],
billtypelist: [],
storCode: null
storId: null
}
},
mounted: function() {
@@ -382,7 +382,7 @@ export default {
divOpen() {
checkoutbill.getOutBillDtl({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
this.openParam = res
this.storCode = this.currentRow.stor_code
this.storId = this.currentRow.stor_id
this.divShow = true
this.mstrow = this.currentRow
})