Merge branch 'master' into b_lms2

This commit is contained in:
zhangzq
2024-06-07 16:21:32 +08:00
796 changed files with 42349 additions and 14164 deletions

View File

@@ -131,17 +131,6 @@
@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>
<el-form-item label="模糊查询">
<el-input
v-model="query.bill_code"
@@ -168,6 +157,17 @@
/>
</el-select>
</el-form-item>
<el-form-item label="单据日期">
<el-date-picker
v-model="query.createTime"
type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
@change="crud.toQuery"
/>
</el-form-item>
<rrOperation />
</el-form>
</div>

View File

@@ -176,14 +176,14 @@
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.check_code }}</el-link>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="150" prop="status" label="单据状态" />
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="110" prop="status" label="单据状态" />
<el-table-column prop="stor_name" label="仓库" width="120" />
<el-table-column show-overflow-tooltip prop="check_type" :formatter="bill_typeFormat" width="150" label="业务类型" />
<el-table-column show-overflow-tooltip prop="is_nok" :formatter="is_nokFormat" width="150" label="盘点状态" />
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="150" />
<el-table-column label="箱数" align="center" prop="dtl_num" width="150" />
<el-table-column label="子卷数" align="center" prop="pcsn_num" width="150" />
<el-table-column show-overflow-tooltip prop="input_time" width="170" label="创建日期" />
<el-table-column show-overflow-tooltip prop="check_type" :formatter="bill_typeFormat" width="110" label="业务类型" />
<el-table-column show-overflow-tooltip prop="is_nok" :formatter="is_nokFormat" width="90" label="盘点状态" />
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="110" />
<el-table-column label="箱数" align="center" prop="dtl_num" width="110" />
<el-table-column label="子卷数" align="center" prop="pcsn_num" width="110" />
<el-table-column show-overflow-tooltip prop="input_time" width="151" label="创建日期" />
</el-table>
<!--分页组件-->
<pagination />

View File

