Merge branch 'master' into b_lms2
This commit is contained in:
@@ -36,18 +36,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="synchronize()"
|
||||
>
|
||||
同步
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<crudOperation/>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
@@ -349,15 +338,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
synchronize() {
|
||||
this.fullscreenLoading = true
|
||||
crudMaterialbase.synchronize(this.crud.query).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('同步成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
|
||||
@@ -40,14 +40,6 @@ export function isAlongMaterType(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function synchronize(data) {
|
||||
return request({
|
||||
url: 'api/Materialbase/synchronize',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getProductSeries() {
|
||||
return request({
|
||||
url: 'api/Materialbase/getProductSeries',
|
||||
@@ -55,4 +47,4 @@ export function getProductSeries() {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getMaterOptType, isAlongMaterType, synchronize, getProductSeries }
|
||||
export default { add, edit, del, getMaterOptType, isAlongMaterType, getProductSeries }
|
||||
|
||||
170
lms/nladmin-ui/src/views/wms/basedata/master/sales/index.vue
Normal file
170
lms/nladmin-ui/src/views/wms/basedata/master/sales/index.vue
Normal file
@@ -0,0 +1,170 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
style="width: 300px"
|
||||
size="mini"
|
||||
placeholder="输入单位编码或单位名称"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
<rrOperation />
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="编码" prop="sales_code">
|
||||
<el-input v-model="form.sales_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="sales_name">
|
||||
<el-input v-model="form.sales_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域" prop="area">
|
||||
<el-select
|
||||
v-model="form.area"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IVT_REIGION"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="is_active">
|
||||
<el-radio v-model="form.is_active" label="0">否</el-radio>
|
||||
<el-radio v-model="form.is_active" label="1">是</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column prop="sales_code" label="编码" />
|
||||
<el-table-column prop="sales_name" label="名称" />
|
||||
<el-table-column prop="area" label="区域" width="135" :formatter="formateArea"/>
|
||||
<el-table-column prop="is_active" label="启用 ">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.is_active"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="changeEnabled(scope.row, scope.row.is_active)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-permission="['admin','mdPbMeasureunit:edit','mdPbMeasureunit:del']" fixed="right" label="操作" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudSales from '@/views/wms/basedata/master/sales/sales'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
const defaultForm = { sales_id: null, sales_code: null, sales_name: null, area: null, is_active: null }
|
||||
export default {
|
||||
dicts: ['is_used', 'IVT_REIGION'],
|
||||
name: 'Sales',
|
||||
// eslint-disable-next-line vue/no-unused-components
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '业务员',
|
||||
url: 'api/sales',
|
||||
optShow: {
|
||||
add: true,
|
||||
reset: true
|
||||
},
|
||||
idField: 'sales_id',
|
||||
sort: 'sales_code,desc',
|
||||
crudMethod: { ...crudSales }})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
sales_code: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
sales_name: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_active: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
]
|
||||
}}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
// 改变状态
|
||||
changeEnabled(data, val) {
|
||||
this.$confirm('此操作将 "' + this.dict.label.is_used[val] + '" ' + data.sales_code + ', 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudSales.edit(data).then(res => {
|
||||
this.crud.notify(this.dict.label.is_used[val] + '成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
if (data.is_active === '0') {
|
||||
data.is_active = '1'
|
||||
return
|
||||
}
|
||||
if (data.is_active === '1') {
|
||||
data.is_active = '0'
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
if (data.is_active === '0') {
|
||||
data.is_active = '1'
|
||||
return
|
||||
}
|
||||
if (data.is_active === '1') {
|
||||
data.is_active = '0'
|
||||
}
|
||||
})
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log(value)
|
||||
},
|
||||
formateArea(row) {
|
||||
return this.dict.label.IVT_REIGION[row.area]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
35
lms/nladmin-ui/src/views/wms/basedata/master/sales/sales.js
Normal file
35
lms/nladmin-ui/src/views/wms/basedata/master/sales/sales.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/sales',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/sales/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/sales',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getUnit(params) {
|
||||
return request({
|
||||
url: 'api/sales/getUnit',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getUnit }
|
||||
116
lms/nladmin-ui/src/views/wms/basedata/st/ivt/UploadDialog.vue
Normal file
116
lms/nladmin-ui/src/views/wms/basedata/st/ivt/UploadDialog.vue
Normal file
@@ -0,0 +1,116 @@
|
||||
<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 crudStructivt from '@/views/wms/basedata/st/ivt/structivt'
|
||||
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() {
|
||||
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:传递参数
|
||||
crudStructivt.excelImport(formdata).then((res) => {
|
||||
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.$emit('tableChanged', '')
|
||||
this.$emit('update:dialogShow', false)
|
||||
})
|
||||
} else {
|
||||
this.crud.notify('文件过大,请上传小于10MB的文件〜', CRUD.NOTIFICATION_TYPE.WARNING)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -136,6 +136,25 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="子卷状态">
|
||||
<el-select
|
||||
v-model="query.sub_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.SUB_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="库存类型">
|
||||
<el-select
|
||||
v-model="query.ivt_flag"
|
||||
@@ -155,7 +174,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
<rrOperation :crud="crud"/>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
@@ -170,39 +189,65 @@
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-arrow-down"
|
||||
size="mini"
|
||||
@click="Import"
|
||||
>
|
||||
超期信息导入
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="struct_code" label="仓位编码" :min-width="flexWidth('struct_code',crud.data,'仓位编码')" />
|
||||
<el-table-column prop="struct_name" label="仓位名称" :min-width="flexWidth('struct_name',crud.data,'仓位名称')" />
|
||||
<el-table-column prop="stor_name" label="仓库" :min-width="flexWidth('stor_name',crud.data,'仓库')" />
|
||||
<el-table-column prop="sect_name" label="库区" :min-width="flexWidth('sect_name',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="region_name" label="下料区域" min-width="120" show-overflow-tooltip />-->
|
||||
<!-- <el-table-column prop="quality_scode" label="品质类型" min-width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.ST_QUALITY_SCODE[scope.row.quality_scode] }}
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column prop="package_box_sn" label="木箱码" :min-width="flexWidth('package_box_sn',crud.data,'木箱码')" />
|
||||
<el-table-column prop="quanlity_in_box" label="子卷数" :min-width="flexWidth('quanlity_in_box',crud.data,'子卷数')" />
|
||||
<el-table-column prop="pcsn" label="子卷号" :min-width="flexWidth('pcsn',crud.data,'子卷号')" />
|
||||
<el-table-column prop="sap_pcsn" label="sap批次" :min-width="flexWidth('sap_pcsn',crud.data,'sap批次')" />
|
||||
<el-table-column prop="box_weight" label="毛重" :formatter="rounding2" />
|
||||
<el-table-column prop="canuse_qty" label="可用数" :formatter="rounding" />
|
||||
<el-table-column prop="frozen_qty" label="冻结数" :formatter="rounding" />
|
||||
<el-table-column prop="ivt_qty" label="库存数" :formatter="rounding" />
|
||||
<el-table-column prop="warehousing_qty" label="待入数" :formatter="rounding" />
|
||||
<el-table-column prop="unit_name" label="计量单位" />
|
||||
<el-table-column prop="instorage_time" label="入库时间" min-width="150" />
|
||||
<el-table-column prop="paper_type" label="管件类型" min-width="150" />
|
||||
<el-table-column prop="paper_code" label="管件编码" min-width="150" />
|
||||
<el-table-column prop="paper_name" label="管件描述" min-width="250" />
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column prop="struct_code" label="仓位编码"
|
||||
:min-width="flexWidth('struct_code',crud.data,'仓位编码')"
|
||||
/>
|
||||
<el-table-column prop="struct_name" label="仓位名称"
|
||||
:min-width="flexWidth('struct_name',crud.data,'仓位名称')"
|
||||
/>
|
||||
<el-table-column prop="stor_name" label="仓库" :min-width="flexWidth('stor_name',crud.data,'仓库')"/>
|
||||
<el-table-column prop="sect_name" label="库区" :min-width="flexWidth('sect_name',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="region_name" label="下料区域" min-width="120" show-overflow-tooltip />-->
|
||||
<!-- <el-table-column prop="quality_scode" label="品质类型" min-width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.ST_QUALITY_SCODE[scope.row.quality_scode] }}
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column prop="package_box_sn" label="木箱码"
|
||||
:min-width="flexWidth('package_box_sn',crud.data,'木箱码')"
|
||||
/>
|
||||
<el-table-column prop="quanlity_in_box" label="子卷数"
|
||||
:min-width="flexWidth('quanlity_in_box',crud.data,'子卷数')"
|
||||
/>
|
||||
<el-table-column prop="pcsn" label="子卷号" :min-width="flexWidth('pcsn',crud.data,'子卷号')"/>
|
||||
<el-table-column prop="sap_pcsn" label="sap批次" :min-width="flexWidth('sap_pcsn',crud.data,'sap批次')"/>
|
||||
<el-table-column prop="box_weight" label="毛重" :formatter="rounding2"/>
|
||||
<el-table-column prop="canuse_qty" label="可用数" :formatter="rounding"/>
|
||||
<el-table-column prop="frozen_qty" label="冻结数" :formatter="rounding"/>
|
||||
<el-table-column prop="ivt_qty" label="库存数" :formatter="rounding"/>
|
||||
<el-table-column prop="warehousing_qty" label="待入数" :formatter="rounding"/>
|
||||
<el-table-column prop="unit_name" label="计量单位"/>
|
||||
<el-table-column prop="instorage_time" label="入库时间" min-width="150"/>
|
||||
<el-table-column prop="sub_type" label="子卷状态" min-width="150" :formatter="formatSubType"/>
|
||||
<el-table-column prop="stock_age" label="生产时长(天)" min-width="120" />
|
||||
<el-table-column prop="paper_type" label="管件类型" min-width="150"/>
|
||||
<el-table-column prop="paper_code" label="管件编码" min-width="150"/>
|
||||
<el-table-column prop="paper_name" label="管件描述" min-width="250"/>
|
||||
<el-table-column prop="remark" label="超期原因" min-width="250">
|
||||
<template scope="scope">
|
||||
<!-- <el-input v-model="scope.row.remark" style="width: 200px" />-->
|
||||
<!-- <el-input v-model="scope.row.remark" style="width: 200px" />-->
|
||||
<el-select
|
||||
v-model="scope.row.remark"
|
||||
clearable
|
||||
@@ -222,13 +267,16 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="120" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click.native.prevent="save(scope.row)" />
|
||||
<el-button type="primary" class="filter-item" size="mini" icon="el-icon-edit"
|
||||
@click.native.prevent="save(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<pagination/>
|
||||
</div>
|
||||
<UploadDialog :dialog-show.sync="viewShow" @tableChanged="querytable"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -240,17 +288,37 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import UploadDialog from '@/views/wms/basedata/st/ivt/UploadDialog'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
const defaultForm = { stockrecord_id: null, cascader: null, struct_id: null, struct_code: null, struct_name: null, workprocedure_id: null, material_id: null, material_code: null, quality_scode: null, pcsn: null, canuse_qty: null, frozen_qty: null, ivt_qty: null, warehousing_qty: null, qty_unit_id: null, instorage_time: null, sale_id: null }
|
||||
const defaultForm = {
|
||||
stockrecord_id: null,
|
||||
cascader: null,
|
||||
struct_id: null,
|
||||
struct_code: null,
|
||||
struct_name: null,
|
||||
workprocedure_id: null,
|
||||
material_id: null,
|
||||
material_code: null,
|
||||
quality_scode: null,
|
||||
pcsn: null,
|
||||
canuse_qty: null,
|
||||
frozen_qty: null,
|
||||
ivt_qty: null,
|
||||
warehousing_qty: null,
|
||||
qty_unit_id: null,
|
||||
instorage_time: null,
|
||||
sale_id: null
|
||||
}
|
||||
export default {
|
||||
name: 'Structivt',
|
||||
dicts: ['ST_QUALITY_SCODE', 'product_area', 'IS_OR_NOT'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
dicts: ['ST_QUALITY_SCODE', 'product_area', 'IS_OR_NOT', 'SUB_TYPE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, UploadDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '库存管理', url: 'api/structivt', idField: 'stockrecord_id', sort: 'stockrecord_id,desc',
|
||||
return CRUD({
|
||||
title: '库存管理', url: 'api/structivt', idField: 'stockrecord_id', sort: 'stockrecord_id,desc',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
@@ -258,11 +326,13 @@ export default {
|
||||
download: false,
|
||||
reset: true
|
||||
},
|
||||
crudMethod: { ...crudStructivt }})
|
||||
crudMethod: { ...crudStructivt }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sects: [],
|
||||
viewShow: false,
|
||||
ivtStatusList: [
|
||||
{ 'value': 'canuse_qty', 'label': '可用数' },
|
||||
{ 'value': 'warehousing_qty', 'label': '待入数' },
|
||||
@@ -278,10 +348,8 @@ export default {
|
||||
{ 'value': '2', 'label': '生产质量原因' },
|
||||
{ 'value': '3', 'label': '市场原因' }
|
||||
],
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
permission: {},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -301,6 +369,9 @@ export default {
|
||||
return parseFloat(row[column.property]).toFixed(2)
|
||||
}
|
||||
},
|
||||
formatSubType(row) {
|
||||
return this.dict.label.SUB_TYPE[row.sub_type]
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
@@ -324,6 +395,9 @@ export default {
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
@@ -335,6 +409,9 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
Import() {
|
||||
this.viewShow = true
|
||||
},
|
||||
save(row) {
|
||||
crudStructivt.save(row).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
|
||||
@@ -54,4 +54,12 @@ export function save(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getStruct, getStructById, getUnits, save }
|
||||
export function excelImport(data) {
|
||||
return request({
|
||||
url: 'api/structivt/importExcel',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getStruct, getStructById, getUnits, save, excelImport }
|
||||
|
||||
@@ -42,14 +42,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属部门" prop="sysdeptid">
|
||||
<treeselect
|
||||
v-model="form.sysdeptid"
|
||||
:options="depts"
|
||||
:load-options="loadDepts"
|
||||
style="width: 200px"
|
||||
placeholder="选择部门"
|
||||
/>
|
||||
<el-form-item label="外部标识">
|
||||
<el-input v-model="form.ext_id" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -100,13 +94,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="外部标识">
|
||||
<el-input v-model="form.ext_id" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-form-item label="仓库类型" required>
|
||||
<el-col :span="4" />
|
||||
@@ -291,9 +278,6 @@ export default {
|
||||
stor_name: [
|
||||
{ required: true, message: '仓库名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
sysdeptid: [
|
||||
{ required: true, message: '所属部门不能为空', trigger: 'blur' }
|
||||
],
|
||||
stor_capacity: [
|
||||
{ required: false, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-if="dialogShow"
|
||||
title="仓位信息"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="handleClose"
|
||||
width="1100px"
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<el-form ref="form3" :model="formMst" :rules="rules" size="mini" label-width="130px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所属库区:">
|
||||
<el-cascader
|
||||
placeholder="所属库区"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="仓位前缀:">
|
||||
<el-input v-model="formMst.prefix" placeholder="如:91、B21、C31等" size="mini" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生成数量:">
|
||||
<el-input-number :precision="0" :step="1" :min="1" :max="90000" v-model="formMst.num" size="mini" :controls="false" style="width: 210px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" type="primary" :loading="loadingBut" @click="oneCreate">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import crudStructattr from '@/views/wms/basedata/st/struct/structattr'
|
||||
|
||||
export default {
|
||||
name: 'SunShowDialog',
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formMst: {
|
||||
stor_id: '',
|
||||
sect_id: '',
|
||||
prefix: '',
|
||||
num: 0
|
||||
},
|
||||
sects: [],
|
||||
dialogVisible: false,
|
||||
loadingBut: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudUserStor.getSect({ 'stor_id': '' }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done()
|
||||
})
|
||||
.catch(_ => {
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$refs['form3'].resetFields()
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
if (val.length === 1) {
|
||||
this.formMst.stor_id = val[0]
|
||||
this.formMst.sect_id = ''
|
||||
}
|
||||
if (val.length === 0) {
|
||||
this.formMst.sect_id = ''
|
||||
this.formMst.stor_id = ''
|
||||
}
|
||||
if (val.length === 2) {
|
||||
this.formMst.stor_id = val[0]
|
||||
this.formMst.sect_id = val[1]
|
||||
}
|
||||
},
|
||||
oneCreate() {
|
||||
if (this.formMst.sect_id === '') {
|
||||
return this.crud.notify('库区不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
|
||||
if (this.formMst.num === '') {
|
||||
return this.crud.notify('数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
this.loadingBut = true
|
||||
crudStructattr.oneCreate(this.formMst).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.close()
|
||||
this.crud.toQuery()
|
||||
this.loadingBut = false
|
||||
}).catch(() => {
|
||||
this.loadingBut = false
|
||||
})
|
||||
},
|
||||
blurQuery() {
|
||||
this.loadingBut = true
|
||||
crudStructattr.blurQuery({ 'prefix': this.formMst.prefix }).then(res => {
|
||||
this.crud.notify('可使用此前缀!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.loadingBut = false
|
||||
}).catch(() => {
|
||||
this.loadingBut = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -37,6 +37,39 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="立库层数">
|
||||
<el-select
|
||||
v-model="query.layer_num"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="层数"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in layerList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否空位">
|
||||
<el-select
|
||||
v-model="query.is_have"
|
||||
clearable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in isHaveList"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="模糊搜索">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
@@ -60,7 +93,18 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="openOneCreate"
|
||||
>
|
||||
一键生成
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
@@ -272,6 +316,8 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<OneCreateDialog :dialog-show.sync="openOneCreateDialog" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -282,6 +328,9 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import OneCreateDialog from '@/views/wms/basedata/st/struct/OneCreateDialog'
|
||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
||||
import crudUserStor, { getSect } from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
/* import checkoutbill from "@/api/wms/st/core/outbill/checkoutbill";*/
|
||||
|
||||
@@ -359,9 +408,19 @@ export default {
|
||||
}
|
||||
}
|
||||
return {
|
||||
openOneCreateDialog: false,
|
||||
sects: [],
|
||||
invtypelist: [],
|
||||
permission: {},
|
||||
layerList: [
|
||||
{ 'label': '1层', 'value': '1' },
|
||||
{ 'label': '2层', 'value': '2' },
|
||||
{ 'label': '3层', 'value': '3' }
|
||||
],
|
||||
isHaveList: [
|
||||
{ 'label': '空位', 'value': '1' },
|
||||
{ 'label': '有货', 'value': '2' }
|
||||
],
|
||||
rules: {
|
||||
struct_id: [
|
||||
{ required: true, message: '仓位标识不能为空', trigger: 'blur' }
|
||||
@@ -423,6 +482,9 @@ export default {
|
||||
sectChange(val) {
|
||||
this.form.sect_id = val[1]
|
||||
},
|
||||
openOneCreate() {
|
||||
this.openOneCreateDialog = true
|
||||
},
|
||||
invtypeFormat(row) {
|
||||
for (const item of this.invtypelist) {
|
||||
if (item.code === row.inv_type) {
|
||||
|
||||
@@ -32,4 +32,20 @@ export function changeActive(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive }
|
||||
export function oneCreate(data) {
|
||||
return request({
|
||||
url: 'api/structattr/oneCreate',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function blurQuery(data) {
|
||||
return request({
|
||||
url: 'api/structattr/blurQuery',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive, oneCreate, blurQuery }
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="update_time" label="修改时间" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="update_time" label="修改时间" min-width="151" show-overflow-tooltip />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
|
||||
@@ -158,6 +158,7 @@
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="point_code" label="点位编码" width="100px" />
|
||||
<el-table-column prop="label" label="点位类型" width="100px" />
|
||||
<el-table-column prop="product_area" label="生产区域">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.product_area[scope.row.product_area] }}
|
||||
@@ -173,7 +174,7 @@
|
||||
{{ dict.label.is_used[scope.row.is_used] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="update_time" label="修改时间" show-overflow-tooltip />
|
||||
<el-table-column prop="update_time" label="修改时间" show-overflow-tooltip width="150px;"/>
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
|
||||
@@ -467,7 +467,7 @@
|
||||
<el-table-column prop="is_child_tz_ok" label="子卷套轴完成" width="100px" :formatter="formatChildName"/>
|
||||
<el-table-column prop="is_child_ps_ok" label="子卷配送完成" width="100px" :formatter="formatChildPsName"/>
|
||||
<el-table-column prop="is_call" label="是否呼叫" width="100px" :formatter="formatChildCallName"/>
|
||||
<el-table-column prop="qzzno" label="气涨轴编码" width="150px"/>
|
||||
<el-table-column prop="qzzno" label="气涨轴编码" width="160px"/>
|
||||
<el-table-column prop="start_time" label="开始时间" width="150px"/>
|
||||
<el-table-column prop="end_time" label="结束时间" width="150px"/>
|
||||
<!-- <el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
>
|
||||
仓位同步
|
||||
</el-button>-->
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
@@ -208,7 +208,7 @@
|
||||
@click="downdtl"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</el-button>-->
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
@@ -427,6 +427,8 @@ export default {
|
||||
crudPoint.getRegion().then(res => {
|
||||
this.regionList = res
|
||||
})
|
||||
this.$set(this.query, 'region_id', '1582991348217286656')
|
||||
this.crud.toQuery()
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 />
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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,'确认人')"/>
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
117
lms/nladmin-ui/src/views/wms/st/outbill/UploadDialog.vue
Normal file
117
lms/nladmin-ui/src/views/wms/st/outbill/UploadDialog.vue
Normal 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>
|
||||
|
||||
@@ -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]
|
||||
},
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,17 +129,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
|
||||
@@ -153,6 +142,17 @@
|
||||
/>
|
||||
</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-switch
|
||||
v-model="query.is_sid"
|
||||
@@ -213,7 +213,7 @@
|
||||
<el-table-column show-overflow-tooltip prop="date_of_fg_inbound" label="入库日期" :min-width="flexWidth('date_of_fg_inbound',crud.data,'入库日期')" />
|
||||
<el-table-column show-overflow-tooltip prop="box_weight" label="木箱自身重量" :min-width="flexWidth('box_weight',crud.data,'木箱自身重量')" />
|
||||
<el-table-column show-overflow-tooltip prop="quality_guaran_period" label="保质期" :min-width="flexWidth('quality_guaran_period',crud.data,'保质期')" />
|
||||
<el-table-column show-overflow-tooltip prop="un_plan_product_property1" label="子卷的悟性值1" :min-width="flexWidth('un_plan_product_property1',crud.data,'子卷的悟性值1')" />
|
||||
<el-table-column show-overflow-tooltip prop="un_plan_product_property1" label="子卷的悟性值1" width="2100px;" />
|
||||
<el-table-column show-overflow-tooltip prop="un_plan_product_property2" label="子卷的悟性值2" :min-width="flexWidth('un_plan_product_property2',crud.data,'子卷的悟性值2')" />
|
||||
<el-table-column show-overflow-tooltip prop="un_plan_product_property3" label="子卷的悟性值3" :min-width="flexWidth('un_plan_product_property3',crud.data,'子卷的悟性值3')" />
|
||||
<el-table-column show-overflow-tooltip prop="box_type" label="木箱料号" :min-width="flexWidth('box_type',crud.data,'木箱料号')" />
|
||||
|
||||
@@ -96,25 +96,15 @@
|
||||
<el-table ref="table" :cell-style="cellStyleMst" show-summary :summary-method="getSum" :max-height="590" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column prop="stor_name" label="仓库"/>
|
||||
<el-table-column prop="sect_date" label="日期" width="100px" />
|
||||
<!-- <el-table-column prop="class_code" label="物料分类编码" width="100px" />-->
|
||||
<!-- <el-table-column prop="class_name" label="物料分类名称" width="100px" />-->
|
||||
<el-table-column prop="material_code" label="物料编码" min-width="150" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="150" show-overflow-tooltip/>
|
||||
<el-table-column prop="material_model" label="规格/型号" min-width="150" show-overflow-tooltip/>
|
||||
<el-table-column prop="unit_name" label="主单位"/>
|
||||
<el-table-column prop="pcsn" label="批次号" min-width="140" show-overflow-tooltip/>
|
||||
<el-table-column prop="sap_pcsn" label="sap批次" min-width="120" show-overflow-tooltip/>
|
||||
<el-table-column prop="package_box_sn" label="木箱号" width="250px" min-width="120" show-overflow-tooltip/>
|
||||
|
||||
<!-- <el-table-column prop="dept_name" label="所属组织" min-width="120" show-overflow-tooltip/>-->
|
||||
<!-- <el-table-column prop="quality_scode" label="品质类型" :formatter="formatQualityName" />-->
|
||||
<!-- <el-table-column prop="ivt_level" label="质量等级" :formatter="formatIvtName" />-->
|
||||
<!-- <el-table-column prop="is_active" label="是否可用" :formatter="formatIsName" />-->
|
||||
<el-table-column prop="start_num" label="期初主数量" :formatter="crud.formatNum3" width="100px" />
|
||||
<el-table-column prop="in_num" label="入库主数量" :formatter="crud.formatNum3" width="100px" />
|
||||
<el-table-column prop="out_num" label="出库主数量" :formatter="crud.formatNum3" width="100px" />
|
||||
<!-- <el-table-column prop="less_num" label="其他出" :formatter="crud.formatNum3"/>-->
|
||||
<!-- <el-table-column prop="more_num" label="其他入" :formatter="crud.formatNum3"/>-->
|
||||
<el-table-column prop="end_num" label="结存主数量" :formatter="crud.formatNum3" width="100px" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
|
||||
Reference in New Issue
Block a user