装箱单业务
This commit is contained in:
parent
042af26e29
commit
531496cd60
@ -42,3 +42,12 @@ export function delPackage(packageId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//添加子箱
|
||||||
|
export function addSubPackage(data){
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/package/addsub',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
44
src/api/mes/wm/packageline.js
Normal file
44
src/api/mes/wm/packageline.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询装箱明细列表
|
||||||
|
export function listPackageline(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/packageline/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询装箱明细详细
|
||||||
|
export function getPackageline(lineId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/packageline/' + lineId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增装箱明细
|
||||||
|
export function addPackageline(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/packageline',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改装箱明细
|
||||||
|
export function updatePackageline(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/packageline',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除装箱明细
|
||||||
|
export function delPackageline(lineId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/packageline/' + lineId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
44
src/api/mes/wm/rtsalseline.js
Normal file
44
src/api/mes/wm/rtsalseline.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询产品销售退货行列表
|
||||||
|
export function listRtsalseline(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/rtsalseline/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询产品销售退货行详细
|
||||||
|
export function getRtsalseline(lineId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/rtsalseline/' + lineId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增产品销售退货行
|
||||||
|
export function addRtsalseline(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/rtsalseline',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改产品销售退货行
|
||||||
|
export function updateRtsalseline(data) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/rtsalseline',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除产品销售退货行
|
||||||
|
export function delRtsalseline(lineId) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/wm/rtsalseline/' + lineId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
247
src/components/package/single.vue
Normal file
247
src/components/package/single.vue
Normal file
@ -0,0 +1,247 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="子箱选择"
|
||||||
|
v-if="showFlag"
|
||||||
|
:visible.sync="showFlag"
|
||||||
|
:modal= false
|
||||||
|
width="80%"
|
||||||
|
center
|
||||||
|
>
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
|
|
||||||
|
<el-form-item label="装箱单编号" prop="packageCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.packageCode"
|
||||||
|
placeholder="请输入装箱单编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="条码内容" prop="barcodeContent">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.barcodeContent"
|
||||||
|
placeholder="请输入条码内容"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="销售订单编号" prop="soCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.soCode"
|
||||||
|
placeholder="请输入销售订单编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户名称" prop="clientName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.clientName"
|
||||||
|
placeholder="请输入客户名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="检查员名称" prop="inspectorName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.inspectorName"
|
||||||
|
placeholder="请输入检查员名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="packageList" @current-change="handleCurrent" @row-dblclick="handleRowDbClick">
|
||||||
|
<el-table-column width="55" align="center" >
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-radio v-model="selectedPackageId" :label="scope.row.packageId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="装箱单编号" width="150px" align="center" prop="packageCode" />
|
||||||
|
<el-table-column label="装箱日期" align="center" prop="packageDate" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.packageDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="销售订单编号" width="100px" align="center" prop="soCode" />
|
||||||
|
<el-table-column label="发票编号" align="center" prop="invoiceCode" />
|
||||||
|
<el-table-column label="客户编码" align="center" prop="clientCode" />
|
||||||
|
<el-table-column label="客户名称" width="120px" align="center" prop="clientName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="箱长度" align="center" prop="packageLength" />
|
||||||
|
<el-table-column label="箱宽度" align="center" prop="packageWidth" />
|
||||||
|
<el-table-column label="箱高度" align="center" prop="packageHeight" />
|
||||||
|
<el-table-column label="尺寸单位" align="center" prop="sizeUnit" />
|
||||||
|
<el-table-column label="净重" align="center" prop="netWeight" />
|
||||||
|
<el-table-column label="毛重" align="center" prop="crossWeight" />
|
||||||
|
<el-table-column label="重量单位" align="center" prop="weightUnit" />
|
||||||
|
<el-table-column label="检查员" align="center" prop="inspectorName" />
|
||||||
|
<el-table-column label="是否启用" align="center" prop="enableFlag">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['mes:wm:package:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['mes:wm:package:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="confirmSelect">确 定</el-button>
|
||||||
|
<el-button @click="showFlag=false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listPackage} from "@/api/mes/wm/package";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "PackageSelectSingle",
|
||||||
|
dicts: ['sys_yes_no'],
|
||||||
|
props: {
|
||||||
|
parentId: null,
|
||||||
|
clientId: null,
|
||||||
|
clientCode: null
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showFlag:false,
|
||||||
|
selectedPackageId: undefined,
|
||||||
|
selectedRow: undefined,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 装箱单表格数据
|
||||||
|
packageList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
parentId: this.parentId,
|
||||||
|
ancestors: '0',//没有父包装的才能添加
|
||||||
|
packageCode: null,
|
||||||
|
barcodeId: null,
|
||||||
|
barcodeContent: null,
|
||||||
|
barcodeUrl: null,
|
||||||
|
packageDate: null,
|
||||||
|
soCode: null,
|
||||||
|
invoiceCode: null,
|
||||||
|
clientId: this.clientId,
|
||||||
|
clientCode: this.clientCode,
|
||||||
|
clientName: null,
|
||||||
|
clientNick: null,
|
||||||
|
packageLength: null,
|
||||||
|
packageWidth: null,
|
||||||
|
packageHeight: null,
|
||||||
|
sizeUnit: null,
|
||||||
|
netWeight: null,
|
||||||
|
crossWeight: null,
|
||||||
|
weightUnit: null,
|
||||||
|
inspector: null,
|
||||||
|
inspectorName: null,
|
||||||
|
enableFlag: null,
|
||||||
|
status: 'FINISHED'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询装箱单列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPackage(this.queryParams).then(response => {
|
||||||
|
this.packageList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
handleCurrent(row){
|
||||||
|
if(row){
|
||||||
|
this.selectedRow = row;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//行双击选中
|
||||||
|
handleRowDbClick(row){
|
||||||
|
if(row){
|
||||||
|
this.selectedRow = row;
|
||||||
|
this.$emit('onSelected',this.selectedRow);
|
||||||
|
this.showFlag = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 单选选中数据
|
||||||
|
handleRowChange(row) {
|
||||||
|
debugger;
|
||||||
|
if(row){
|
||||||
|
this.selectedRow = row;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//确定选中
|
||||||
|
confirmSelect(){
|
||||||
|
if(this.selectedPackageId ==null || this.selectedPackageId==0){
|
||||||
|
this.$notify({
|
||||||
|
title:'提示',
|
||||||
|
type:'warning',
|
||||||
|
message: '请至少选择一条数据!'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$emit('onSelected',this.selectedRow);
|
||||||
|
this.showFlag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -59,34 +59,24 @@
|
|||||||
v-hasPermi="['mes:wm:package:add']"
|
v-hasPermi="['mes:wm:package:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['mes:wm:package:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['mes:wm:package:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="packageList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="packageList"
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
row-key="packageId"
|
||||||
<el-table-column label="装箱单编号" width="100px" align="center" prop="packageCode" />
|
default-expand-all
|
||||||
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table-column label="装箱单编号" width="180px" align="center" prop="packageCode" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['mes:wm:package:query']"
|
||||||
|
>{{scope.row.packageCode}}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="装箱日期" align="center" prop="packageDate" width="120">
|
<el-table-column label="装箱日期" align="center" prop="packageDate" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.packageDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.packageDate, '{y}-{m}-{d}') }}</span>
|
||||||
@ -95,7 +85,7 @@
|
|||||||
<el-table-column label="销售订单编号" width="100px" align="center" prop="soCode" />
|
<el-table-column label="销售订单编号" width="100px" align="center" prop="soCode" />
|
||||||
<el-table-column label="发票编号" align="center" prop="invoiceCode" />
|
<el-table-column label="发票编号" align="center" prop="invoiceCode" />
|
||||||
<el-table-column label="客户编码" align="center" prop="clientCode" />
|
<el-table-column label="客户编码" align="center" prop="clientCode" />
|
||||||
<el-table-column label="客户名称" align="center" prop="clientName" />
|
<el-table-column label="客户名称" width="120px" align="center" prop="clientName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="箱长度" align="center" prop="packageLength" />
|
<el-table-column label="箱长度" align="center" prop="packageLength" />
|
||||||
<el-table-column label="箱宽度" align="center" prop="packageWidth" />
|
<el-table-column label="箱宽度" align="center" prop="packageWidth" />
|
||||||
<el-table-column label="箱高度" align="center" prop="packageHeight" />
|
<el-table-column label="箱高度" align="center" prop="packageHeight" />
|
||||||
@ -104,9 +94,9 @@
|
|||||||
<el-table-column label="毛重" align="center" prop="crossWeight" />
|
<el-table-column label="毛重" align="center" prop="crossWeight" />
|
||||||
<el-table-column label="重量单位" align="center" prop="weightUnit" />
|
<el-table-column label="重量单位" align="center" prop="weightUnit" />
|
||||||
<el-table-column label="检查员" align="center" prop="inspectorName" />
|
<el-table-column label="检查员" align="center" prop="inspectorName" />
|
||||||
<el-table-column label="是否启用" align="center" prop="enableFlag">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.enableFlag"/>
|
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
@ -117,6 +107,7 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['mes:wm:package:edit']"
|
v-hasPermi="['mes:wm:package:edit']"
|
||||||
|
v-if="scope.row.status =='PREPARE'"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -124,6 +115,7 @@
|
|||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['mes:wm:package:remove']"
|
v-hasPermi="['mes:wm:package:remove']"
|
||||||
|
v-if="scope.row.status =='PREPARE'"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -262,8 +254,18 @@
|
|||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-tabs type="border-card" v-if="form.packageId !=null">
|
||||||
|
<el-tab-pane label="子箱">
|
||||||
|
<SubPackage ref="subPackge" :parentId="form.packageId" :optType="optType"></SubPackage>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="装箱清单">
|
||||||
|
<Packageline ref="packageLine" :packageId="form.packageId" :optType="optType"></Packageline>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="cancel" v-if="optType =='view' || form.status !='PREPARE' ">返回</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm" v-if="form.status =='PREPARE' && optType !='view' ">保 存</el-button>
|
||||||
|
<el-button type="success" @click="doconfirm" v-if="form.status =='PREPARE' && optType !='view' && form.packageId !=null">完成</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -273,13 +275,17 @@
|
|||||||
<script>
|
<script>
|
||||||
import { listPackage, getPackage, delPackage, addPackage, updatePackage } from "@/api/mes/wm/package";
|
import { listPackage, getPackage, delPackage, addPackage, updatePackage } from "@/api/mes/wm/package";
|
||||||
import ClientSelect from "@/components/clientSelect/single.vue";
|
import ClientSelect from "@/components/clientSelect/single.vue";
|
||||||
|
import Packageline from "./line.vue";
|
||||||
|
import SubPackage from "./subpackge.vue";
|
||||||
import { listAllUnitmeasure} from "@/api/mes/md/unitmeasure";
|
import { listAllUnitmeasure} from "@/api/mes/md/unitmeasure";
|
||||||
import {genCode} from "@/api/system/autocode/rule"
|
import {genCode} from "@/api/system/autocode/rule"
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
export default {
|
export default {
|
||||||
name: "Package",
|
name: "Package",
|
||||||
dicts: ['sys_yes_no'],
|
dicts: ['mes_order_status'],
|
||||||
components: {
|
components: {
|
||||||
ClientSelect
|
ClientSelect,Packageline,SubPackage,Treeselect
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -359,11 +365,22 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listPackage(this.queryParams).then(response => {
|
listPackage(this.queryParams).then(response => {
|
||||||
this.packageList = response.rows;
|
this.packageList =this.handleTree(response.rows, "packageId", "parentId");
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/** 转换生产工单数据结构 */
|
||||||
|
normalizer(node) {
|
||||||
|
if (node.children && !node.children.length) {
|
||||||
|
delete node.children;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id: node.packageId,
|
||||||
|
label: node.packageCode,
|
||||||
|
children: node.children
|
||||||
|
};
|
||||||
|
},
|
||||||
//获取单位
|
//获取单位
|
||||||
getUnits(){
|
getUnits(){
|
||||||
listAllUnitmeasure().then(response =>{
|
listAllUnitmeasure().then(response =>{
|
||||||
@ -385,7 +402,7 @@ export default {
|
|||||||
barcodeId: null,
|
barcodeId: null,
|
||||||
barcodeContent: null,
|
barcodeContent: null,
|
||||||
barcodeUrl: null,
|
barcodeUrl: null,
|
||||||
packageDate: null,
|
packageDate: new Date(),
|
||||||
soCode: null,
|
soCode: null,
|
||||||
invoiceCode: null,
|
invoiceCode: null,
|
||||||
clientId: null,
|
clientId: null,
|
||||||
@ -451,6 +468,17 @@ export default {
|
|||||||
this.title = "添加装箱单";
|
this.title = "添加装箱单";
|
||||||
this.optType="add";
|
this.optType="add";
|
||||||
},
|
},
|
||||||
|
// 查询明细按钮操作
|
||||||
|
handleView(row){
|
||||||
|
this.reset();
|
||||||
|
const packageIds = row.packageId
|
||||||
|
getPackage(packageIds).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "查看装箱单信息";
|
||||||
|
this.optType = "view";
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
@ -482,6 +510,14 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//完成
|
||||||
|
doconfirm(){
|
||||||
|
let that = this;
|
||||||
|
this.$modal.confirm('是否完成装箱单编制?【完成后将不能更改】').then(function(){
|
||||||
|
that.form.status = 'FINISHED';
|
||||||
|
that.submitForm();
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const packageIds = row.packageId || this.ids;
|
const packageIds = row.packageId || this.ids;
|
||||||
|
349
src/views/mes/wm/package/line.vue
Normal file
349
src/views/mes/wm/package/line.vue
Normal file
@ -0,0 +1,349 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="10" v-if="optType !='view'" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['mes:wm:packageline:add']"
|
||||||
|
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['mes:wm:packageline:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="packagelineList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" />
|
||||||
|
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="规格型号" width="150px" align="center" prop="specification" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
||||||
|
<el-table-column label="装箱数量" align="center" prop="quantityPackage" />
|
||||||
|
<el-table-column label="生产工单编号" width="150px" align="center" prop="workorderCode" />
|
||||||
|
<el-table-column label="批次号" align="center" prop="batchCode" />
|
||||||
|
<el-table-column label="有效期" align="center" prop="expireDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.expireDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" v-if="optType !='view'" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['mes:wm:packageline:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['mes:wm:packageline:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改装箱明细对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="生产工单编号" prop="workorderCode">
|
||||||
|
<el-input v-model="form.workorderCode" placeholder="请输入生产工单编号" >
|
||||||
|
<el-button slot="append" icon="el-icon-search" @click="handleWorkorderSelect"></el-button>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<WorkorderSelect ref="woSelect" @onSelected="onWorkorderSelected"></WorkorderSelect>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="批次号" prop="batchCode">
|
||||||
|
<el-input v-model="form.batchCode" readonly="readonly" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="装箱数量" prop="quantityPackage">
|
||||||
|
<el-input-number :min="0" v-model="form.quantityPackage" placeholder="请输入装箱数量" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="产品物料编码" prop="itemCode">
|
||||||
|
<el-input v-model="form.itemCode" readonly="readonly" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="产品物料名称" prop="itemName">
|
||||||
|
<el-input v-model="form.itemName" readonly="readonly" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="单位" prop="unitOfMeasure">
|
||||||
|
<el-input v-model="form.unitOfMeasure" readonly="readonly" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="规格型号" prop="specification">
|
||||||
|
<el-input v-model="form.specification" type="textarea" readonly="readonly" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listPackageline, getPackageline, delPackageline, addPackageline, updatePackageline } from "@/api/mes/wm/packageline";
|
||||||
|
import WorkorderSelect from "@/components/workorderSelect/single.vue"
|
||||||
|
export default {
|
||||||
|
name: "Packageline",
|
||||||
|
components: {
|
||||||
|
WorkorderSelect
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
packageId: null,
|
||||||
|
optType: null
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 装箱明细表格数据
|
||||||
|
packagelineList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
packageId: this.packageId,
|
||||||
|
materialStockId: null,
|
||||||
|
itemId: null,
|
||||||
|
itemCode: null,
|
||||||
|
itemName: null,
|
||||||
|
specification: null,
|
||||||
|
unitOfMeasure: null,
|
||||||
|
quantityPackage: null,
|
||||||
|
workorderId: null,
|
||||||
|
workorderCode: null,
|
||||||
|
batchCode: null,
|
||||||
|
warehouseId: null,
|
||||||
|
warehouseCode: null,
|
||||||
|
warehouseName: null,
|
||||||
|
locationId: null,
|
||||||
|
locationCode: null,
|
||||||
|
locationName: null,
|
||||||
|
areaId: null,
|
||||||
|
areaCode: null,
|
||||||
|
areaName: null,
|
||||||
|
expireDate: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
packageId: [
|
||||||
|
{ required: true, message: "装箱单ID不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
itemId: [
|
||||||
|
{ required: true, message: "产品物料ID不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
quantityPackage: [
|
||||||
|
{ required: true, message: "装箱数量不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询装箱明细列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPackageline(this.queryParams).then(response => {
|
||||||
|
this.packagelineList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
lineId: null,
|
||||||
|
packageId: this.packageId,
|
||||||
|
materialStockId: null,
|
||||||
|
itemId: null,
|
||||||
|
itemCode: null,
|
||||||
|
itemName: null,
|
||||||
|
specification: null,
|
||||||
|
unitOfMeasure: null,
|
||||||
|
quantityPackage: null,
|
||||||
|
workorderId: null,
|
||||||
|
workorderCode: null,
|
||||||
|
batchCode: null,
|
||||||
|
warehouseId: null,
|
||||||
|
warehouseCode: null,
|
||||||
|
warehouseName: null,
|
||||||
|
locationId: null,
|
||||||
|
locationCode: null,
|
||||||
|
locationName: null,
|
||||||
|
areaId: null,
|
||||||
|
areaCode: null,
|
||||||
|
areaName: null,
|
||||||
|
expireDate: null,
|
||||||
|
remark: null,
|
||||||
|
attr1: null,
|
||||||
|
attr2: null,
|
||||||
|
attr3: null,
|
||||||
|
attr4: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.lineId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
//选择生产工单
|
||||||
|
handleWorkorderSelect(){
|
||||||
|
this.$refs.woSelect.showFlag = true;
|
||||||
|
},
|
||||||
|
onWorkorderSelected(row){
|
||||||
|
if(row != undefined && row != null){
|
||||||
|
this.form.workorderId = row.workorderId;
|
||||||
|
this.form.workorderCode = row.workorderCode;
|
||||||
|
this.form.workorderName = row.workorderName;
|
||||||
|
this.form.itemId = row.productId;
|
||||||
|
this.form.itemCode = row.productCode;
|
||||||
|
this.form.itemName = row.productName;
|
||||||
|
this.form.specification = row.specification;
|
||||||
|
this.form.unitOfMeasure = row.unitOfMeasure;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加装箱明细";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const lineId = row.lineId || this.ids
|
||||||
|
getPackageline(lineId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改装箱明细";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.lineId != null) {
|
||||||
|
updatePackageline(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addPackageline(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const lineIds = row.lineId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除装箱明细编号为"' + lineIds + '"的数据项?').then(function() {
|
||||||
|
return delPackageline(lineIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('wm/packageline/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `packageline_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
209
src/views/mes/wm/package/subpackge.vue
Normal file
209
src/views/mes/wm/package/subpackge.vue
Normal file
@ -0,0 +1,209 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="10" v-if="optType !='view'" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['mes:wm:package:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['mes:wm:package:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
<PackageSelectSingle ref="packageSelect" @onSelected="onPackageSelected"></PackageSelectSingle>
|
||||||
|
<el-table v-loading="loading" :data="packageList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="装箱单编号" width="150px" align="center" prop="packageCode" />
|
||||||
|
<el-table-column label="装箱日期" align="center" prop="packageDate" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.packageDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="销售订单编号" width="100px" align="center" prop="soCode" />
|
||||||
|
<el-table-column label="客户编码" align="center" prop="clientCode" />
|
||||||
|
<el-table-column label="客户名称" width="120px" align="center" prop="clientName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="箱长度" align="center" prop="packageLength" />
|
||||||
|
<el-table-column label="箱宽度" align="center" prop="packageWidth" />
|
||||||
|
<el-table-column label="箱高度" align="center" prop="packageHeight" />
|
||||||
|
<el-table-column label="尺寸单位" align="center" prop="sizeUnit" />
|
||||||
|
<el-table-column label="净重" align="center" prop="netWeight" />
|
||||||
|
<el-table-column label="毛重" align="center" prop="crossWeight" />
|
||||||
|
<el-table-column label="重量单位" align="center" prop="weightUnit" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['mes:wm:package:remove']"
|
||||||
|
v-if="optType !='view'"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listPackage, delPackage, addSubPackage} from "@/api/mes/wm/package";
|
||||||
|
import PackageSelectSingle from "@/components/package/single.vue";
|
||||||
|
export default {
|
||||||
|
name: "SubPackage",
|
||||||
|
dicts: ['sys_yes_no'],
|
||||||
|
components: {PackageSelectSingle},
|
||||||
|
props: {
|
||||||
|
parentId: null,
|
||||||
|
optType: null
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 装箱单表格数据
|
||||||
|
packageList: [],
|
||||||
|
//单位数据
|
||||||
|
measureOptions: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
parentId: this.parentId,
|
||||||
|
ancestors: null,
|
||||||
|
packageCode: null,
|
||||||
|
barcodeId: null,
|
||||||
|
barcodeContent: null,
|
||||||
|
barcodeUrl: null,
|
||||||
|
packageDate: null,
|
||||||
|
soCode: null,
|
||||||
|
invoiceCode: null,
|
||||||
|
clientId: null,
|
||||||
|
clientCode: null,
|
||||||
|
clientName: null,
|
||||||
|
clientNick: null,
|
||||||
|
packageLength: null,
|
||||||
|
packageWidth: null,
|
||||||
|
packageHeight: null,
|
||||||
|
sizeUnit: null,
|
||||||
|
netWeight: null,
|
||||||
|
crossWeight: null,
|
||||||
|
weightUnit: null,
|
||||||
|
inspector: null,
|
||||||
|
inspectorName: null,
|
||||||
|
enableFlag: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
packageCode: [
|
||||||
|
{ required: true, message: "箱不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询装箱单列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listPackage(this.queryParams).then(response => {
|
||||||
|
this.packageList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.packageId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.$refs.packageSelect.showFlag=true;
|
||||||
|
},
|
||||||
|
/**选择装箱单返回 */
|
||||||
|
onPackageSelected(obj){
|
||||||
|
var subpackage = {
|
||||||
|
packageId: obj.packageId,
|
||||||
|
parentId: this.parentId
|
||||||
|
}
|
||||||
|
addSubPackage(subpackage).then(response => {
|
||||||
|
this.$modal.msgSuccess("添加成功");
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const packageIds = row.packageId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除装箱单编号为"' + packageIds + '"的数据项?').then(function() {
|
||||||
|
return delPackage(packageIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -438,6 +438,14 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//完成单据
|
||||||
|
doconfirm(){
|
||||||
|
let that = this;
|
||||||
|
this.$modal.confirm('是否完成入库单编制?【完成后将不能更改】').then(function(){
|
||||||
|
that.form.status = 'CONFIRMED';
|
||||||
|
that.submitForm();
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const recptIds = row.recptId || this.ids;
|
const recptIds = row.recptId || this.ids;
|
||||||
|
507
src/views/mes/wm/rtsalse/line.vue
Normal file
507
src/views/mes/wm/rtsalse/line.vue
Normal file
@ -0,0 +1,507 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="退货单ID" prop="rtId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.rtId"
|
||||||
|
placeholder="请输入退货单ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品物料ID" prop="itemId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.itemId"
|
||||||
|
placeholder="请输入产品物料ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品物料编码" prop="itemCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.itemCode"
|
||||||
|
placeholder="请输入产品物料编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品物料名称" prop="itemName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.itemName"
|
||||||
|
placeholder="请输入产品物料名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单位" prop="unitOfMeasure">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.unitOfMeasure"
|
||||||
|
placeholder="请输入单位"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="退货数量" prop="quantityRted">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.quantityRted"
|
||||||
|
placeholder="请输入退货数量"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="批次号" prop="batchCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.batchCode"
|
||||||
|
placeholder="请输入批次号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="仓库ID" prop="warehouseId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.warehouseId"
|
||||||
|
placeholder="请输入仓库ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="仓库编码" prop="warehouseCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.warehouseCode"
|
||||||
|
placeholder="请输入仓库编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="仓库名称" prop="warehouseName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.warehouseName"
|
||||||
|
placeholder="请输入仓库名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库区ID" prop="locationId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.locationId"
|
||||||
|
placeholder="请输入库区ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库区编码" prop="locationCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.locationCode"
|
||||||
|
placeholder="请输入库区编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库区名称" prop="locationName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.locationName"
|
||||||
|
placeholder="请输入库区名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库位ID" prop="areaId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.areaId"
|
||||||
|
placeholder="请输入库位ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库位编码" prop="areaCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.areaCode"
|
||||||
|
placeholder="请输入库位编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库位名称" prop="areaName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.areaName"
|
||||||
|
placeholder="请输入库位名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="有效期" prop="expireDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.expireDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择有效期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['wm:rtsalseline:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['wm:rtsalseline:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['wm:rtsalseline:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['wm:rtsalseline:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="rtsalselineList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="行ID" align="center" prop="lineId" />
|
||||||
|
<el-table-column label="退货单ID" align="center" prop="rtId" />
|
||||||
|
<el-table-column label="产品物料ID" align="center" prop="itemId" />
|
||||||
|
<el-table-column label="产品物料编码" align="center" prop="itemCode" />
|
||||||
|
<el-table-column label="产品物料名称" align="center" prop="itemName" />
|
||||||
|
<el-table-column label="规格型号" align="center" prop="specification" />
|
||||||
|
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
|
||||||
|
<el-table-column label="退货数量" align="center" prop="quantityRted" />
|
||||||
|
<el-table-column label="批次号" align="center" prop="batchCode" />
|
||||||
|
<el-table-column label="仓库ID" align="center" prop="warehouseId" />
|
||||||
|
<el-table-column label="仓库编码" align="center" prop="warehouseCode" />
|
||||||
|
<el-table-column label="仓库名称" align="center" prop="warehouseName" />
|
||||||
|
<el-table-column label="库区ID" align="center" prop="locationId" />
|
||||||
|
<el-table-column label="库区编码" align="center" prop="locationCode" />
|
||||||
|
<el-table-column label="库区名称" align="center" prop="locationName" />
|
||||||
|
<el-table-column label="库位ID" align="center" prop="areaId" />
|
||||||
|
<el-table-column label="库位编码" align="center" prop="areaCode" />
|
||||||
|
<el-table-column label="库位名称" align="center" prop="areaName" />
|
||||||
|
<el-table-column label="有效期" align="center" prop="expireDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.expireDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['wm:rtsalseline:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['wm:rtsalseline:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改产品销售退货行对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="退货单ID" prop="rtId">
|
||||||
|
<el-input v-model="form.rtId" placeholder="请输入退货单ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品物料ID" prop="itemId">
|
||||||
|
<el-input v-model="form.itemId" placeholder="请输入产品物料ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品物料编码" prop="itemCode">
|
||||||
|
<el-input v-model="form.itemCode" placeholder="请输入产品物料编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品物料名称" prop="itemName">
|
||||||
|
<el-input v-model="form.itemName" placeholder="请输入产品物料名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规格型号" prop="specification">
|
||||||
|
<el-input v-model="form.specification" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单位" prop="unitOfMeasure">
|
||||||
|
<el-input v-model="form.unitOfMeasure" placeholder="请输入单位" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="退货数量" prop="quantityRted">
|
||||||
|
<el-input v-model="form.quantityRted" placeholder="请输入退货数量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="批次号" prop="batchCode">
|
||||||
|
<el-input v-model="form.batchCode" placeholder="请输入批次号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="仓库ID" prop="warehouseId">
|
||||||
|
<el-input v-model="form.warehouseId" placeholder="请输入仓库ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="仓库编码" prop="warehouseCode">
|
||||||
|
<el-input v-model="form.warehouseCode" placeholder="请输入仓库编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="仓库名称" prop="warehouseName">
|
||||||
|
<el-input v-model="form.warehouseName" placeholder="请输入仓库名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库区ID" prop="locationId">
|
||||||
|
<el-input v-model="form.locationId" placeholder="请输入库区ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库区编码" prop="locationCode">
|
||||||
|
<el-input v-model="form.locationCode" placeholder="请输入库区编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库区名称" prop="locationName">
|
||||||
|
<el-input v-model="form.locationName" placeholder="请输入库区名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库位ID" prop="areaId">
|
||||||
|
<el-input v-model="form.areaId" placeholder="请输入库位ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库位编码" prop="areaCode">
|
||||||
|
<el-input v-model="form.areaCode" placeholder="请输入库位编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库位名称" prop="areaName">
|
||||||
|
<el-input v-model="form.areaName" placeholder="请输入库位名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="有效期" prop="expireDate">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.expireDate"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择有效期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listRtsalseline, getRtsalseline, delRtsalseline, addRtsalseline, updateRtsalseline } from "@/api/mes/wm/rtsalseline";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Rtsalseline",
|
||||||
|
props: {
|
||||||
|
rtId: null,
|
||||||
|
optType: null,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 产品销售退货行表格数据
|
||||||
|
rtsalselineList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
rtId: this.rtId,
|
||||||
|
itemId: null,
|
||||||
|
itemCode: null,
|
||||||
|
itemName: null,
|
||||||
|
specification: null,
|
||||||
|
unitOfMeasure: null,
|
||||||
|
quantityRted: null,
|
||||||
|
batchCode: null,
|
||||||
|
warehouseId: null,
|
||||||
|
warehouseCode: null,
|
||||||
|
warehouseName: null,
|
||||||
|
locationId: null,
|
||||||
|
locationCode: null,
|
||||||
|
locationName: null,
|
||||||
|
areaId: null,
|
||||||
|
areaCode: null,
|
||||||
|
areaName: null,
|
||||||
|
expireDate: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
itemId: [
|
||||||
|
{ required: true, message: "产品物料ID不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
quantityRted: [
|
||||||
|
{ required: true, message: "退货数量不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询产品销售退货行列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listRtsalseline(this.queryParams).then(response => {
|
||||||
|
this.rtsalselineList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
lineId: null,
|
||||||
|
rtId: null,
|
||||||
|
itemId: null,
|
||||||
|
itemCode: null,
|
||||||
|
itemName: null,
|
||||||
|
specification: null,
|
||||||
|
unitOfMeasure: null,
|
||||||
|
quantityRted: null,
|
||||||
|
batchCode: null,
|
||||||
|
warehouseId: null,
|
||||||
|
warehouseCode: null,
|
||||||
|
warehouseName: null,
|
||||||
|
locationId: null,
|
||||||
|
locationCode: null,
|
||||||
|
locationName: null,
|
||||||
|
areaId: null,
|
||||||
|
areaCode: null,
|
||||||
|
areaName: null,
|
||||||
|
expireDate: null,
|
||||||
|
remark: null,
|
||||||
|
attr1: null,
|
||||||
|
attr2: null,
|
||||||
|
attr3: null,
|
||||||
|
attr4: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.lineId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加产品销售退货行";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const lineId = row.lineId || this.ids
|
||||||
|
getRtsalseline(lineId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改产品销售退货行";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.lineId != null) {
|
||||||
|
updateRtsalseline(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addRtsalseline(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const lineIds = row.lineId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除产品销售退货行编号为"' + lineIds + '"的数据项?').then(function() {
|
||||||
|
return delRtsalseline(lineIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('wm/rtsalseline/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `rtsalseline_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user