@@ -152,6 +152,16 @@
>
添加库存物料
</el-button>
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-arrow-down"
size="mini"
@click="Import"
>
物料信息导入
</el-button>
</span>
</div>
@@ -217,6 +227,7 @@
</el-table>
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged"/>
<StructDiv ref="child" :dialog-show.sync="structShow" @tableChanged="structChanged"/>
<UploadDialog :dialog-show.sync="viewShow" :stor-id="paramViewShow" @tableChanged="tableChanged"/>
</el-dialog>
</template>
@@ -226,6 +237,7 @@ import AddDtl from '@/views/wms/st/inStor/productscrap/AddDtl'
import productscrap from '@/views/wms/st/inStor/productscrap/productscrap'
import StructDiv from '@/views/wms/pub/StructDialog'
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
import UploadDialog from '@/views/wms/st/inStor/productscrap/UploadDialog'
const defaultForm = {
bill_code: '',
@@ -243,7 +255,7 @@ const defaultForm = {
}
export default {
name: 'AddDialog',
components: { AddDtl, StructDiv },
components: { AddDtl, StructDiv, UploadDialog },
mixins: [crud(), form(defaultForm)],
props: {
dialogShow: {
@@ -255,12 +267,14 @@ export default {
data() {
return {
dialogVisible: false,
viewShow: false,
dtlShow: false,
structShow: false,
structShow2: false,
flagnow: false,
nowrow: {},
nowindex: '',
paramViewShow: '',
storlist: [],
invtypelist: [],
storId: null,
@@ -461,6 +475,13 @@ export default {
this.form.tableData.splice(i, 1, this.form.tableData[i])
}
}
},
Import() {
if (!this.form.stor_id) {
return this.crud.notify('请先选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
}
this.paramViewShow = this.form.stor_id
this.viewShow = true
}
}
}

View File

@@ -0,0 +1,120 @@
<template>
<el-dialog
title="导入Excel文件"
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
width="400px"
:show-close="true"
@close="close"
@open="open"
>
<el-upload
ref="upload"
class="upload-demo"
action=""
drag
:on-exceed="is_one"
:limit="1"
:auto-upload="false"
:multiple="false"
:show-file-list="true"
:on-change="uploadByJsqd"
:file-list="fileList"
accept=".xlsx,.xls"
>
<i class="el-icon-upload" />
<div class="el-upload__text">
将文件拖到此处
<em>点击上传</em>
</div>
<div slot="tip" class="el-upload__tip">只能上传Excel文件且不超过10MB</div>
</el-upload>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</el-dialog>
</template>
<script>
import productscrap from '@/views/wms/st/inStor/productscrap/productscrap'
import CRUD, { crud } from '@crud/crud'
export default {
name: 'UploadDialog',
mixins: [crud()],
components: {},
props: {
dialogShow: {
type: Boolean,
default: false
},
openParam: {
type: String
},
storId: {
type: String
}
},
data() {
return {
dialogVisible: false,
fileList: [],
file1: ''
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
},
openParam: {
handler(newValue, oldValue) {
this.opendtlParam = newValue
}
}
},
methods: {
open() {
},
close() {
this.$emit('update:dialogShow', false)
},
is_one() {
this.crud.notify('只能上传一个excel文件', CRUD.NOTIFICATION_TYPE.WARNING)
},
// 文件校验方法
beforeAvatarUpload(file) {
// 不能导入大小超过2Mb的文件
if (file.size > 10 * 1024 * 1024) {
return false
}
return true
},
// 文件发生改变就会触发的事件
uploadByJsqd(file) {
this.file1 = file
},
submit() {
if (this.beforeAvatarUpload(this.file1)) {
this.fileList.name = this.file1.name
this.fileList.url = ''
var formdata = new FormData()
formdata.append('file', this.file1.raw)
formdata.set('stor_id', this.storId)
// excelImport请求接口 formdata传递参数
productscrap.excelImport(formdata).then((res) => {
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.$emit('tableChanged', res)
this.$emit('update:dialogShow', false)
})
} else {
this.crud.notify('文件过大请上传小于10MB的文件〜', CRUD.NOTIFICATION_TYPE.WARNING)
}
}
}
}
</script>

View File

@@ -159,6 +159,7 @@
<el-table-column prop="biz_date" label="业务日期" :min-width="flexWidth('biz_date',crud.data,'业务日期')"/>
<el-table-column label="明细数" prop="detail_count" :min-width="flexWidth('detail_count',crud.data,'明细数')"/>
<el-table-column label="总重量" prop="total_qty" :min-width="flexWidth('total_qty',crud.data,'总重量')"/>
<el-table-column prop="ext_code" label="外部标识" :min-width="flexWidth('ext_code',crud.data,'外部标识')"/>
<el-table-column prop="input_optname" label="创建人" :min-width="flexWidth('input_optname',crud.data,'创建人')"/>
<el-table-column prop="input_time" label="创建日期" :min-width="flexWidth('input_time',crud.data,'创建日期')"/>
<el-table-column prop="confirm_optname" label="确认人" :min-width="flexWidth('confirm_optname',crud.data,'确认人')"/>

View File

@@ -59,4 +59,11 @@ export function onSubmit(data) {
data
})
}
export default { add, edit, del, getOutBillDtl, auditPass, auditOut, onSubmit }
export function excelImport(data) {
return request({
url: 'api/productscrap/importExcel',
method: 'post',
data
})
}
export default { add, edit, del, getOutBillDtl, auditPass, auditOut, onSubmit, excelImport }

View File

@@ -114,7 +114,7 @@
</el-form-item>
</el-form>
<div class="crud-opts2">
<span class="role-span">不合格品明细</span>
<span class="role-span">改切明细</span>
<span v-if="crud.status.cu > 0" class="crud-opts-right2">
<!--左侧插槽-->
@@ -143,6 +143,7 @@
<el-table-column key="1" type="index" label="序号" width="50" align="center" />
<el-table-column key="3" prop="material_code" label="产品编码" width="150" align="center" />
<el-table-column key="4" prop="material_name" label="产品名称" align="center" min-width="200" />
<el-table-column key="5" prop="package_box_sn" label="木箱码" align="center" min-width="200" />
<el-table-column key="6" prop="pcsn" label="改切批次号" align="center" min-width="150" />
<el-table-column
key="10"
@@ -165,7 +166,6 @@
</el-table-column>
</el-table>
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged"/>
<StructDiv ref="child" :dialog-show.sync="structShow" @tableChanged="structChanged"/>
</el-dialog>
</template>
@@ -205,8 +205,6 @@ export default {
return {
dialogVisible: false,
dtlShow: false,
structShow: false,
structShow2: false,
flagnow: false,
nowrow: {},
nowindex: '',
@@ -272,22 +270,6 @@ export default {
}
})
},
custNameInput(val) {
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].storagevehicle_code === val.storagevehicle_code) {
this.$set(this.form.tableData[i], 'remark', val.remark)
this.form.tableData.splice(i, 1, this.form.tableData[i]) // 通过splice 替换数据 触发视图更新
}
}
},
custNameInput2(val) {
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].storagevehicle_code === val.storagevehicle_code) {
this.$set(this.form.tableData[i], 'fail_source', val.fail_source)
this.form.tableData.splice(i, 1, this.form.tableData[i]) // 通过splice 替换数据 触发视图更新
}
}
},
async queryDtl() {
if (!this.form.stor_id) {
return this.crud.notify('请先选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
@@ -295,19 +277,6 @@ export default {
this.storId = this.form.stor_id
this.dtlShow = true
},
allSend() {
if (this.form.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
for (let i = 0; i < this.form.tableData.length; i++) {
// this.$set(this.form.tableData[i], 'fail_source', this.form.fail_source)
if (this.form.tableData[i].is_used === '1') {
this.$set(this.form.tableData[i], 'remark', this.form.dtl_remark)
this.form.tableData.splice(i, 1, this.form.tableData[i]) // 通过splice 替换数据 触发视图更新
}
}
},
tableChanged(rows) {
const tablemap = new Map()
rows.forEach((item) => {
@@ -322,29 +291,16 @@ export default {
}
if (!this.flagnow) {
this.$set(item, 'edit', false)
this.$set(item, 'work_status', '10')
this.$set(item, 'turnin_sect_id', '')
this.$set(item, 'turnin_struct_id', '')
this.$set(item, 'turnin_sect_code', '')
this.$set(item, 'turnin_sect_name', '')
this.$set(item, 'turnin_struct_code', '')
this.$set(item, 'turnin_struct_name', '')
tablemap.set(item.stockrecord_id, item)
tablemap.set(item.pcsn, item)
}
} else {
this.$set(item, 'edit', false)
this.$set(item, 'work_status', '10')
this.$set(item, 'turnin_sect_id', '')
this.$set(item, 'turnin_struct_id', '')
this.$set(item, 'turnin_sect_code', '')
this.$set(item, 'turnin_sect_name', '')
this.$set(item, 'turnin_struct_code', '')
this.$set(item, 'turnin_struct_name', '')
tablemap.set(item.stockrecord_id, item)
tablemap.set(item.pcsn, item)
}
})
for (const value of tablemap.values()) {
value.pcsn = value.sap_pcsn
value.package_box_sn = value.storagevehicle_code
this.form.tableData.push(value)
}
this.form.detail_count = this.form.tableData.length
@@ -354,32 +310,6 @@ export default {
}
this.form.total_qty = qty
},
structChanged(row) {
debugger
let structflag = false
for (let i = 0; i < this.form.tableData.length; i++) {
if ((this.form.tableData[i].turnin_struct_id === row.struct_id) || (this.form.tableData[i].turnout_struct_id === row.struct_id)) {
structflag = true
}
}
if (structflag) {
this.crud.notify('该货位已被设置,不允许重复设置!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].storagevehicle_code === this.nowrow.storagevehicle_code) {
this.form.tableData[i].turnin_struct_id = row.struct_id
this.form.tableData[i].turnin_struct_code = row.struct_code
this.form.tableData[i].turnin_struct_name = row.struct_name
this.form.tableData[i].turnin_sect_id = row.sect_id
this.form.tableData[i].turnin_sect_code = row.sect_code
this.form.tableData[i].turnin_sect_name = row.sect_name
this.form.tableData.splice(i, 1, this.form.tableData[i]) // 通过splice 替换数据 触发视图更新
}
}
console.log(this.form.tableData)
},
deleteRow(index, rows) {
const storagevehicle_code = rows[index].storagevehicle_code
let len = rows.length
@@ -402,15 +332,6 @@ export default {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
},
changeIsUsed(item) {
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i]
if (item.storagevehicle_code === row.storagevehicle_code) {
row.is_used = item.is_used
this.form.tableData.splice(i, 1, this.form.tableData[i])
}
}
}
}
}

