新增销售订单物流信息 #5
593
god-ui/src/views/wmsSaleOrder/wmsSaleLogistics/index.vue
Normal file
593
god-ui/src/views/wmsSaleOrder/wmsSaleLogistics/index.vue
Normal file
@ -0,0 +1,593 @@
|
||||
<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="商品类型" prop="productType">
|
||||
<el-select v-model="queryParams.productType" placeholder="请选择商品类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.wms_good_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="orderCode">
|
||||
<el-input
|
||||
v-model="queryParams.orderCode"
|
||||
placeholder="请输入订单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="运送状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择运送状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.wms_transport_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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="['wmsSaleOrder:wmsSaleOrder: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="['wmsSaleOrder:wmsSaleOrder: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="['wmsSaleOrder:wmsSaleOrder: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="['wmsSaleOrder:wmsSaleOrder:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="wmsSaleOrderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<!--<el-table-column label="主键id" align="center" prop="id" />-->
|
||||
<el-table-column label="订单编号" align="center" prop="orderCode" width="150"/>
|
||||
<el-table-column label="商品类型" align="center" prop="productType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_good_type" :value="scope.row.productType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品型号" align="center" prop="handledOrg" width="200"/>
|
||||
<el-table-column label="物流单号" align="center" prop="creditCode" width="150"/>
|
||||
<el-table-column label="运输工具" align="center" prop="customerName" width="150"/>
|
||||
<el-table-column label="车牌号" align="center" prop="customerNum" width="150"/>
|
||||
<el-table-column label="配送路线" align="center" prop="registAddr" width="200"/>
|
||||
<!--<el-table-column label="联系人" align="center" prop="contactPerson"/>-->
|
||||
<el-table-column label="送货员" align="center" prop="handledBy"/>
|
||||
<el-table-column label="联系电话" align="center" prop="contactPhone" width="150"/>
|
||||
<el-table-column label="运送状态" align="center" prop="orderStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_transport_type" :value="scope.row.orderStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新时间" align="center" prop="orderDate" width="150"/>
|
||||
<!--<el-table-column label="开户户名" align="center" prop="accountName"/>–>
|
||||
<el-table-column label="开户银行" align="center" prop="accountBank" width="230"/>
|
||||
<!–<el-table-column label="银行账户" align="center" prop="accountNumber"/>–>
|
||||
<el-table-column label="不含税金额(元)" align="center" prop="taxPriceVal" width="130"/>
|
||||
<el-table-column label="含税金额(元)" align="center" prop="totalPriceVal" width="130"/>
|
||||
<el-table-column label="税额(元)" align="center" prop="taxVal" width="130"/>-->
|
||||
<el-table-column label="备注" align="center" prop="remark"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['wmsSaleOrder:wmsSaleOrder:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wmsSaleOrder:wmsSaleOrder: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="1000px" 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="orderCode">
|
||||
<el-input v-model="form.orderCode" placeholder="请输入订单编号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品类型" prop="productType">
|
||||
<el-select v-model="form.productType" placeholder="请选择商品类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.wms_good_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品型号" prop="handledOrg">
|
||||
<el-input v-model="form.handledOrg" placeholder="请输入商品型号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运输工具" prop="customerName">
|
||||
<el-input v-model="form.customerName" placeholder="请输入运输工具"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="车牌号" prop="customerNum">
|
||||
<el-input v-model="form.customerNum" placeholder="请输入车牌号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="配送路线" prop="registAddr">
|
||||
<el-input v-model="form.registAddr" placeholder="请输入配送路线"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物流单号" prop="creditCode">
|
||||
<el-input v-model="form.creditCode" placeholder="请输入物流单号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="送货员" prop="handledBy">
|
||||
<el-input v-model="form.handledBy" placeholder="请输入送货员"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系电话" prop="contactPhone">
|
||||
<el-input v-model="form.contactPhone" placeholder="请输入联系电话"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="contactPerson">
|
||||
<el-input v-model="form.contactPerson" placeholder="请输入联系人"/>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
<!--<el-col :span="8">
|
||||
<el-form-item label="开户户名" prop="accountName">
|
||||
<el-input v-model="form.accountName" placeholder="请输入开户户名"/>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
<!--<el-col :span="8">
|
||||
<el-form-item label="开户银行" prop="accountBank">
|
||||
<el-input v-model="form.accountBank" placeholder="请输入开户银行"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="银行账户" prop="accountNumber">
|
||||
<el-input v-model="form.accountNumber" placeholder="请输入银行账户"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
<!--<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="不含税金额" prop="taxPriceVal">
|
||||
<el-input v-model="form.taxPriceVal" placeholder="请输入不含税金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="含税金额" prop="totalPriceVal">
|
||||
<el-input v-model="form.totalPriceVal" placeholder="请输入含税金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税额" prop="taxVal">
|
||||
<el-input v-model="form.taxVal" placeholder="请输入税额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="运送状态" prop="orderStatus">
|
||||
<el-select v-model="form.orderStatus" placeholder="请选择运送状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.wms_transport_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="更新时间" prop="orderDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.orderDate"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择更新时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!--<el-divider content-position="center">销售订单明细信息</el-divider>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddWmsSaleOrderDetail">添加
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteWmsSaleOrderDetail">删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
<!-- <el-table :data="wmsSaleOrderDetailList" :row-class-name="rowWmsSaleOrderDetailIndex"
|
||||
@selection-change="handleWmsSaleOrderDetailSelectionChange" ref="wmsSaleOrderDetail">
|
||||
<el-table-column type="selection" width="50" align="center"/>
|
||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||
<el-table-column label="商品编号" prop="productNum" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.productNum" placeholder="请输入商品编号"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" prop="productName" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.productName" placeholder="请输入商品名称"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="productFormat" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.productFormat" placeholder="请输入规格"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计量单位" prop="productUnit" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.productUnit" placeholder="请输入计量单位"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="销售数量" prop="goodsNum" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.goodsNum" placeholder="请输入销售数量"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不含税单价" prop="unitPrice" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.unitPrice" placeholder="请输入不含税单价"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不含税金额" prop="totalPriceVal" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.totalPriceVal" placeholder="请输入不含税金额"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="税率" prop="taxRate" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxRate" placeholder="请输入税率"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税价" prop="taxUnitPrice" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxUnitPrice" placeholder="请输入含税价"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税金额" prop="taxPriceVal" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxPriceVal" placeholder="请输入含税金额"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="税额" prop="taxPaid" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxPaid" placeholder="请输入税额"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.remark" placeholder="请输入备注"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>-->
|
||||
</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 {
|
||||
listWmsSaleOrder,
|
||||
getWmsSaleOrder,
|
||||
delWmsSaleOrder,
|
||||
addWmsSaleOrder,
|
||||
updateWmsSaleOrder
|
||||
} from "@/api/wmsSaleOrder/wmsSaleOrder";
|
||||
|
||||
const sourceSys = 'WMS'
|
||||
const interfaceType = 'WmsSaleLogistics'
|
||||
export default {
|
||||
name: "WmsSaleOrder",
|
||||
dicts: ['wms_good_type', 'wms_transport_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 子表选中数据
|
||||
checkedWmsSaleOrderDetail: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 销售订单物流信息表格数据
|
||||
wmsSaleOrderList: [],
|
||||
// 销售订单明细表格数据
|
||||
wmsSaleOrderDetailList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderCode: null,
|
||||
orderDate: null,
|
||||
productType: null,
|
||||
handledOrg: null,
|
||||
handledBy: null,
|
||||
orderStatus: null,
|
||||
customerNum: null,
|
||||
customerName: null,
|
||||
creditCode: null,
|
||||
registAddr: null,
|
||||
contactPerson: null,
|
||||
contactPhone: null,
|
||||
accountName: null,
|
||||
accountBank: null,
|
||||
accountNumber: null,
|
||||
taxPriceVal: null,
|
||||
totalPriceVal: null,
|
||||
taxVal: null,
|
||||
sourceSys: sourceSys,
|
||||
interfaceType: interfaceType
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询销售订单物流信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWmsSaleOrder(this.queryParams).then(response => {
|
||||
this.wmsSaleOrderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
orderCode: null,
|
||||
orderDate: null,
|
||||
productType: null,
|
||||
handledOrg: null,
|
||||
handledBy: null,
|
||||
orderStatus: null,
|
||||
customerNum: null,
|
||||
customerName: null,
|
||||
creditCode: null,
|
||||
registAddr: null,
|
||||
contactPerson: null,
|
||||
contactPhone: null,
|
||||
accountName: null,
|
||||
accountBank: null,
|
||||
accountNumber: null,
|
||||
taxPriceVal: null,
|
||||
totalPriceVal: null,
|
||||
taxVal: null,
|
||||
remark: null,
|
||||
createTime: null,
|
||||
sourceSys: sourceSys,
|
||||
interfaceType: interfaceType
|
||||
};
|
||||
this.wmsSaleOrderDetailList = [];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加销售订单物流信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getWmsSaleOrder(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.wmsSaleOrderDetailList = response.data.wmsSaleOrderDetailList;
|
||||
this.open = true;
|
||||
this.title = "修改销售订单物流信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.wmsSaleOrderDetailList = this.wmsSaleOrderDetailList;
|
||||
if (this.form.id != null) {
|
||||
updateWmsSaleOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addWmsSaleOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除销售订单物流信息?').then(function () {
|
||||
return delWmsSaleOrder(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 销售订单明细序号 */
|
||||
rowWmsSaleOrderDetailIndex({row, rowIndex}) {
|
||||
row.index = rowIndex + 1;
|
||||
},
|
||||
/** 销售订单明细添加按钮操作 */
|
||||
handleAddWmsSaleOrderDetail() {
|
||||
let obj = {};
|
||||
obj.productNum = "";
|
||||
obj.productName = "";
|
||||
obj.productFormat = "";
|
||||
obj.productUnit = "";
|
||||
obj.goodsNum = "";
|
||||
obj.unitPrice = "";
|
||||
obj.totalPriceVal = "";
|
||||
obj.taxRate = "";
|
||||
obj.taxUnitPrice = "";
|
||||
obj.taxPriceVal = "";
|
||||
obj.taxPaid = "";
|
||||
obj.remark = "";
|
||||
obj.isdeleted = "";
|
||||
obj.sourceSys = "";
|
||||
obj.interfaceType = "";
|
||||
this.wmsSaleOrderDetailList.push(obj);
|
||||
},
|
||||
/** 销售订单明细删除按钮操作 */
|
||||
handleDeleteWmsSaleOrderDetail() {
|
||||
if (this.checkedWmsSaleOrderDetail.length == 0) {
|
||||
this.$modal.msgError("请先选择要删除的销售订单明细数据");
|
||||
} else {
|
||||
const wmsSaleOrderDetailList = this.wmsSaleOrderDetailList;
|
||||
const checkedWmsSaleOrderDetail = this.checkedWmsSaleOrderDetail;
|
||||
this.wmsSaleOrderDetailList = wmsSaleOrderDetailList.filter(function (item) {
|
||||
return checkedWmsSaleOrderDetail.indexOf(item.index) == -1
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 复选框选中数据 */
|
||||
handleWmsSaleOrderDetailSelectionChange(selection) {
|
||||
this.checkedWmsSaleOrderDetail = selection.map(item => item.index)
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wmsSaleOrder/wmsSaleOrder/export', {
|
||||
...this.queryParams
|
||||
}, `wmsSaleOrder_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -383,7 +383,8 @@ import {
|
||||
addWmsSaleOrder,
|
||||
updateWmsSaleOrder
|
||||
} from "@/api/wmsSaleOrder/wmsSaleOrder";
|
||||
|
||||
const sourceSys = 'WMS'
|
||||
const interfaceType = 'WmsSaleOrder'
|
||||
export default {
|
||||
name: "WmsSaleOrder",
|
||||
dicts: ['wms_good_type', 'wms_sale_order_status'],
|
||||
@ -433,8 +434,8 @@ export default {
|
||||
taxPriceVal: null,
|
||||
totalPriceVal: null,
|
||||
taxVal: null,
|
||||
sourceSys: null,
|
||||
interfaceType: null
|
||||
sourceSys: sourceSys,
|
||||
interfaceType: interfaceType
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -484,8 +485,8 @@ export default {
|
||||
taxVal: null,
|
||||
remark: null,
|
||||
createTime: null,
|
||||
sourceSys: null,
|
||||
interfaceType: null
|
||||
sourceSys: sourceSys,
|
||||
interfaceType: interfaceType
|
||||
};
|
||||
this.wmsSaleOrderDetailList = [];
|
||||
this.resetForm("form");
|
||||
|
628
god-ui/src/views/wmsSaleOrder/wmsSaleOrderSearch/index.vue
Normal file
628
god-ui/src/views/wmsSaleOrder/wmsSaleOrderSearch/index.vue
Normal file
@ -0,0 +1,628 @@
|
||||
<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="商品类型" prop="productType">
|
||||
<el-select v-model="queryParams.productType" placeholder="请选择商品类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.wms_good_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="orderCode">
|
||||
<el-input
|
||||
v-model="queryParams.orderCode"
|
||||
placeholder="请输入订单编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期" prop="orderDate">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.orderDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择单据日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-input
|
||||
v-model="queryParams.customerName"
|
||||
placeholder="请输入客户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择单据状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.wms_sale_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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="['wmsSaleOrder:wmsSaleOrder: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="['wmsSaleOrder:wmsSaleOrder: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="['wmsSaleOrder:wmsSaleOrder: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="['wmsSaleOrder:wmsSaleOrder:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="wmsSaleOrderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<!--<el-table-column label="主键id" align="center" prop="id" />-->
|
||||
<el-table-column label="订单编号" align="center" prop="orderCode" width="150"/>
|
||||
<el-table-column label="单据日期" align="center" prop="orderDate" width="150"/>
|
||||
<el-table-column label="商品类型" align="center" prop="productType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_good_type" :value="scope.row.productType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="经办部门" align="center" prop="handledOrg" width="150"/>
|
||||
<el-table-column label="经办人" align="center" prop="handledBy"/>
|
||||
<el-table-column label="单据状态" align="center" prop="orderStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_sale_order_status" :value="scope.row.orderStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="客户编号" align="center" prop="customerNum"/>-->
|
||||
<el-table-column label="客户名称" align="center" prop="customerName" width="200"/>
|
||||
<!--<el-table-column label="纳税人识别号" align="center" prop="creditCode"/>-->
|
||||
<!--<el-table-column label="注册地址" align="center" prop="registAddr"/>-->
|
||||
<el-table-column label="联系人" align="center" prop="contactPerson"/>
|
||||
<!--<el-table-column label="联系电话" align="center" prop="contactPhone" width="150"/>
|
||||
<el-table-column label="开户户名" align="center" prop="accountName"/>-->
|
||||
<el-table-column label="开户银行" align="center" prop="accountBank" width="230"/>
|
||||
<!--<el-table-column label="银行账户" align="center" prop="accountNumber"/>-->
|
||||
<el-table-column label="不含税金额(元)" align="center" prop="taxPriceVal" width="130"/>
|
||||
<el-table-column label="含税金额(元)" align="center" prop="totalPriceVal" width="130"/>
|
||||
<el-table-column label="税额(元)" align="center" prop="taxVal" width="130"/>
|
||||
<el-table-column label="备注" align="center" prop="remark"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['wmsSaleOrder:wmsSaleOrder:edit']"
|
||||
>查看
|
||||
</el-button>
|
||||
<!--<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['wmsSaleOrder:wmsSaleOrder:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['wmsSaleOrder:wmsSaleOrder: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="1000px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px" :disabled="disabled">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="订单编号" prop="orderCode">
|
||||
<el-input v-model="form.orderCode" placeholder="请输入订单编号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据日期" prop="orderDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.orderDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择单据日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品类型" prop="productType">
|
||||
<el-select v-model="form.productType" placeholder="请选择商品类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.wms_good_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经办部门" prop="handledOrg">
|
||||
<el-input v-model="form.handledOrg" placeholder="请输入经办部门"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经办人" prop="handledBy">
|
||||
<el-input v-model="form.handledBy" placeholder="请输入经办人"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据状态" prop="orderStatus">
|
||||
<el-select v-model="form.orderStatus" placeholder="请选择单据状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.wms_sale_order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-input v-model="form.customerName" placeholder="请输入客户名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="纳税人识别号" prop="creditCode">
|
||||
<el-input v-model="form.creditCode" placeholder="请输入纳税人识别号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="注册地址" prop="registAddr">
|
||||
<el-input v-model="form.registAddr" placeholder="请输入注册地址"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="contactPerson">
|
||||
<el-input v-model="form.contactPerson" placeholder="请输入联系人"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--<el-col :span="8">
|
||||
<el-form-item label="联系电话" prop="contactPhone">
|
||||
<el-input v-model="form.contactPhone" placeholder="请输入联系电话"/>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
<!--<el-col :span="8">
|
||||
<el-form-item label="开户户名" prop="accountName">
|
||||
<el-input v-model="form.accountName" placeholder="请输入开户户名"/>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开户银行" prop="accountBank">
|
||||
<el-input v-model="form.accountBank" placeholder="请输入开户银行"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="银行账户" prop="accountNumber">
|
||||
<el-input v-model="form.accountNumber" placeholder="请输入银行账户"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="不含税金额" prop="taxPriceVal">
|
||||
<el-input v-model="form.taxPriceVal" placeholder="请输入不含税金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="含税金额" prop="totalPriceVal">
|
||||
<el-input v-model="form.totalPriceVal" placeholder="请输入含税金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="税额" prop="taxVal">
|
||||
<el-input v-model="form.taxVal" placeholder="请输入税额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!--<el-form-item label="客户编号" prop="customerNum">
|
||||
<el-input v-model="form.customerNum" placeholder="请输入客户编号" />
|
||||
</el-form-item>-->
|
||||
<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-divider content-position="center">销售订单明细信息</el-divider>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddWmsSaleOrderDetail">添加
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteWmsSaleOrderDetail">删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="wmsSaleOrderDetailList" :row-class-name="rowWmsSaleOrderDetailIndex"
|
||||
@selection-change="handleWmsSaleOrderDetailSelectionChange" ref="wmsSaleOrderDetail">
|
||||
<el-table-column type="selection" width="50" align="center"/>
|
||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||
<el-table-column label="商品编号" prop="productNum" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.productNum" placeholder="请输入商品编号"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名称" prop="productName" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.productName" placeholder="请输入商品名称"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="productFormat" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.productFormat" placeholder="请输入规格"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计量单位" prop="productUnit" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.productUnit" placeholder="请输入计量单位"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="销售数量" prop="goodsNum" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.goodsNum" placeholder="请输入销售数量"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不含税单价" prop="unitPrice" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.unitPrice" placeholder="请输入不含税单价"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不含税金额" prop="totalPriceVal" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.totalPriceVal" placeholder="请输入不含税金额"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="税率" prop="taxRate" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxRate" placeholder="请输入税率"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税价" prop="taxUnitPrice" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxUnitPrice" placeholder="请输入含税价"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税金额" prop="taxPriceVal" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxPriceVal" placeholder="请输入含税金额"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="税额" prop="taxPaid" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxPaid" placeholder="请输入税额"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.remark" placeholder="请输入备注"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" v-if="!disabled">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listWmsSaleOrder,
|
||||
getWmsSaleOrder,
|
||||
delWmsSaleOrder,
|
||||
addWmsSaleOrder,
|
||||
updateWmsSaleOrder
|
||||
} from "@/api/wmsSaleOrder/wmsSaleOrder";
|
||||
const sourceSys = 'WMS'
|
||||
const interfaceType = 'WmsSaleOrder'
|
||||
export default {
|
||||
name: "WmsSaleOrder",
|
||||
dicts: ['wms_good_type', 'wms_sale_order_status'],
|
||||
data() {
|
||||
return {
|
||||
disabled: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 子表选中数据
|
||||
checkedWmsSaleOrderDetail: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 销售订单信息表格数据
|
||||
wmsSaleOrderList: [],
|
||||
// 销售订单明细表格数据
|
||||
wmsSaleOrderDetailList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderCode: null,
|
||||
orderDate: null,
|
||||
productType: null,
|
||||
handledOrg: null,
|
||||
handledBy: null,
|
||||
orderStatus: null,
|
||||
customerNum: null,
|
||||
customerName: null,
|
||||
creditCode: null,
|
||||
registAddr: null,
|
||||
contactPerson: null,
|
||||
contactPhone: null,
|
||||
accountName: null,
|
||||
accountBank: null,
|
||||
accountNumber: null,
|
||||
taxPriceVal: null,
|
||||
totalPriceVal: null,
|
||||
taxVal: null,
|
||||
sourceSys: sourceSys,
|
||||
interfaceType: interfaceType
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询销售订单信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWmsSaleOrder(this.queryParams).then(response => {
|
||||
this.wmsSaleOrderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
orderCode: null,
|
||||
orderDate: null,
|
||||
productType: null,
|
||||
handledOrg: null,
|
||||
handledBy: null,
|
||||
orderStatus: null,
|
||||
customerNum: null,
|
||||
customerName: null,
|
||||
creditCode: null,
|
||||
registAddr: null,
|
||||
contactPerson: null,
|
||||
contactPhone: null,
|
||||
accountName: null,
|
||||
accountBank: null,
|
||||
accountNumber: null,
|
||||
taxPriceVal: null,
|
||||
totalPriceVal: null,
|
||||
taxVal: null,
|
||||
remark: null,
|
||||
createTime: null,
|
||||
sourceSys: sourceSys,
|
||||
interfaceType: interfaceType
|
||||
};
|
||||
this.wmsSaleOrderDetailList = [];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加销售订单信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getWmsSaleOrder(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.wmsSaleOrderDetailList = response.data.wmsSaleOrderDetailList;
|
||||
this.open = true;
|
||||
this.title = "修改销售订单信息";
|
||||
});
|
||||
},
|
||||
/** 查看按钮操作 */
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getWmsSaleOrder(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.wmsSaleOrderDetailList = response.data.wmsSaleOrderDetailList;
|
||||
this.open = true;
|
||||
this.disabled = true;
|
||||
this.title = "查看销售订单信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.wmsSaleOrderDetailList = this.wmsSaleOrderDetailList;
|
||||
if (this.form.id != null) {
|
||||
updateWmsSaleOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addWmsSaleOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除销售订单信息?').then(function () {
|
||||
return delWmsSaleOrder(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 销售订单明细序号 */
|
||||
rowWmsSaleOrderDetailIndex({row, rowIndex}) {
|
||||
row.index = rowIndex + 1;
|
||||
},
|
||||
/** 销售订单明细添加按钮操作 */
|
||||
handleAddWmsSaleOrderDetail() {
|
||||
let obj = {};
|
||||
obj.productNum = "";
|
||||
obj.productName = "";
|
||||
obj.productFormat = "";
|
||||
obj.productUnit = "";
|
||||
obj.goodsNum = "";
|
||||
obj.unitPrice = "";
|
||||
obj.totalPriceVal = "";
|
||||
obj.taxRate = "";
|
||||
obj.taxUnitPrice = "";
|
||||
obj.taxPriceVal = "";
|
||||
obj.taxPaid = "";
|
||||
obj.remark = "";
|
||||
obj.isdeleted = "";
|
||||
obj.sourceSys = "";
|
||||
obj.interfaceType = "";
|
||||
this.wmsSaleOrderDetailList.push(obj);
|
||||
},
|
||||
/** 销售订单明细删除按钮操作 */
|
||||
handleDeleteWmsSaleOrderDetail() {
|
||||
if (this.checkedWmsSaleOrderDetail.length == 0) {
|
||||
this.$modal.msgError("请先选择要删除的销售订单明细数据");
|
||||
} else {
|
||||
const wmsSaleOrderDetailList = this.wmsSaleOrderDetailList;
|
||||
const checkedWmsSaleOrderDetail = this.checkedWmsSaleOrderDetail;
|
||||
this.wmsSaleOrderDetailList = wmsSaleOrderDetailList.filter(function (item) {
|
||||
return checkedWmsSaleOrderDetail.indexOf(item.index) == -1
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 复选框选中数据 */
|
||||
handleWmsSaleOrderDetailSelectionChange(selection) {
|
||||
this.checkedWmsSaleOrderDetail = selection.map(item => item.index)
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wmsSaleOrder/wmsSaleOrder/export', {
|
||||
...this.queryParams
|
||||
}, `wmsSaleOrder_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user