fix: 代码修复

This commit is contained in:
2023-05-25 21:42:15 +08:00
parent 8e624a40ce
commit cc15c50bbf
14 changed files with 548 additions and 126 deletions

View File

@@ -75,7 +75,7 @@ export default {
return CRUD({
title: '点位',
optShow: {},
url: 'api/region/getPointQuery',
url: 'api/mpsSaleOrder',
idField: 'region_code',
sort: 'region_code,desc',
query: { search: '', is_lock: '1', lock_type: '', sect_id: '', stor_id: '' },

View File

@@ -62,28 +62,6 @@
/>
</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"
@@ -226,7 +204,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 from "@/api/wms/basedata/st/storattr"
import crudStorattr, {getStor} from '@/views/wms/storage_manage/basedata/basedata'
const defaultForm = {
bill_code: '',
@@ -288,7 +266,7 @@ export default {
},
methods: {
open() {
crudStorattr.queryStor().then(res => {
crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
this.storlist = res.content
})
},
@@ -377,7 +355,6 @@ export default {
data.edit = true
this.form.tableData.splice(-1, 0, data)
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(data.plan_qty)
this.form.detail_count = this.form.tableData.length
}
},

View File

@@ -208,6 +208,18 @@
<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>
@@ -285,6 +297,14 @@ 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
@@ -381,6 +401,9 @@ export default {
this.form.tableMater.splice(-1, 0, item)
}
},
deleteRow(index, rows) {
rows.splice(index, 1)
},
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex
},
@@ -441,9 +464,14 @@ export default {
return
}
crudProductIn.confirmvehicle(this.form).then(res => {
this.crud.notify('组盘成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.form.vehicle_code = ''
this.form.bucketunique = ''
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)
})
})
},
@@ -487,25 +515,6 @@ 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)
@@ -519,17 +528,16 @@ 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.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).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.divBtn = false
this.crud.notify('分配货位成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})*/
}).finally(() => {
this.divBtn = false
})
@@ -539,23 +547,36 @@ export default {
}
},
unDivStruct() {
if (this.form.tableMater.length <= 0) {
this.crud.notify('不存在载具明细!', CRUD.NOTIFICATION_TYPE.INFO)
if (this.dis_row === null) {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
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 => {
crudProductIn.unDivStruct(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)
})
},
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)
})
})
}

View File

@@ -235,13 +235,13 @@ export default {
this.currentDis = current
},
queryTableDtl() {
crudProductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
this.tableDtl = res
})
},
queryTableDdis() {
if (this.currentdtl !== null) {
crudProductIn.getDisTask({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
crudProductIn.getIosInvDis({ "iostorinvdtl_id": this.currentdtl.iostorinvdtl_id }).then(res => {
this.tabledis = res
}).catch(() => {
this.tabledis = []

View File

@@ -141,17 +141,17 @@
>
分配
</el-button>
<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"
:disabled="dis_flag"
icon="el-icon-position"
size="mini"
@click="divOpen"
>
作业任务
</el-button>-->
<el-button
slot="right"
class="filter-item"
@@ -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 from '@/api/wms/basedata/st/storattr'
import crudStorattr, {getStor} from '@/views/wms/storage_manage/basedata/basedata'
import { mapGetters } from 'vuex'
export default {
@@ -281,7 +281,7 @@ export default {
}
},
created() {
crudStorattr.queryStor().then(res => {
crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
this.storlist = res.content
})
},
@@ -341,7 +341,7 @@ export default {
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
return
}
crudProductIn.confirm(this.currentRow).then(res => {
crudProductIn.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})

View File

@@ -66,7 +66,31 @@ export function getSect(data) {
export function divStruct(data) {
return request({
url: '/api/stIvtSectattr/divStruct',
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
})
@@ -81,5 +105,8 @@ export default {
vehicleCheck,
confirmvehicle,
getSect,
divStruct
divStruct,
unDivStruct,
setPoint,
confirm
}