View File

@@ -116,16 +116,16 @@
<!--左侧插槽-->
<slot name="left"/>
<!-- <el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="queryDtl()"
>
添加库存物料
</el-button>-->
<!-- <el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="queryDtl()"
>
添加库存物料
</el-button>-->
</span>
</div>
@@ -140,8 +140,9 @@
<el-table-column key="1" type="selection" width="55"/>
<el-table-column key="2" type="index" label="序号" width="50" align="center"/>
<el-table-column key="3" prop="material_code" label="产品编码" width="150" align="center"/>
<el-table-column key="4" prop="material_name" label="产品名称" align="center" min-width="200"/>
<el-table-column key="6" prop="pcsn" label="改切批次号" align="center" min-width="150"/>
<el-table-column key="4" prop="material_name" label="产品名称" align="center"/>
<el-table-column key="5" prop="package_box_sn" label="号" align="center"/>
<el-table-column key="6" prop="pcsn" label="改切批次号" align="center"/>
<el-table-column
key="10"
prop="qty"

View File

@@ -142,7 +142,7 @@
<el-table-column show-overflow-tooltip width="150" prop="product_description" label="物料描述" />
<el-table-column show-overflow-tooltip prop="width" label="幅宽" />
<el-table-column show-overflow-tooltip prop="thickness" label="产品厚度" />
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="120" fixed="right">
<template scope="scope">
<el-button
type="danger"

