# Conflicts:
#	mes/hd/nladmin-system/src/main/java/org/nl/wms/storage_manage/rawmanage/service/iostorInv/impl/StIvtIostorinvOutYlServiceImpl.java
#	mes/qd/src/views/wms/old_manage/old_package/index.vue
This commit is contained in:
2023-05-26 16:29:08 +08:00
118 changed files with 3786 additions and 1974 deletions

View File

@@ -204,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, {getStor} from '@/views/wms/storage_manage/basedata/basedata'
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
const defaultForm = {
bill_code: '',
@@ -325,27 +325,6 @@ export default {
}
}
},
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 = '0'
item.edit = true
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
},
tableChanged1(row) {
this.nowrow.material_id = row.material_id
this.nowrow.material_code = row.material_code
@@ -353,10 +332,29 @@ export default {
this.nowrow.plan_qty = '0'
this.nowrow.qty_unit_name = row.unit_name
this.nowrow.qty_unit_id = row.base_unit_id
},
tableChanged2(row) {
let same_mater = true
this.form.tableData.forEach((item) => {
if (item.source_bill_code === row.sale_code) {
same_mater = false
}
})
if (same_mater) {
const data = {}
data.material_id = row.material_id
data.material_code = row.material_code
data.material_name = row.material_name
data.plan_qty = row.product_qty
data.qty_unit_name = row.qty_unit_name
data.qty_unit_id = row.qty_unit_id
data.source_billdtl_id = row.sale_id
data.source_bill_type = row.sale_type
data.source_bill_code = row.sale_code
data.edit = true
this.form.tableData.splice(-1, 0, data)
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(data.plan_qty)
}
},
insertEvent(row) {
this.dtlShow = true

View File

@@ -20,7 +20,7 @@
>
<el-form-item label="销售单号">
<el-input
v-model="query.bill_code"
v-model="query.sale_code"
size="mini"
clearable
placeholder="销售单号"
@@ -30,14 +30,14 @@
<el-form-item label="客户编码">
<el-input
v-model="query.bill_code"
v-model="query.cust_code"
size="mini"
clearable
placeholder="客户编码"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<!--
<el-form-item label="创建日期">
<el-date-picker
v-model="query.createTime"
@@ -48,7 +48,7 @@
:default-time="['00:00:00', '23:59:59']"
@change="crud.toQuery"
/>
</el-form-item>
</el-form-item>-->
<rrOperation />
</el-form>
@@ -62,8 +62,13 @@
:data="crud.data"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
@current-change="clickChange"
>
<el-table-column type="selection" width="55" />
<el-table-column 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 show-overflow-tooltip width="150" prop="sale_code" label="销售单号" />
<el-table-column show-overflow-tooltip width="150" prop="sale_type" label="销售单类型" />
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" />
@@ -72,6 +77,7 @@
<el-table-column show-overflow-tooltip width="150" prop="sale_qty" label="销售数量" />
<el-table-column show-overflow-tooltip width="150" prop="cust_code" label="客户编码" />
<el-table-column show-overflow-tooltip width="150" prop="cust_name" label="客户名称" />
<el-table-column show-overflow-tooltip width="150" prop="product_qty" label="生产数量" />
<el-table-column show-overflow-tooltip width="150" prop="qty_unit_name" label="单位" />
<el-table-column show-overflow-tooltip width="150" prop="plandeliver_date" label="计划交期" />
<el-table-column show-overflow-tooltip width="150" prop="create_name" label="创建人" />
@@ -104,7 +110,7 @@ export default {
cruds() {
return CRUD({
title: '用户',
url: '/api/in/rawAssist/getBillDtl',
url: '/api/mpsSaleOrder',
crudMethod: {},
optShow: {
reset: true
@@ -125,6 +131,7 @@ export default {
return {
dialogVisible: false,
rows: [],
tableRadio: null,
tableData: []
}
},
@@ -146,13 +153,13 @@ export default {
close() {
this.$emit('update:dialogShow', false)
},
clickChange(item) {
this.tableRadio = item
},
submit() {
this.$emit('update:dialogShow', false)
this.rows = this.$refs.multipleTable.selection
crudProductIn.queryBoxMater(this.rows).then(res => {
this.rows = res
this.$emit('tableChanged', this.rows)
})
this.$emit('tableChanged', this.tableRadio)
}
}
}

View File

@@ -71,13 +71,13 @@
style="width: 200px"
size="mini"
clearable
@blur="vehicleCheck(form.vehicle_code)"
placeholder="载具号"
@blur="vehicleCheck(form.vehicle_code)"
/>
</el-form-item>
<el-form-item label="箱号:" prop="pageBox_code">
<el-input v-model="form.bucketunique" size="mini" style="width: 200px" disabled placeholder="箱号" >
<el-input v-model="form.bucketunique" size="mini" style="width: 200px" disabled placeholder="箱号">
<el-button slot="append" icon="el-icon-plus" @click="queryBox" />
</el-input>
</el-form-item>
@@ -208,11 +208,23 @@
<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>
<StructDiv ref="child" :stor-id="storId" :dialog-show.sync="structShow" :sect-prop="sectProp" @tableChanged="tableChanged" />
<AddBox ref="child" :dialog-show.sync="addBoxShow" :add-box-param="boxParam" @tableChanged2="tableChanged2" />
<AddBox ref="child" :dialog-show.sync="addBoxShow" :add-box-param="boxParam" @tableChanged2="tableChanged2" />
</el-dialog>
</template>
@@ -266,8 +278,8 @@ export default {
sect_id: '',
stor_id: '',
point_code: null,
vehicle_code: "",
bucketunique: "",
vehicle_code: '',
bucketunique: '',
checked: true,
tableMater: []
},
@@ -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
@@ -309,7 +329,7 @@ export default {
},
clcikRow(row, column, event) {
this.form.dtl_row = row
crudProductIn.getIosInvDis({ "iostorinv_id": row.iostorinv_id, "iostorinvdtl_id": row.iostorinvdtl_id }).then(res => {
crudProductIn.getIosInvDis({ 'iostorinv_id': row.iostorinv_id, 'iostorinvdtl_id': row.iostorinvdtl_id }).then(res => {
this.form.tableMater = res
})
},
@@ -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,13 +464,18 @@ 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)
})
})
},
sectQueryChange(val) {
debugger
this.sectProp = val
if (val.length === 1) {
this.stor_id = val[0]
@@ -501,8 +529,8 @@ export default {
this.divBtn = true
debugger
this.dis_row.stor_id = this.stor_id
this.dis_row.sect_id = this.sect_id
this.dis_row.stor_id = this.stor_id.toString()
this.dis_row.sect_id = this.sect_id.toString()
crudProductIn.divStruct(this.dis_row).then(res => {
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.dis_row.iostorinv_id }).then(res => {
this.openParam = res

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"
@@ -185,8 +185,8 @@
</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 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">
@@ -224,7 +224,7 @@
</template>
<script>
import productIn, {getIosInvDtl} from '@/views/wms/storage_manage/product/productIn/productin'
import productIn, { getIosInvDtl } from '@/views/wms/storage_manage/product/productIn/productin'
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
import CRUD, { crud, header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
@@ -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, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
import { mapGetters } from 'vuex'
export default {

View File

@@ -1,11 +1,11 @@
<!--suppress ALL -->
<template>
<el-dialog
title="出库单编辑"
: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"
>
@@ -26,39 +26,39 @@
<label slot="label">单&nbsp;&nbsp;据&nbsp;号:</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">生产车间:</label>
<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="bill_type">
<el-select
v-model="form.product_code"
v-model="form.bill_type"
clearable
placeholder="生产车间"
size="mini"
placeholder="业务类型"
class="filter-item"
style="width: 210px"
:disabled="crud.status.view > 0"
@change="storChange"
>
<el-option
v-for="item in dict.product_area"
v-for="item in dict.ST_INV_OUT_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="业务类型" prop="bill_type">
<el-form-item label="仓库" prop="stor_id">
<label slot="label">仓库</label>
<el-select
v-model="form.bill_type"
v-model="form.stor_id"
clearable
filterable
size="mini"
placeholder="业务类型"
class="filter-item"
style="width: 210px"
:disabled="crud.status.view > 0"
>
<el-option
v-for="item in dict.bill_type"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in storlist"
:key="item.stor_id"
:label="item.stor_name"
:value="item.stor_id"
/>
</el-select>
</el-form-item>
@@ -94,19 +94,15 @@
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">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</label>
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
</el-form-item>
</el-form>
<div class="crud-opts2">
<span class="role-span">出库明细</span>
<span v-if="crud.status.cu > 0" class="crud-opts-right2">
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
<div class="crud-opts2" style="margin-bottom: 5px;">
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button
@@ -115,11 +111,11 @@
type="primary"
icon="el-icon-plus"
size="mini"
@click="queryDtl()"
@click="insertEvent()"
>
添加物料
添加发货物料
</el-button>
<!-- <el-button
<el-button
slot="left"
class="filter-item"
type="primary"
@@ -128,7 +124,7 @@
@click="insertdtl()"
>
新增一行
</el-button>-->
</el-button>
</span>
</div>
@@ -140,97 +136,117 @@
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="190" align="center">
<!-- <template scope="scope">
<template scope="scope">
<el-input v-show="!scope.row.edit" v-model="scope.row.material_code" disabled class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="queryMater(scope.$index, scope.row)" />
<el-button slot="append" icon="el-icon-plus" @click="queryMater(scope.$index, scope.row)" />
</el-input>
<span v-show="scope.row.edit">{{ scope.row.material_code }}</span>
</template>-->
</el-table-column>
<el-table-column prop="material_name" label="物料名称" align="center" min-width="150px" show-overflow-tooltip />
<el-table-column prop="material_spec" label="物料规格" align="center" min-width="150px" show-overflow-tooltip />
<el-table-column show-overflow-tooltip prop="pcsn" label="订单号" width="150px" align="center">
<!-- <template scope="scope">
<el-input v-show="!scope.row.edit" v-model="scope.row.pcsn" size="mini" />
<span v-show="scope.row.edit">{{ scope.row.pcsn }}</span>
</template>-->
</el-table-column>
<el-table-column prop="plan_qty" label="出库重量" width="150" align="center">
<template scope="scope">
<el-input-number v-model="scope.row.plan_qty" :precision="3" :controls="false" :min="1" style="width: 120px" />
<!-- <span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>-->
</template>
</el-table-column>
<el-table-column prop="qty_unit_name" label="单位" align="center" />
<!-- <el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center">
<template scope="scope">
<el-input v-model="scope.row.remark" size="mini" />
<span>{{ scope.row.remark }}</span>
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip prop="plan_qty" label="出库数量">
<template slot-scope="scope">
<el-input-number
v-show="!scope.row.edit"
v-model="form.tableData[scope.$index].plan_qty"
size="small"
:controls="false"
controls-position="right"
precision="3"
:min="0"
@change="changeQty"
/>
<span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>
</template>
</el-table-column>-->
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="160" fixed="right">
</el-table-column>
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" />
<el-table-column show-overflow-tooltip prop="remark" label="明细备注">
<template slot-scope="scope">
<el-input v-model="form.tableData[scope.$index].remark" size="small" />
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="source_bill_type" label="源单类型" />
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" />
<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, form.tableData)" />
<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>
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged5" />
<MaterDialog :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @setMaterValue="setMaterValue" />
<MaterDtl
:dialog-show.sync="materShow"
:is-single="true"
:mater-opt-code="materType"
@setMaterValue="tableChanged1"
/>
<AddDtl
:dialog-show.sync="dtlShow"
@tableChanged="tableChanged2"
/>
</el-dialog>
</template>
<script>
import CRUD, { crud, form } from '@crud/crud'
import AddDtl from '@/views/wms/storage_manage/product/productOut/AddDtl'
import MaterDialog from '@/views/wms/pub/MaterDialog'
import productOut from '@/views/wms/storage_manage/product/productOut/productout'
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/productOut/AddDtl'
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
const defaultForm = {
bill_code: '',
stor_id: '',
stor_code: '',
stor_name: '',
product_code: '',
bill_status: '10',
total_qty: '0',
detail_count: '0',
bill_type: '',
remark: '',
workshop_id: '',
stor_id: '',
biz_date: new Date(),
out_stor_id: '',
create_mode: '',
tableData: []
}
export default {
name: 'AddDialog',
components: { AddDtl, MaterDialog },
components: { MaterDtl, AddDtl },
mixins: [crud(), form(defaultForm)],
dicts: ['IO_BILL_STATUS', 'ST_INV_OUT_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
props: {
dialogShow: {
type: Boolean,
default: false
},
openParam: {
type: Object
}
},
dicts: ['IO_BILL_STATUS', 'bill_type', 'product_area'],
data() {
return {
dialogVisible: false,
dtlShow: false,
materType: '',
materShow: false,
flagnow: false,
nowrow: {},
nowindex: '',
dtlShow: false,
opendtlParam: null,
materType: '03', // 关键成品
storlist: [],
inStorList: [],
invtypelist: [],
storId: null,
billtypelist: [],
rules: {
product_code: [
{ required: true, message: '生产车间不能为空', trigger: 'blur' }
stor_id: [
{ required: true, message: '仓库不能为空', trigger: 'blur' }
],
bill_type: [
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
@@ -243,128 +259,125 @@ export default {
},
watch: {
dialogShow: {
handler(newValue) {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
}
},
methods: {
open() {
crudProductIn.queryStor().then(res => {
this.storlist = res
crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
this.storlist = res.content
})
},
close() {
this.$emit('AddChanged')
},
[CRUD.HOOK.beforeSubmit]() {
if (this.form.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
},
[CRUD.HOOK.afterToEdit]() {
productOut.getOutBillDtl({ '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]
row.edit = false
this.form.tableData.splice(i, 1, row)
}*/
})
},
[CRUD.HOOK.afterToView]() {
productOut.getOutBillDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
// 获取入库单明细
crudProductIn.getIosInvDtl({ 'bill_code': this.form.bill_code }).then(res => {
this.form.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i]
row.edit = true
this.form.tableData.splice(i, 1, row)
}
})
},
invtypeFormat(row, column) {
return this.dict.label.bill_type[row.source_bill_type]
},
storChange(row) {
this.storlist.forEach((item) => {
if (item.product_code === row) {
this.form.product_code = item.product_code
[CRUD.HOOK.afterToView]() {
crudProductIn.getIosInvDtl({ 'bill_code': this.form.bill_code }).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)
}
})
},
async queryMater(index, row) {
if (this.form.bill_type === '') {
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
return
[CRUD.HOOK.beforeSubmit]() {
// 提交前校验
if (this.form.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
this.materShow = true
this.nowindex = index
this.nowrow = row
},
queryDtl(index, row) {
if (this.form.bill_type === '') {
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.form.product_code === '') {
this.crud.notify('请选择生产车间!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.storId = this.form.product_code
this.dtlShow = true
},
tableChanged5(rows) {
rows.forEach((item) => {
if (this.form.tableData.length !== 0) {
this.flagnow = false
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].material_id === item.material_id && this.form.tableData[i].pcsn === item.pcsn) {
this.flagnow = true
}
}
if (!this.flagnow) {
item.edit = true
this.form.tableData.splice(-1, 0, item)
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
}
} else {
item.edit = true
this.form.tableData.splice(-1, 0, item)
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
}
})
this.form.detail_count = this.form.tableData.length
},
setMaterValue(row) {
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].material_id === row.material_id) {
this.crud.notify('不允许添加相同物料!')
const row = this.form.tableData[i]
if (!row.plan_qty) {
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
}
}
}
},
tableChanged1(row) {
this.nowrow.material_id = row.material_id
this.nowrow.material_code = row.material_code
this.nowrow.material_name = row.material_name
this.nowrow.qty_unit_id = row.base_unit_id
this.nowrow.plan_qty = '0'
this.nowrow.qty_unit_name = row.unit_name
this.nowrow.plan_qty = '1'
this.nowrow.edit = false
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
this.nowrow.qty_unit_id = row.base_unit_id
},
async insertdtl() {
tableChanged2(row) {
let same_mater = true
this.form.tableData.forEach((item) => {
if (item.source_bill_code === row.sale_code) {
same_mater = false
}
})
if (same_mater) {
const data = {}
data.material_id = row.material_id
data.material_code = row.material_code
data.material_name = row.material_name
data.plan_qty = row.delivery_qty
data.qty_unit_name = row.qty_unit_name
data.qty_unit_id = row.qty_unit_id
data.source_billdtl_id = row.sale_id
data.source_bill_type = row.sale_type
data.source_bill_code = row.sale_code
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
}
},
insertEvent(row) {
this.dtlShow = true
},
queryMater(index, row) {
this.nowindex = index
this.nowrow = row
this.materShow = true
},
insertdtl() {
if (this.form.bill_type === '') {
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.form.tableData.push({ material_id: '', material_code: '', material_name: '', pcsn: '', quality_scode: '00', plan_qty: '1', qty_unit_name: '', qty_unit_id: '', remark: '', edit: false })
this.form.tableData.push({ edit: false, plan_qty: '0' })
this.form.detail_count = this.form.tableData.length
},
deleteRow(index, rows) {
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
rows.splice(index, 1)
changeQty() {
this.form.total_qty = 0
this.form.tableData.forEach((item) => {
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
})
}
}
}
@@ -372,16 +385,13 @@ export default {
<style>
.crud-opts2 {
padding: 0 0;
padding: 4px 0;
display: -webkit-flex;
display: flex;
align-items: center;
}
.crud-opts2 .crud-opts-right2 {
margin-left: auto;
padding: 4px 4px;
}
.input-with-select {
background-color: #fff;
}
</style>

View File

@@ -1,7 +1,6 @@
<!--suppress ALL -->
<template>
<el-dialog
title="物料选择"
title="单据选择"
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
@@ -11,59 +10,85 @@
@open="open"
>
<div class="head-container">
<div>
<!-- 搜索 -->
<el-input
v-model="query.material_code"
clearable
size="mini"
placeholder="物料编码、名称"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<el-input
v-model="query.material_spec"
clearable
size="mini"
placeholder="物料规格"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<el-input
v-model="query.pcsn"
clearable
size="mini"
placeholder="订单号"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<!-- 搜索 -->
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
label-width="80px"
label-suffix=":"
>
<el-form-item label="发货单号">
<el-input
v-model="query.deliver_code"
size="mini"
clearable
placeholder="销售单号"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="销售单号">
<el-input
v-model="query.sale_code"
size="mini"
clearable
placeholder="销售单号"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="客户编码">
<el-input
v-model="query.cust_code"
size="mini"
clearable
placeholder="客户编码"
@keyup.enter.native="crud.toQuery"
/>
</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>-->
<rrOperation />
</div>
</el-form>
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading="crud.loading"
:data="crud.data"
style="width: 100%;"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@current-change="clickChange"
>
<el-table-column 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 show-overflow-tooltip width="150" prop="deliver_code" label="单据号" />
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" />
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" />
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip width="150" prop="cust_code" label="客户编码" />
<el-table-column show-overflow-tooltip width="150" prop="cust_name" label="客户名称" />
<el-table-column show-overflow-tooltip width="150" prop="delivery_qty" label="数量" />
<el-table-column show-overflow-tooltip width="150" prop="qty_unit_name" label="单位" />
</el-table>
<!--分页组件-->
<pagination />
</div>
<!--表格渲染-->
<el-table
ref="multipleTable"
v-loading="crud.loading"
:data="crud.data"
style="width: 100%;"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="instorage_time" label="入库日期" :min-width="flexWidth('instorage_time',crud.data,'入库日期')" />
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_name',crud.data,'物料规格')" />
<el-table-column prop="struct_code" label="点位" :min-width="flexWidth('struct_name',crud.data,'点位')" />
<el-table-column prop="pcsn" label="订单号" :min-width="flexWidth('pcsn',crud.data,'订单号')" />
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="可用数" />
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" />
</el-table>
<!--分页组件-->
<pagination />
<span slot="footer" class="dialog-footer">
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
<el-button slot="left" type="primary" @click="submit">保存</el-button>
@@ -73,16 +98,17 @@
<script>
import CRUD, { header, presenter } from '@crud/crud'
import CRUD, { crud, header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
export default {
name: 'AddDtl',
components: { rrOperation, pagination },
components: { rrOperation, pagination, crudOperation },
cruds() {
return CRUD({
title: '用户', url: 'api/productOut/addDtl',
title: '用户', url: 'api/stIfDeliveryorderCp',
optShow: {
add: false,
edit: false,
@@ -113,6 +139,7 @@ export default {
dialogVisible: false,
opendtlParam: '',
rows: [],
tableRadio: null,
openShow: true
}
},
@@ -130,14 +157,7 @@ export default {
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.mater_type = this.opendtlParam
this.crud.query.stor_id = this.storId
if (this.openShow) {
this.openShow = false
return false
} else {
return true
}
return true
},
close() {
this.crud.resetQuery(false)
@@ -148,15 +168,13 @@ export default {
open() {
this.crud.query.mater_type = this.opendtlParam
},
clickChange(item) {
this.tableRadio = item
},
submit() {
this.rows = this.$refs.multipleTable.selection
if (this.rows.length <= 0) {
this.$message('请先勾选物料')
return
}
this.crud.resetQuery(false)
this.$emit('update:dialogShow', false)
this.$emit('tableChanged', this.rows)
this.rows = this.$refs.multipleTable.selection
this.$emit('tableChanged', this.tableRadio)
}
}
}

View File

@@ -1,4 +1,3 @@
<!--suppress ALL -->
<template>
<el-dialog
append-to-body
@@ -24,7 +23,7 @@
<span class="role-span">出库明细</span>
<div class="crud-opts-form">
<el-form ref="form" :inline="true" :model="form" size="mini">
<el-form-item label="生产车间" prop="gender2">
<el-form-item label="库区" prop="gender2">
<el-cascader
placeholder="请选择"
:options="sects"
@@ -45,7 +44,7 @@
type="primary"
icon="el-icon-plus"
size="mini"
@click="allDiv()"
@click="allDivIvt()"
>
全部分配
</el-button>
@@ -66,7 +65,6 @@
type="primary"
icon="el-icon-check"
size="mini"
:disabled="button1"
@click="oneDiv()"
>
自动分配
@@ -77,7 +75,6 @@
type="primary"
icon="el-icon-check"
size="mini"
:disabled="button2"
@click="oneCancel()"
>
自动取消
@@ -93,17 +90,6 @@
>
手工分配
</el-button>-->
<el-button
slot="left"
class="filter-item"
type="warning"
:loading="loadingSetAllPoint"
icon="el-icon-check"
size="mini"
@click="allSetPointAllDtl"
>
一键设置
</el-button>
</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
@@ -123,10 +109,12 @@
<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="material_spec" label="物料规格" align="center" />
<el-table-column show-overflow-tooltip prop="pcsn" label="订单号" align="center" width="140px" />
<el-table-column show-overflow-tooltip prop="plan_qty" label="重量" :formatter="crud.formatNum3" align="center" />
<el-table-column show-overflow-tooltip prop="assign_qty" label="已分配重量" :formatter="crud.formatNum3" align="center" />
<el-table-column show-overflow-tooltip prop="unassign_qty" label="未分配重量" :formatter="crud.formatNum3" align="center" />
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
<el-table-column show-overflow-tooltip prop="source_bill_type" label="源单类型" align="center" />
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" align="center" />
</el-table>
</el-card>
<div class="crud-opts2">
@@ -151,7 +139,7 @@
disabled
/>
</el-form-item>
<!-- <el-form-item label="出库点" prop="point_code">
<el-form-item label="出库点" prop="point_code">
<el-select
v-model="form2.point_code"
clearable
@@ -160,41 +148,28 @@
style="width: 200px;"
>
<el-option
v-for="item in this.pointList"
v-for="item in pointList"
:key="item.point_code"
:label="item.point_name"
:value="item.point_code"
/>
</el-select>
</el-form-item>-->
</el-form-item>
</el-form>
</div>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<!-- <el-button
slot="left"
class="filter-item"
:loading="loadingSetPoint"
type="warning"
icon="el-icon-check"
size="mini"
:disabled="button4"
@click="oneSetPoint2"
>
设置站点
</el-button>-->
<el-button
slot="left"
class="filter-item"
:loading="loadingSetAllPoint"
type="warning"
icon="el-icon-check"
:disabled="button5"
size="mini"
@click="allSetPoint"
@click="setPoint"
>
一键设置
设置站点
</el-button>
</span>
</div>
@@ -211,7 +186,7 @@
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@current-change="handleDisCurrentChange"
>
<el-table-column prop="bill_status" label="状态" align="center" width="110px">
<!-- <el-table-column prop="bill_status" label="状态" align="center" width="110px">
<template slot-scope="scope">
<el-select
v-model="scope.row.work_status"
@@ -226,7 +201,7 @@
/>
</el-select>
</template>
</el-table-column>
</el-table-column>-->
<el-table-column prop="material_code" label="物料编码" width="150px" :min-width="flexWidth('material_code',crud.data,'物料编码')" />
<el-table-column prop="material_name" label="物料名称" width="250px" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
<el-table-column prop="material_spec" label="物料规格" width="150px" :min-width="flexWidth('material_spec',crud.data,'物料规格')" />
@@ -246,8 +221,8 @@
import CRUD, { crud } from '@crud/crud'
import productOut from '@/views/wms/storage_manage/product/productOut/productout'
import StructIvt from '@/views/wms/storage_manage/product/productOut/StructIvt'
import crudRegion from '@/views/wms/scheduler_manage/region/region'
import crudPoint from '@/views/wms/scheduler_manage/point/point'
import crudSectattr from '@/api/wms/basedata/st/sectattr'
export default {
name: 'DivDialog',
@@ -259,7 +234,7 @@ export default {
type: Boolean,
default: false
},
rowmst: {
rowMst: {
type: Object
},
openArray: {
@@ -283,10 +258,6 @@ export default {
pointshow: false,
structshow: false,
button1: true,
button2: true,
button3: true,
button4: true,
button5: true,
tableDtl: [],
openParam: [],
mstrow: {},
@@ -320,7 +291,7 @@ export default {
this.tableDtl = newValue
}
},
rowmst: {
rowMst: {
handler(newValue, oldValue) {
this.mstrow = newValue
}
@@ -328,11 +299,10 @@ export default {
},
methods: {
open() {
crudRegion.getRegionSelect({ 'stor_id': this.storId }).then(res => {
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
this.sects = res.content
})
const area_type = 'A1_CK01'
const area_type = 'A1_RK01'
crudPoint.getPoint({ 'area_type': area_type }).then(res => {
this.pointList = res
})
@@ -356,26 +326,6 @@ export default {
}
}
},
openPoint() {
if (this.mstrow.bill_type === '010101') {
this.areatype = "'31'"
} else if (this.mstrow.bill_type === '010201' || this.mstrow.bill_type === '010202' || this.mstrow.bill_type === '010401') {
this.areatype = "'21'"
} else if (this.mstrow.bill_type === '010503' || this.mstrow.bill_type === '010501') {
this.areatype = "'22','23','24'"
} else if (this.mstrow.bill_type === '010502') {
this.areatype = "'21','22','23','24'"
} else if (this.mstrow.bill_type === '010801') {
this.areatype = "'22','23','24','31','35'"
} else if (this.mstrow.bill_type === '010601') {
this.areatype = ''
}
this.pointshow = true
this.$refs.child.getMsg(this.areatype)
},
PointChanged(row) {
this.form2.point_code = row.point_code
},
openStructIvt() {
this.currentRow.remark = ''
this.currentRow.stor_id = this.storId
@@ -399,69 +349,34 @@ export default {
this.mstrow.sect_id = val[1]
}
},
tabledisabled(row) {
if ((row.work_status === '00' || row.work_status === '01') && row.is_issued === '0') {
return false
} else {
return true
}
},
deleteRow(row) {
productOut.oneCancel(row).then(res => {
this.queryTableDtl()
})
},
handleDtlCurrentChange(current) {
if (current !== null) {
this.currentRow = current
this.form2.unassign_qty = current.unassign_qty
this.form2.assign_qty = current.assign_qty
this.tabledis = []
if (current.bill_status === '10') {
this.button1 = false
this.button2 = true
this.button5 = false
this.button3 = false
} else if (current.bill_status === '20') {
this.button1 = false
this.button2 = false
this.button3 = false
this.button5 = false
} else if (current.bill_status === '30') {
this.button1 = true
this.button2 = false
this.button3 = true
this.button5 = false
}
this.queryTableDdis(current.iostorinvdtl_id)
} else {
this.button1 = true
this.button2 = true
this.button3 = true
this.button5 = true
this.mstrow.iostorinvdtl_id = ''
this.currentRow = {}
this.tabledis = []
}
this.currentRow = current
this.queryTableDdis(current)
},
handleDisCurrentChange(current) {
if (current !== null) {
this.currentDis = current
if (current.work_status === '01' || current.work_status === '00') {
this.button4 = false
} else {
this.button4 = true
}
} else {
this.button4 = true
this.mstrow.iostorinvdis_id = ''
this.currentDis = {}
}
this.currentDis = current
},
allDiv() {
queryTableDtl() {
productOut.getIosInvDtl({ 'iostorinv_id': this.mstrow.iostorinv_id }).then(res => {
this.tableDtl = res
})
},
queryTableDdis(row) {
productOut.getIosInvDis({ 'iostorinvdtl_id': row.iostorinvdtl_id, 'iostorinv_id': row.iostorinv_id }).then(res => {
this.tabledis = res
}).catch(() => {
this.tabledis = []
})
},
allDivIvt() {
if (this.mstrow.sect_id === undefined) {
this.crud.notify('请选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
this.loadingAlldiv = true
productOut.allDiv(this.mstrow).then(res => {
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.INFO)
productOut.allDivIvt({ 'iostorinv_id': this.mstrow.iostorinv_id, 'sect_id': this.mstrow.sect_id, 'stor_id': this.mstrow.stor_id, 'type': true }).then(res => {
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.queryTableDtl()
this.loadingAlldiv = false
}).catch(() => {
@@ -469,74 +384,57 @@ export default {
})
},
oneDiv() {
this.loadingAutodiv = true
if (this.currentRow.iostorinvdtl_id !== null) {
this.mstrow.iostorinvdtl_id = this.currentRow.iostorinvdtl_id
productOut.allDivOne(this.mstrow).then(res => {
this.queryTableDtl()
this.loadingAutodiv = false
}).catch(() => {
this.loadingAutodiv = false
})
if (this.mstrow.sect_id === undefined) {
this.crud.notify('请选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (this.currentRow.iostorinvdtl_id === undefined) {
this.crud.notify('请选择明细!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
this.loadingAlldiv = true
productOut.allDivIvt({ 'iostorinvdtl_id': this.currentRow.iostorinvdtl_id, 'sect_id': this.mstrow.sect_id, 'stor_id': this.mstrow.stor_id, 'type': false }).then(res => {
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.queryTableDtl()
this.loadingAlldiv = false
}).catch(() => {
this.loadingAlldiv = false
})
},
allCancel() {
productOut.allCancel(this.mstrow).then(res => {
productOut.allCancel({ 'iostorinv_id': this.mstrow.iostorinv_id, 'type': true }).then(res => {
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.queryTableDtl()
this.tabledis = []
})
},
oneCancel() {
if (this.currentRow.iostorinvdtl_id !== null) {
productOut.allCancel(this.currentRow).then(res => {
this.queryTableDtl()
})
}
},
allSetPoint() {
/* if (this.form2.point_code === '') {
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
return
}*/
if (this.currentRow === '') {
if (this.currentRow.iostorinvdtl_id === undefined) {
this.crud.notify('请选择明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
return false
}
this.loadingSetAllPoint = true
this.currentRow.point_code = this.form2.point_code
productOut.allSetPoint(this.currentRow).then(res => {
this.queryTableDdis(this.currentRow.iostorinvdtl_id)
this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.INFO)
this.loadingSetAllPoint = false
}).catch(() => {
this.loadingSetAllPoint = false
productOut.allCancel({ 'iostorinvdtl_id': this.currentRow.iostorinvdtl_id, 'type': false }).then(res => {
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.queryTableDtl()
this.tabledis = []
})
},
allSetPointAllDtl() {
/* if (this.form2.point_code === '') {
this.crud.notify('请选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
return
}*/
this.loadingSetAllPoint = true
const data = {
'point_code': this.form2.point_code,
'iostorinv_id': this.mstrow.iostorinv_id
setPoint() {
if (this.form2.point_code === '') {
this.crud.notify('请选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
productOut.allSetPoint(data).then(res => {
this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.INFO)
this.loadingSetAllPoint = false
}).catch(() => {
this.loadingSetAllPoint = false
})
},
queryTableDtl() {
productOut.getOutBillDtl({ 'iostorinv_id': this.mstrow.iostorinv_id }).then(res => {
this.tableDtl = res
})
},
queryTableDdis(iostorinvdtl_id) {
productOut.getOutBillDis({ 'iostorinvdtl_id': iostorinvdtl_id, 'bill_status': '01' }).then(res => {
this.tabledis = res
}).catch(() => {
if (this.currentDis.iostorinvdis_id === undefined) {
this.crud.notify('请选择分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
productOut.setPoint({ 'iostorinvdis_id': this.currentDis.iostorinvdis_id, 'point_code': this.form2.point_code }).then(res => {
this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.queryTableDtl()
this.tabledis = []
})
},

View File

@@ -2,7 +2,7 @@
<template>
<el-dialog
append-to-body
title="出库详情"
title="出库详情"
:visible.sync="dialogVisible"
destroy-on-close
fullscreen
@@ -14,7 +14,7 @@
<label slot="label">&nbsp;&nbsp;&nbsp;:</label>
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
</el-form-item>
<el-form-item label="生产车间">
<el-form-item label="仓 库">
<el-select
v-model="form.product_code"
clearable
@@ -32,18 +32,19 @@
/>
</el-select>
</el-form-item>
<el-form-item label="业务类型" prop="bill_type">
<el-form-item label="业务类型">
<el-select
v-model="form.bill_type"
clearable
filterable
size="mini"
:disabled="true"
placeholder="业务类型"
class="filter-item"
disabled
@change="crud.toQuery"
>
<el-option
v-for="item in dict.bill_type"
v-for="item in dict.ST_INV_OUT_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -60,7 +61,7 @@
disabled
>
<el-option
v-for="item in dict.io_bill_status"
v-for="item in dict.IO_BILL_STATUS"
:key="item.id"
:label="item.label"
:value="item.value"
@@ -91,7 +92,7 @@
</el-form-item>
</el-form>
<div class="crud-opts2">
<span class="role-span2">库明细</span>
<span class="role-span2">库明细</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<!--表格渲染-->
@@ -107,14 +108,11 @@
@current-change="handleDtlCurrentChange"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column :formatter="bill_statusFormat" prop="bill_status" label="状态" />
<el-table-column min-width="140" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<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="订单号" width="150px" align="center" show-overflow-tooltip />
<el-table-column prop="pcsn" label="订单号" width="150" align="center" />
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
<el-table-column prop="assign_qty" :formatter="crud.formatNum3" label="已分配重量" align="center" width="100px" />
<el-table-column prop="unassign_qty" :formatter="crud.formatNum3" label="未分配重量" align="center" width="100px" />
<el-table-column prop="qty_unit_name" label="单位" align="center" />
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
</el-table>
@@ -138,11 +136,12 @@
<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" show-overflow-tooltip />
<el-table-column prop="pcsn" label="订单号" align="center" width="150" />
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
<el-table-column prop="struct_code" label="仓位" align="center" show-overflow-tooltip />
<el-table-column prop="region_code" label="区域" align="center" show-overflow-tooltip />
<el-table-column prop="task_status" label="状态" align="center" width="110px" :formatter="task_statusFormat" />
<el-table-column prop="point_code1" label="起始位置" align="center" />
<el-table-column prop="point_code2" label="目的位置" align="center" />
<el-table-column prop="task_code" label="任务号" align="center" />
<el-table-column prop="task_type_name" label="任务类型" align="center" width="150px" />
</el-table>
</el-card>
</el-dialog>
@@ -151,14 +150,13 @@
<script>
import { crud } from '@crud/crud'
import productOut from '@/views/wms/storage_manage/product/productOut/productout'
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
import crudProductOut from '@/views/wms/storage_manage/product/productOut/productout'
export default {
name: 'ViewDialog',
components: { },
mixins: [crud()],
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL', 'bill_type', 'product_area'],
dicts: ['ST_INV_OUT_TYPE', 'product_area', 'IO_BILL_STATUS'],
props: {
dialogShow: {
type: Boolean,
@@ -173,6 +171,7 @@ export default {
dialogVisible: false,
tableDtl: [],
tabledis: [],
billtypelist: [],
storlist: [],
currentdtl: null,
currentDis: {},
@@ -191,11 +190,6 @@ export default {
}
}
},
created() {
crudProductIn.queryStor().then(res => {
this.storlist = res
})
},
methods: {
open() {
this.queryTableDtl()
@@ -206,10 +200,10 @@ export default {
this.currentdtl = null
this.tableDtl = []
this.tabledis = []
this.$emit('AddChanged')
this.$emit('TaskChanged')
},
bill_statusFormat(row) {
return this.dict.label.io_bill_status[row.bill_status]
stateFormat(row, column) {
return this.dict.label.IO_BILL_STATUS[row.bill_status]
},
taskdtl_typeFormat(row) {
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
@@ -241,13 +235,13 @@ export default {
this.currentDis = current
},
queryTableDtl() {
productOut.getOutBillDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
crudProductOut.getIosInvDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
this.tableDtl = res
})
},
queryTableDdis() {
if (this.currentdtl !== null) {
productOut.getOutBillDis({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
crudProductOut.getIosInvDis({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
this.tabledis = res
}).catch(() => {
this.tabledis = []

View File

@@ -1,4 +1,3 @@
<!--suppress ALL -->
<template>
<div class="app-container">
<!--工具栏-->
@@ -128,6 +127,32 @@
@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
@@ -138,34 +163,13 @@
/>
</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 />
</div>
<AddDialog @AddChanged="querytable" />
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
<DivDialog :dialog-show.sync="divShow" :open-array="openParam" :stor-id="storId" :rowmst="mstrow" @DivChanged="querytable" />
<DivDialog :dialog-show.sync="divShow" :open-array="openParam" :stor-id="storId" :row-mst="mstrow" @DivChanged="querytable" />
</div>
</template>
@@ -179,7 +183,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 crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
export default {
name: 'ProductOut',
@@ -230,15 +234,19 @@ export default {
}
},
created() {
crudProductIn.queryStor().then(res => {
this.storlist = res
crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
this.storlist = res.content
})
},
methods: {
fun(val) {
return Number(val).toFixed(3)
},
canUd(row) {
return row.bill_status !== '10'
},
toView(index, row) {
toView(row) {
debugger
this.mstrow = row
this.viewShow = true
},
@@ -293,9 +301,9 @@ export default {
return row.bill_status !== '99'
},
divOpen() {
productOut.getOutBillDtl({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
productOut.getIosInvDtl({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
this.openParam = res
this.storId = this.currentRow.product_code
this.storId = this.currentRow.stor_id
this.divShow = true
this.mstrow = this.currentRow
})

View File

@@ -10,219 +10,76 @@ export function add(data) {
export function del(ids) {
return request({
url: 'api/productOut/',
method: 'delete',
url: 'api/productOut/delete',
method: 'post',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/productOut',
method: 'put',
url: 'api/productOut/update',
method: 'post',
data
})
}
export function getOutBillDtl(data) {
export function getIosInvDtl(data) {
return request({
url: '/api/productOut/getOutBillDtl',
url: 'api/productOut/getIosInvDtl',
method: 'post',
data
})
}
export function getOutBillDis(data) {
export function getIosInvDis(data) {
return request({
url: '/api/productOut/getOutBillDis',
url: 'api/productOut/getIosInvDis',
method: 'post',
data
})
}
export function getOutBillDisDtl(params) {
export function allDivIvt(data) {
return request({
url: '/api/productOut/getOutBillDisDtl',
method: 'get',
params
})
}
export function getOutBillTask(params) {
return request({
url: '/api/productOut/getOutBillTask',
method: 'get',
params
})
}
export function getInvTypes() {
return request({
url: '/api/productOut/getInvTypes',
method: 'get'
})
}
export function insertDtl(data) {
return request({
url: '/api/productOut/insertDtl',
method: 'post',
data
})
}
export function allDiv(data) {
return request({
url: '/api/productOut/allDiv',
method: 'post',
data
})
}
export function allDivOne(data) {
return request({
url: '/api/productOut/allDivOne',
url: 'api/productOut/allDivIvt',
method: 'post',
data
})
}
export function allCancel(data) {
return request({
url: '/api/productOut/allCancel',
method: 'post',
data
})
}
export function oneCancel(data) {
return request({
url: '/api/productOut/oneCancel',
url: 'api/productOut/allCancel',
method: 'post',
data
})
}
export function setPoint(data) {
return request({
url: '/api/productOut/setPoint',
method: 'post',
data
})
}
export function oneSetPoint(data) {
return request({
url: '/api/productOut/oneSetPoint',
method: 'post',
data
})
}
export function getStructIvt(params) {
return request({
url: '/api/productOut/getStructIvt',
method: 'get',
params
})
}
export function manualDiv(data) {
return request({
url: '/api/productOut/manualDiv',
url: 'api/productOut/setPoint',
method: 'post',
data
})
}
export function confirm(data) {
return request({
url: '/api/productOut/confirm',
url: 'api/productOut/confirm',
method: 'post',
data
})
}
export function issueTask(data) {
return request({
url: '/api/productOut/issueTask',
method: 'post',
data
})
export default {
add,
edit,
del,
getIosInvDtl,
getIosInvDis,
allDivIvt,
allCancel,
setPoint,
confirm
}
export function finishTask(data) {
return request({
url: '/api/productOut/finishTask',
method: 'post',
data
})
}
export function cancleTaskfinish(data) {
return request({
url: '/api/productOut/cancleTaskfinish',
method: 'post',
data
})
}
export function paramByCodeType(data) {
return request({
url: '/api/productOut/paramByCodeType',
method: 'post',
data
})
}
export function schAreaType(data) {
return request({
url: '/api/productOut/schAreaType',
method: 'post',
data
})
}
export function backConfirm(data) {
return request({
url: '/api/productOut/backConfirm',
method: 'post',
data
})
}
export function getType() {
return request({
url: '/api/productOut/getType',
method: 'get'
})
}
export function moneySubmit(data) {
return request({
url: '/api/productOut/moneySubmit',
method: 'post',
data
})
}
export function getDisNum(data) {
return request({
url: '/api/productOut/getDisNum',
method: 'post',
data
})
}
export function queryBox(data) {
return request({
url: '/api/productOut/queryBox',
method: 'post',
data
})
}
export function getOutBillTask2(data) {
return request({
url: '/api/productOut/getOutBillTask2',
method: 'post',
data
})
}
export function cancelTask(data) {
return request({
url: '/api/productOut/cancelTask',
method: 'post',
data
})
}
export function allSetPoint(data) {
return request({
url: '/api/productOut/allSetPoint',
method: 'post',
data
})
}
export function oneSetPoint2(data) {
return request({
url: '/api/productOut/oneSetPoint2',
method: 'post',
data
})
}
export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, setPoint, oneSetPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType, allDivOne, moneySubmit, getDisNum, queryBox, getOutBillTask2, oneCancel, cancelTask, allSetPoint, oneSetPoint2 }

View File

@@ -127,7 +127,7 @@
</el-select>
</el-form-item>
<rrOperation/>
<rrOperation />
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
@@ -157,32 +157,37 @@
@select="handleSelectionChange"
@select-all="onSelectAll"
>
<el-table-column type="selection" width="55"/>
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态"/>
<el-table-column 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 prop="stor_name" label="生产车间" width="130" show-overflow-tooltip/>
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" label="业务类型"
:formatter="bill_typeFormat"/>
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期"/>
<el-table-column label="明细数量" align="center" prop="detail_count"/>
<el-table-column prop="stor_name" label="生产车间" width="130" show-overflow-tooltip />
<el-table-column
show-overflow-tooltip
prop="bill_type"
min-width="120"
label="业务类型"
:formatter="bill_typeFormat"
/>
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
<el-table-column label="明细数量" align="center" prop="detail_count" />
<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="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 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
@@ -195,18 +200,18 @@
</el-table-column>
</el-table>
<!--分页组件-->
<pagination/>
<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"/>
<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" />
</div>
</template>
<script>
import rawProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
import crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
import CRUD, {crud, header, presenter} from '@crud/crud'
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'
@@ -215,20 +220,20 @@ import DateRangePicker from '@/components/DateRangePicker/index'
import AddDialog from '@/views/wms/storage_manage/rawproduct/rawProductIn/AddDialog'
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 { mapGetters } from 'vuex'
import crudStorattr from '@/api/wms/basedata/st/storattr'
export default {
name: 'RawProductIn',
components: {ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog},
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog },
cruds() {
return CRUD({
title: '',
optShow: {add: true, reset: true},
optShow: { add: true, reset: true },
idField: 'iostorinv_id',
url: '/api/stIvtIostorinvYl',
sort: ['bill_code,desc'],
crudMethod: {...rawProductIn}
crudMethod: { ...rawProductIn }
})
},
mixins: [presenter(), header(), crud()],
@@ -255,14 +260,14 @@ export default {
'user'
])
},
mounted: function () {
mounted: function() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 180 + 'px;'
}
},
created() {
crudStorattr.getStor({"stor_type": "3"}).then(res => {
crudStorattr.queryStor({ 'stor_type': '3' }).then(res => {
this.storlist = res.content
})
},
@@ -326,7 +331,7 @@ export default {
return this.dict.label.IO_BILL_STATUS[row.bill_status]
},
divOpen() {
crudProductIn.getIODtl({'bill_code': this.currentRow.bill_code, 'open_flag': '1'}).then(res => {
crudProductIn.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '1' }).then(res => {
this.openParam = res
debugger
this.storId = this.currentRow.product_code

View File

@@ -12,26 +12,45 @@
>
<el-row v-show="crud.status.cu > 0" :gutter="20">
<el-col :span="20" style="border: 1px solid white">
<span/>
<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-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
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">单&nbsp;&nbsp;据&nbsp;号:</label>
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px"/>
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable 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-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="bill_type">
<el-select
@@ -55,9 +74,9 @@
v-model="form.stor_id"
clearable
class="filter-item"
@change="storChange"
style="width: 210px"
:disabled="crud.status.view > 0"
@change="storChange"
>
<el-option
v-for="item in storlist"
@@ -103,7 +122,7 @@
</el-form-item>
<el-form-item label="明细数" prop="detail_count">
<label slot="label">明&nbsp;&nbsp;细&nbsp;数:</label>
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px"/>
<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">总&nbsp;&nbsp;重&nbsp;量:</label>
@@ -118,8 +137,13 @@
</el-form-item>
<el-form-item label="备注" prop="remark">
<label slot="label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</label>
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea"
:disabled="crud.status.view > 0"/>
<el-input
v-model="form.remark"
style="width: 380px;"
rows="2"
type="textarea"
:disabled="crud.status.view > 0"
/>
</el-form-item>
</el-form>
@@ -127,7 +151,7 @@
<div class="crud-opts2" style="margin-bottom: 5px;">
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left"/>
<slot name="left" />
<el-button
slot="left"
class="filter-item"
@@ -159,10 +183,10 @@
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="index" label="序号" width="55" align="center"/>
<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_code" label="物料编码" />
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip prop="plan_qty" label="出库重量">
<template slot-scope="scope">
<el-input-number
@@ -176,7 +200,7 @@
/>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位"/>
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" />
<el-table-column show-overflow-tooltip prop="remark" label="明细备注">
<template slot-scope="scope">
<el-input
@@ -188,8 +212,8 @@
/>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="source_bill_type_name" label="源单类型"/>
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号"/>
<el-table-column show-overflow-tooltip prop="source_bill_type_name" label="源单类型" />
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单号" />
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
<template scope="scope">
<el-button
@@ -220,13 +244,13 @@
</template>
<script>
import CRUD, {crud, form} from '@crud/crud'
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";
import crudStructattr from '@/api/wms/basedata/st/structattr'
import StructIvt from '@/views/wms/storage_manage/rawproduct/rawProductOut/StructIvt'
const defaultForm = {
bill_code: '',
@@ -246,7 +270,7 @@ const defaultForm = {
export default {
name: 'AddDialog',
components: {StructIvt, MaterDtl, BillDtl},
components: { StructIvt, MaterDtl, BillDtl },
mixins: [crud(), form(defaultForm)],
dicts: ['IO_BILL_STATUS', 'ST_INV_OUT_TYPE', 'ST_QUALITY_SCODE', 'bill_type', 'product_area'],
props: {
@@ -273,13 +297,13 @@ export default {
billtypelist: [],
rules: {
product_code: [
{required: true, message: '生产车间不能为空', trigger: 'blur'}
{ required: true, message: '生产车间不能为空', trigger: 'blur' }
],
bill_type: [
{required: true, message: '业务类型不能为空', trigger: 'blur'}
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
],
biz_date: [
{required: true, message: '业务日期不能为空', trigger: 'blur'}
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
]
}
}
@@ -293,7 +317,7 @@ export default {
},
methods: {
open() {
crudStorattr.getStor({"stor_type": "3"}).then(res => {
crudStorattr.queryStor({ 'stor_type': '3' }).then(res => {
this.storlist = res.content
})
},
@@ -302,7 +326,7 @@ export default {
},
[CRUD.HOOK.afterToEdit]() {
// 获取入库单明细
crudProductOut.getIODtl({'iostorinv_id': this.form.iostorinv_id}).then(res => {
crudProductOut.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
this.form.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
@@ -338,7 +362,7 @@ export default {
}
},
storChange(value) {
crudStructattr.getSectCascader({'stor_id': value}).then(res => {
crudStructattr.getSectCascader({ 'stor_id': value }).then(res => {
this.sects = res.content
})
},

View File

@@ -127,7 +127,7 @@
</el-select>
</el-form-item>
<rrOperation/>
<rrOperation />
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
@@ -157,32 +157,37 @@
@select="handleSelectionChange"
@select-all="onSelectAll"
>
<el-table-column type="selection" width="55"/>
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态"/>
<el-table-column 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 prop="stor_name" label="生产车间" width="130" show-overflow-tooltip/>
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" label="业务类型"
:formatter="bill_typeFormat"/>
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期"/>
<el-table-column label="明细数量" align="center" prop="detail_count"/>
<el-table-column prop="stor_name" label="生产车间" width="130" show-overflow-tooltip />
<el-table-column
show-overflow-tooltip
prop="bill_type"
min-width="120"
label="业务类型"
:formatter="bill_typeFormat"
/>
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
<el-table-column label="明细数量" align="center" prop="detail_count" />
<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="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 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
@@ -195,18 +200,18 @@
</el-table-column>
</el-table>
<!--分页组件-->
<pagination/>
<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"/>
<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" />
</div>
</template>
<script>
import rawProductOut from '@/views/wms/storage_manage/rawproduct/rawProductOut/rawproductout'
import crudProductOut from '@/views/wms/storage_manage/rawproduct/rawProductOut/rawproductout'
import CRUD, {crud, header, presenter} from '@crud/crud'
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'
@@ -215,20 +220,20 @@ import DateRangePicker from '@/components/DateRangePicker/index'
import AddDialog from '@/views/wms/storage_manage/rawproduct/rawProductOut/AddDialog'
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 { mapGetters } from 'vuex'
import crudStorattr from '@/api/wms/basedata/st/storattr'
export default {
name: 'RawProductOut',
components: {ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog},
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog },
cruds() {
return CRUD({
title: '',
optShow: {add: true, reset: true},
optShow: { add: true, reset: true },
idField: 'iostorinv_id',
url: '/api/out/stIvtIostorinvYl',
sort: ['bill_code,desc'],
crudMethod: {...rawProductOut}
crudMethod: { ...rawProductOut }
})
},
mixins: [presenter(), header(), crud()],
@@ -255,14 +260,14 @@ export default {
'user'
])
},
mounted: function () {
mounted: function() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 180 + 'px;'
}
},
created() {
crudStorattr.getStor({"stor_type": "3"}).then(res => {
crudStorattr.queryStor({ 'stor_type': '3' }).then(res => {
this.storlist = res.content
})
},
@@ -326,7 +331,7 @@ export default {
return this.dict.label.IO_BILL_STATUS[row.bill_status]
},
divOpen() {
crudProductIn.getIODtl({'bill_code': this.currentRow.bill_code, 'open_flag': '1'}).then(res => {
crudProductIn.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '1' }).then(res => {
this.openParam = res
debugger
this.storId = this.currentRow.product_code