View File

@@ -103,6 +103,24 @@
/>
</el-select>
</el-form-item>
<el-form-item label="交货单号">
<el-input
v-model="query.vbeln"
size="mini"
clearable
placeholder="交货单号"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="木箱号">
<el-input
v-model="query.box_no"
size="mini"
clearable
placeholder="木箱号"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="子卷号">
<el-input
v-model="query.pcsn"
@@ -207,7 +225,7 @@
</template>
</el-table-column>
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态" />
<el-table-column prop="stor_name" label="仓库" />
<el-table-column prop="stor_name" label="仓库" width="100px;"/>
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" :formatter="bill_typeFormat" label="业务类型" />
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
<el-table-column show-overflow-tooltip prop="create_mode" :formatter="create_modeFormat" label="生成方式" />
@@ -217,10 +235,11 @@
{{ fun(scope.row.total_qty) }}
</template>
</el-table-column>
<el-table-column label="交货单" align="center" prop="vbeln" width="150px" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="制单人" align="center" prop="input_optname" />
<el-table-column label="制单人" align="center" prop="input_optname" width="100px;"/>
<el-table-column label="制单时间" align="center" prop="input_time" width="150" />
<el-table-column label="修改人" align="center" prop="update_optname" />
<el-table-column label="修改人" align="center" prop="update_optname" width="100px;"/>
<el-table-column label="修改时间" align="center" prop="update_time" width="150" />
<el-table-column label="分配人" align="center" prop="dis_optname" width="140px" />
<el-table-column label="分配时间" align="center" prop="dis_time" width="150" />

View File

@@ -243,7 +243,7 @@
<span>{{ scope.row.remark }}</span>
</template>
</el-table-column>
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="160" fixed="right">
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="120" fixed="right">
<template scope="scope">
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index, form.tableData)" />
</template>
@@ -440,9 +440,8 @@ export default {
const data = {
'data': rows
}
checkoutbill.queryBox(data).then(res => {
res.forEach((item) => {
debugger
if(this.form.bill_type === '1011') {
rows.forEach((item) => {
if (this.form.tableData.length !== 0) {
this.flagnow = false
for (let i = 0; i < this.form.tableData.length; i++) {
@@ -451,18 +450,42 @@ export default {
}
}
if (!this.flagnow) {
item.edit = true
item.edit = false
this.form.tableData.splice(-1, 0, item)
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
}
} else {
item.edit = true
item.edit = false
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
})
} else {
checkoutbill.queryBox(data).then(res => {
res.forEach((item) => {
debugger
if (this.form.tableData.length !== 0) {
this.flagnow = false
for (let i = 0; i < this.form.tableData.length; i++) {
if (this.form.tableData[i].box_no === item.box_no && 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++) {

View File

@@ -61,6 +61,7 @@
</el-button>
<el-button
slot="left"
v-if="this.mstrow.bill_type !== '1011'"
class="filter-item"
:loading="loadingAlldiv"
type="primary"
@@ -73,6 +74,7 @@
</el-button>
<el-button
slot="left"
v-if="this.mstrow.bill_type !== '1011'"
class="filter-item"
type="primary"
icon="el-icon-check"
@@ -97,6 +99,7 @@
</el-button>
<el-button
slot="left"
v-if="this.mstrow.bill_type !== '1011'"
class="filter-item"
type="warning"
:loading="loadingSetAllPoint"
@@ -143,6 +146,7 @@
<el-form-item label="待分配" prop="unassign_qty">
<el-input-number
v-model="form2.unassign_qty"
style="width: 100px;"
:controls="false"
:precision="3"
:min="0"
@@ -152,6 +156,7 @@
<el-form-item label="已分配" prop="assign_qty">
<el-input-number
v-model="form2.assign_qty"
style="width: 100px;"
:controls="false"
:precision="3"
:min="0"
@@ -164,7 +169,7 @@
clearable
placeholder="请选择"
class="filter-item"
style="width: 200px;"
style="width: 150px;"
>
<el-option
v-for="item in pointList"
@@ -177,6 +182,20 @@
<el-form-item prop="checked">
<el-checkbox v-model="checked">是否异常出库</el-checkbox>
</el-form-item>
<el-form-item label="超期发货:" prop="is_overdue">
<el-radio v-model="rowmst.is_overdue" label="1" :disabled="rowmst.bill_status === '40'" @change="updataIsOverdue">不发超期</el-radio>
<el-radio v-model="rowmst.is_overdue" label="0" :disabled="rowmst.bill_status === '40'" @change="updataIsOverdue">发超期</el-radio>
</el-form-item>
<!--<el-form-item label="超期数量:" prop="assign_qty" v-if="rowmst.is_overdue === '1'">
<el-input-number
v-model="overdue_qyt"
style="width: 100px;"
:controls="false"
:precision="3"
:min="0"
disabled
/>
</el-form-item>-->
</el-form>
</div>
<span class="crud-opts-right2">
@@ -195,6 +214,7 @@
</el-button>-->
<el-button
slot="left"
v-if="this.mstrow.bill_type !== '1011'"
class="filter-item"
:loading="loadingSetPoint"
type="warning"
@@ -207,6 +227,7 @@
</el-button>
<el-button
slot="left"
v-if="this.mstrow.bill_type !== '1011'"
class="filter-item"
:loading="loadingSetAllPoint"
type="warning"
@@ -217,6 +238,19 @@
>
一键设置
</el-button>
<el-button
slot="left"
v-if="this.mstrow.bill_type === '1011'"
class="filter-item"
:loading="loadingSetAllPoint"
type="warning"
icon="el-icon-check"
:disabled="button5"
size="mini"
@click="saveUpdate"
>
保存修改
</el-button>
</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
@@ -227,11 +261,13 @@
style="width: 100%;"
max-height="400"
size="mini"
:row-style="rowStyle"
border
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@current-change="handleDisCurrentChange"
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="bill_status" label="状态" align="center" width="110px">
<template slot-scope="scope">
<el-select
@@ -249,16 +285,23 @@
</template>
</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="150px" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
<el-table-column prop="material_name" label="物料名称" width="170px" :min-width="flexWidth('material_name',crud.data,'物料名称')" />
<el-table-column prop="box_no" label="木箱号" width="250px" :min-width="flexWidth('box_no',crud.data,'木箱号')" />
<el-table-column prop="pcsn" label="子卷批次号" width="150px" :min-width="flexWidth('pcsn',crud.data,'子卷批次号')" />
<el-table-column prop="sap_pcsn" label="sap批次号" width="150px" :min-width="flexWidth('sap_pcsn',crud.data,'sap批次号')" />
<el-table-column show-overflow-tooltip prop="plan_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" />
<span v-show="mstrow.bill_type !== '1011'" >{{ parseFloat(scope.row.plan_qty).toFixed(3) }}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="struct_code" width="150px" label="仓位编码" align="center" />
<el-table-column show-overflow-tooltip prop="struct_name" width="150px" label="仓位名称" align="center" />
<el-table-column show-overflow-tooltip prop="is_overdue" width="150px" label="是否超期" align="center" :formatter="formatOverdue" />
<el-table-column show-overflow-tooltip prop="instorage_time" width="150px" label="入库时间" align="center" />
<el-table-column show-overflow-tooltip prop="task_code" width="150px" label="任务号" align="center" />
<el-table-column show-overflow-tooltip prop="point_code" width="150px" label="出库点" align="center" />
<el-table-column align="center" label="操作" width="160" fixed="right">
<el-table-column align="center" label="操作" width="120" fixed="right">
<template scope="scope">
<el-button :disabled="tabledisabled(scope.row)" type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.row)" />
</template>
@@ -266,7 +309,7 @@
</el-table>
</el-card>
<pointDialog ref="child" :dialog-show.sync="pointshow" :dialog-typedisable="typedisable" :dialog-areatype="areatype" @PointChanged="PointChanged" />
<StructIvt :dialog-show.sync="structshow" :stor-id="storId" :open-array="openParam" :rowmst="openRow" @StructIvtClosed="queryTableDtl" />
<StructIvt :dialog-show.sync="structshow" :stor-id="storId" :open-array="openParam" :rowmst="openRow" @StructIvtClosed="queryTableDtl2" />
</el-dialog>
</template>
@@ -282,7 +325,7 @@ export default {
name: 'DivDialog',
components: { PointDialog, StructIvt },
mixins: [crud()],
dicts: ['io_bill_status', 'ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_used', 'work_status', 'is_usable'],
dicts: ['io_bill_status', 'ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_used', 'work_status', 'is_usable', 'IS_OR_NOT'],
props: {
dialogShow: {
type: Boolean,
@@ -336,7 +379,8 @@ export default {
invtypelist: [],
pointList: [],
rules: {
}
},
overdue_qyt: 0
}
},
watch: {
@@ -391,6 +435,9 @@ export default {
ivt_levelFormat(row, column) {
return this.dict.label.ST_IVT_LEVEL[row.ivt_level]
},
formatOverdue(row, column) {
return this.dict.label.IS_OR_NOT[row.is_overdue]
},
is_activeFormat(row, column) {
return this.dict.label.is_usable[row.is_active]
},
@@ -461,6 +508,7 @@ export default {
row.cancel_type = '3'
checkoutbill.oneCancel(row).then(res => {
this.queryTableDtl()
this.updataIsOverdue()
})
},
handleDtlCurrentChange(current) {
@@ -520,6 +568,7 @@ export default {
checkoutbill.allDiv(this.mstrow).then(res => {
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.INFO)
this.queryTableDtl()
this.updataIsOverdue()
this.loadingAlldiv = false
}).catch(() => {
this.loadingAlldiv = false
@@ -530,15 +579,16 @@ export default {
// this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
// return
// }
this.loadingAlldiv = true
this.loadingAutodiv = true
if (this.currentRow.iostorinvdtl_id !== null) {
this.currentRow.div_type = '2'
this.currentRow.stor_id = this.rowmst.stor_id
checkoutbill.allDivOne(this.currentRow).then(res => {
this.queryTableDtl()
this.loadingAlldiv = false
this.updataIsOverdue()
this.loadingAutodiv = false
}).catch(() => {
this.loadingAlldiv = false
this.loadingAutodiv = false
})
}
},
@@ -547,6 +597,7 @@ export default {
this.mstrow.cancel_type = '1'
checkoutbill.allCancel(this.mstrow).then(res => {
this.queryTableDtl()
this.updataIsOverdue()
this.loadingAlldiv = false
}).catch(() => {
this.loadingAlldiv = false
@@ -560,6 +611,7 @@ export default {
checkoutbill.allCancel(this.currentRow).then(res => {
this.queryTableDtl()
this.loadingAlldiv = false
this.updataIsOverdue()
}).catch(() => {
this.loadingAlldiv = false
})
@@ -585,29 +637,6 @@ export default {
})
}
},
oneSetPoint() {
if (this.form2.point_code === '') {
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.currentDis.point_code) {
this.crud.notify('站点已设置!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.currentDis.work_status !== '00') {
this.crud.notify('任务已生成!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.currentDis.iostorinvdis_id !== null) {
this.currentDis.point_code = this.form2.point_code
checkoutbill.oneSetPoint(this.currentDis).then(res => {
this.queryTableDdis(this.currentDis.iostorinvdtl_id)
this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.INFO)
}).catch(() => {
this.currentDis.point_code = ''
})
}
},
oneSetPoint2() {
if (this.form2.point_code === '') {
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
@@ -657,6 +686,25 @@ export default {
this.loadingSetAllPoint = false
})
},
saveUpdate() {
if (this.tabledis.length === 0) {
this.crud.notify('分配明细为空!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.loadingSetAllPoint = true
const data = {
'dtl': this.currentRow,
'tabledis': this.tabledis
}
checkoutbill.saveUpdate(data).then(res => {
this.queryTableDtl()
this.queryTableDdis(this.currentRow.iostorinvdtl_id)
this.crud.notify('保存成功!', CRUD.NOTIFICATION_TYPE.INFO)
this.loadingSetAllPoint = false
}).catch(() => {
this.loadingSetAllPoint = false
})
},
allSetPointAllDtl() {
if (this.mstrow.stor_id !== '1582991156504039455') {
if (this.form2.point_code === '') {
@@ -672,7 +720,6 @@ export default {
'checked': this.checked,
'stor_id': this.mstrow.stor_id
}
debugger
checkoutbill.allSetPoint(data).then(res => {
this.queryTableDdis(this.currentRow.iostorinvdtl_id)
this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.INFO)
@@ -686,6 +733,10 @@ export default {
this.tableDtl = res
})
},
queryTableDtl2() {
this.queryTableDtl()
this.updataIsOverdue()
},
queryTableDdis(iostorinvdtl_id) {
checkoutbill.getOutBillDis2({ 'iostorinvdtl_id': iostorinvdtl_id, 'bill_status': '01' }).then(res => {
this.tabledis = res
@@ -702,6 +753,23 @@ export default {
return 'background: yellow'
}
}
},
rowStyle({ row, rowIndex }) {
const stylejson = {}
if (this.rowmst.is_overdue === '1') {
if (row.is_overdue === '1') {
stylejson.background = '#f3f071'
return stylejson
}
}
},
updataIsOverdue() {
this.rowmst.iostorinvdtl_id = this.currentRow.iostorinvdtl_id
checkoutbill.updataIsOverdue(this.rowmst).then(res => {
this.overdue_qyt = res.overdue_qyt
this.rowmst = res.mst
})
}
}
}

View File

@@ -0,0 +1,117 @@
<template>
<el-dialog
title="导入Excel文件"
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
width="400px"
:show-close="true"
@close="close"
@open="open"
>
<el-upload
ref="upload"
class="upload-demo"
action=""
drag
:on-exceed="is_one"
:limit="1"
:auto-upload="false"
:multiple="false"
:show-file-list="true"
:on-change="uploadByJsqd"
:file-list="fileList"
accept=".xlsx,.xls"
>
<i class="el-icon-upload" />
<div class="el-upload__text">
将文件拖到此处
<em>点击上传</em>
</div>
<div slot="tip" class="el-upload__tip">只能上传Excel文件且不超过10MB</div>
</el-upload>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
</span>
</el-dialog>
</template>
<script>
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
import CRUD, { crud } from '@crud/crud'
export default {
name: 'UploadDialog',
mixins: [crud()],
components: {},
props: {
dialogShow: {
type: Boolean,
default: false
},
openParam: {
type: String
}
},
data() {
return {
dialogVisible: false,
fileList: [],
file1: ''
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
},
openParam: {
handler(newValue, oldValue) {
this.opendtlParam = newValue
}
}
},
methods: {
open() {
},
close() {
this.$emit('update:dialogShow', false)
},
is_one() {
this.crud.notify('只能上传一个excel文件', CRUD.NOTIFICATION_TYPE.WARNING)
},
// 文件校验方法
beforeAvatarUpload(file) {
// 不能导入大小超过2Mb的文件
if (file.size > 10 * 1024 * 1024) {
return false
}
return true
},
// 文件发生改变就会触发的事件
uploadByJsqd(file) {
this.file1 = file
},
submit() {
debugger
if (this.beforeAvatarUpload(this.file1)) {
this.fileList.name = this.file1.name
this.fileList.url = ''
var formdata = new FormData()
formdata.append('file', this.file1.raw)
// excelImport请求接口 formdata传递参数
checkoutbill.excelImport(formdata).then((res) => {
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.$emit('tableChanged', null)
this.$emit('update:dialogShow', false)
})
} else {
this.crud.notify('文件过大请上传小于10MB的文件〜', CRUD.NOTIFICATION_TYPE.WARNING)
}
}
}
}
</script>

View File

@@ -166,7 +166,9 @@
<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="sect_name" label="区域" align="center" show-overflow-tooltip />
<!-- <el-table-column prop="next_point_code" label="目的位置" align="center" />-->
<el-table-column show-overflow-tooltip prop="instorage_time" width="150px" label="入库时间" align="center" />
<el-table-column show-overflow-tooltip prop="is_overdue" width="150px" label="是否超期" align="center" :formatter="formatOverdue"/>
<!-- <el-table-column prop="next_point_code" label="目的位置" align="center" />-->
<!-- <el-table-column prop="task_code" label="任务号" align="center" />-->
<!-- <el-table-column prop="task_type" label="任务类型" align="center" width="150px" :formatter="taskdtl_typeFormat" />-->
<el-table-column prop="task_status" label="状态" align="center" width="110px" :formatter="task_statusFormat" />
@@ -187,7 +189,7 @@ export default {
name: 'ViewDialog',
components: { },
mixins: [crud()],
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL','ST_INV_OUT_TYPE', 'INANDOUT_BILL_TYPE'],
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL','ST_INV_OUT_TYPE', 'INANDOUT_BILL_TYPE', 'IS_OR_NOT'],
props: {
dialogShow: {
type: Boolean,
@@ -246,6 +248,9 @@ export default {
taskdtl_typeFormat(row) {
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
},
formatOverdue(row, column) {
return this.dict.label.IS_OR_NOT[row.is_overdue]
},
task_statusFormat(row) {
return this.dict.label.task_status[row.task_status]
},

View File

@@ -241,4 +241,25 @@ export function outReturn(data) {
data
})
}
export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, getOutBillDis2, setPoint, oneSetPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType, allDivOne, moneySubmit, getDisNum, queryBox, getOutBillTask2, oneCancel, cancelTask, allSetPoint, oneSetPoint2, outReturn }
export function updataIsOverdue(data) {
return request({
url: '/api/checkoutbill/updataIsOverdue',
method: 'post',
data
})
}
export function excelImport(data) {
return request({
url: '/api/checkoutbill/importExcel',
method: 'post',
data
})
}
export function saveUpdate(data) {
return request({
url: '/api/checkoutbill/saveUpdate',
method: 'post',
data
})
}
export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, getOutBillDis2, setPoint, oneSetPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType, allDivOne, moneySubmit, getDisNum, queryBox, getOutBillTask2, oneCancel, cancelTask, allSetPoint, oneSetPoint2, outReturn, updataIsOverdue, excelImport, saveUpdate }

View File

@@ -104,6 +104,15 @@
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="木箱号">
<el-input
v-model="query.box_no"
size="mini"
clearable
placeholder="木箱号"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="子卷批次">
<el-input
v-model="query.pcsn"
@@ -242,6 +251,16 @@
>
导出Excel
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="Import"
>
导入运费
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
@@ -310,6 +329,7 @@
<el-table-column show-overflow-tooltip label="交货单号" align="center" prop="vbeln" width="100" />
<el-table-column show-overflow-tooltip label="是否回传" align="center" prop="is_upload" width="80" :formatter="formatIsUpload" />
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
<el-table-column show-overflow-tooltip :formatter="isOverdue" prop="is_overdue" label="是否超期发货('否'为正常库存发货)" width="220" />
<el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="100" />
<el-table-column show-overflow-tooltip label="制单人" align="center" prop="input_optname" />
<el-table-column show-overflow-tooltip label="制单时间" align="center" prop="input_time" width="140" />
@@ -328,6 +348,7 @@
<DivDialog :dialog-show.sync="divShow" :open-array="openParam" :stor-id="storId" :rowmst="mstrow" @DivChanged="querytable" />
<TaskDialog :dialog-show.sync="taskShow" :open-array="openParam" :rowmst="mstrow" @TaskChanged="querytable" />
<MoneyDialog :dialog-show.sync="openMoneyDialog" :open-param-money="openParamMoney" />
<UploadDialog :dialog-show.sync="uploadDialogShow" @tableChanged="tableChanged"/>
</div>
</template>
@@ -340,6 +361,7 @@ import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import AddDialog from '@/views/wms/st/outbill/AddDialog'
import MoneyDialog from '@/views/wms/st/outbill/MoneyDialog'
import UploadDialog from '@/views/wms/st/outbill/UploadDialog'
import DivDialog from '@/views/wms/st/outbill/DivDialog'
import TaskDialog from '@/views/wms/st/outbill/TaskDialog'
import ViewDialog from '@/views/wms/st/outbill/ViewDialog'
@@ -351,7 +373,7 @@ const start = new Date()
export default {
name: 'Checkoutbill',
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DivDialog, TaskDialog, MoneyDialog },
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DivDialog, TaskDialog, MoneyDialog, UploadDialog },
cruds() {
return CRUD({ title: '用户', idField: 'iostorinv_id', url: 'api/checkoutbill', crudMethod: { ...checkoutbill },
optShow: {
@@ -366,7 +388,7 @@ export default {
},
mixins: [presenter(), header(), crud()],
// 数据字典
dicts: ['io_bill_status', 'ST_CREATE_MODE', 'ST_INV_OUT_TYPE', 'is_upload'],
dicts: ['io_bill_status', 'ST_CREATE_MODE', 'ST_INV_OUT_TYPE', 'is_upload', 'IS_OR_NOT'],
data() {
return {
height: document.documentElement.clientHeight - 180 + 'px;',
@@ -389,6 +411,7 @@ export default {
openParamMoney: null,
mstrow: {},
viewShow: false,
uploadDialogShow: false,
currentRow: null,
checkrows: [],
storlist: [],
@@ -501,6 +524,9 @@ export default {
create_modeFormat(row) {
return this.dict.label.ST_CREATE_MODE[row.create_mode]
},
isOverdue(row) {
return this.dict.label.IS_OR_NOT[row.is_overdue]
},
handleCurrentChange(current) {
if (current === null) {
this.dis_flag = true
@@ -607,6 +633,12 @@ export default {
}).catch(() => {
crud.downloadLoading = false
})
},
Import() {
this.uploadDialogShow = true
},
tableChanged() {
this.crud.toQuery()
}
}
}