|
@@ -1,6 +1,6 @@
|
|
<!-- 采购订单修订—— 列表 -->
|
|
<!-- 采购订单修订—— 列表 -->
|
|
<script>
|
|
<script>
|
|
-import { TableColumns, SearchColumns } from "./column";
|
|
|
|
|
|
+import { TableColumns, SearchColumns, TabColumns } from "./column";
|
|
import orderApi from "@/api/business/purchase/purchase-order";
|
|
import orderApi from "@/api/business/purchase/purchase-order";
|
|
import { initPage, initLayout, initPageSizes, initParams } from "@/utils/init";
|
|
import { initPage, initLayout, initPageSizes, initParams } from "@/utils/init";
|
|
export default {
|
|
export default {
|
|
@@ -12,107 +12,107 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
|
|
|
|
- const tabColumns = [
|
|
|
|
- {
|
|
|
|
- title: '物料信息',
|
|
|
|
- key: 'first',
|
|
|
|
- tableColumns: [
|
|
|
|
- { key: "rowNo", title: "行号" },
|
|
|
|
- { key: "orderId", title: "采购订单ID" },
|
|
|
|
- { key: "material", title: "物料" },
|
|
|
|
- { key: "materialName", title: "物料名称" },
|
|
|
|
- { key: "materialCode", title: "物料编码" },
|
|
|
|
- { key: "materialClassify", title: "物料分类" },
|
|
|
|
- { key: "materialManufacturersCode", title: "厂家物料编码" },
|
|
|
|
- { key: "specification", title: "规格" },
|
|
|
|
- { key: "model", title: "型号" },
|
|
|
|
- { key: "isMedcine", title: "医药物料" },
|
|
|
|
- { key: "manufacturer", title: "生产厂家代理人" },
|
|
|
|
- { key: "isDrug", title: "物料药品属性" },
|
|
|
|
- { key: "unit", title: "单位" },
|
|
|
|
- { key: "qty", title: "数量" },
|
|
|
|
- { key: "taxPrice", title: "含税单价" },
|
|
|
|
- { key: "money", title: "价税合计" },
|
|
|
|
- { key: "tax", title: "税率" },
|
|
|
|
- { key: "taxDeductMoneya", title: "折扣金额" },
|
|
|
|
- { key: "arrivalQty", title: "已到货数量" },
|
|
|
|
- { key: "unarrivedQty", title: "未到货数量" },
|
|
|
|
- { key: "notaxMoney", title: "无税金额" },
|
|
|
|
- { key: "priceSource", title: "价格目录ID" },
|
|
|
|
- { key: "isStorage", title: "入库关闭" },
|
|
|
|
- { key: "isInvoice", title: "开票关闭" },
|
|
|
|
- { key: "isArrival", title: "到货关闭" },
|
|
|
|
- { key: "isPayment", title: "付款关闭" },
|
|
|
|
- { key: "isGift", title: "赠品" },
|
|
|
|
- { key: "warehouse", title: "收货仓库" },
|
|
|
|
- { key: "place", title: "收货地点" },
|
|
|
|
- { key: "address", title: "收货地址" },
|
|
|
|
- { key: "productBatch", title: "产品批号" },
|
|
|
|
- { key: "manufactureDate", title: "生产日期" },
|
|
|
|
- { key: "efficacyLoseDate", title: "有效期至/失效日期" },
|
|
|
|
- { key: "approvalNumber", title: "批准文号" },
|
|
|
|
- { key: "registration", title: "注册证号" },
|
|
|
|
- { key: "storageCondition", title: "存储条件" },
|
|
|
|
- { key: "carriageCondition", title: "运输条件" },
|
|
|
|
- { key: "isBatchLock", title: "批号锁定标识" },
|
|
|
|
- { key: "isReplenishment", title: "补单标识" },
|
|
|
|
- { key: "isUrgency", title: "紧急标识" },
|
|
|
|
- { key: "originalQty", title: "原始数量" },
|
|
|
|
- { key: "originalMoney", title: "原始金额" },
|
|
|
|
- { key: "directProductBatch", title: "直运产品批号" },
|
|
|
|
- { key: "discountRule", title: "折扣规则编码" },
|
|
|
|
- { key: "reservedQty", title: "预留数量" },
|
|
|
|
- { key: "reservedPeriod", title: "预留周期" },
|
|
|
|
- { key: "taxDeductClassify", title: "扣税类别" },
|
|
|
|
- { key: "exchangeRate", title: "折本汇率" },
|
|
|
|
- { key: "source", title: "上游单据号" },
|
|
|
|
- { key: "sourceId", title: "上游单据ID" },
|
|
|
|
- { key: "demandCode", title: "采购需求单号" },
|
|
|
|
- { key: "arrivalDatePlan", title: "计划到货日期" },
|
|
|
|
- { key: "priceType", title: "价格类型" },
|
|
|
|
- { key: "isDistributionPrice", title: "配送价" },
|
|
|
|
- // { key: "tenantId", title: "租户号" },
|
|
|
|
- // { key: "revision", title: "乐观锁" },
|
|
|
|
- { key: "createByName", title: "创建人名称" },
|
|
|
|
- { key: "updateByName", title: "更新人名称" },
|
|
|
|
- // { key: "delFlag", title: "删除标记" },
|
|
|
|
- // { key: "materialClassifyOne", title: "物料一级分类" },
|
|
|
|
- { key: "materialClassifyOneName", title: "物料一级分类名称" },
|
|
|
|
- // { key: "materialClassifyTwo", title: "物料二级分类" },
|
|
|
|
- { key: "materialClassifyTwoName", title: "物料二级分类名称" },
|
|
|
|
- // { key: "materialClassifyThree", title: "物料三级分类" },
|
|
|
|
- { key: "materialClassifyThreeName", title: "物料三级分类名称" },
|
|
|
|
- // { key: "materialClassifyFour", title: "物料四级分类" },
|
|
|
|
- { key: "materialClassifyFourName", title: "物料四级分类名称" },
|
|
|
|
- { key: "price", title: "无税单价" }
|
|
|
|
- ]
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '执行结果',
|
|
|
|
- key: 'second',
|
|
|
|
- tableColumns: [
|
|
|
|
- // { key: "id", title: "主键" },
|
|
|
|
- { key: "orderId", title: "采购订单ID" },
|
|
|
|
- { key: "rowno", title: "行号" },
|
|
|
|
- { key: "material", title: "物料" },
|
|
|
|
- { key: "materialName", title: "物料名称" },
|
|
|
|
- { key: "specification", title: "规格" },
|
|
|
|
- { key: "qty", title: "数量" },
|
|
|
|
- { key: "stroageQty", title: "累计到货主数量" },
|
|
|
|
- { key: "stockQty", title: "累计入库主数量" },
|
|
|
|
- { key: "invoiceQty", title: "累计开票主数量" },
|
|
|
|
- { key: "rollbackQty", title: "累计退货主数量" },
|
|
|
|
- { key: "backStockQty", title: "累计退库主数量" },
|
|
|
|
- { key: "floatQty", title: "未到货数量" },
|
|
|
|
- // { key: "tenantId", title: "租户号" },
|
|
|
|
- // { key: "revision", title: "乐观锁" },
|
|
|
|
- { key: "createByName", title: "创建人名称" },
|
|
|
|
- { key: "updateByName", title: "更新人名称" },
|
|
|
|
- // { key: "delFlag", title: "删除标记" }
|
|
|
|
- ]
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
- const initTabColumns = () => tabColumns;
|
|
|
|
|
|
+ // const tabColumns = [
|
|
|
|
+ // {
|
|
|
|
+ // title: '物料信息',
|
|
|
|
+ // key: 'first',
|
|
|
|
+ // tableColumns: [
|
|
|
|
+ // { key: "rowNo", title: "行号" },
|
|
|
|
+ // { key: "orderId", title: "采购订单ID" },
|
|
|
|
+ // { key: "material", title: "物料" },
|
|
|
|
+ // { key: "materialName", title: "物料名称" },
|
|
|
|
+ // { key: "materialCode", title: "物料编码" },
|
|
|
|
+ // { key: "materialClassify", title: "物料分类" },
|
|
|
|
+ // { key: "materialManufacturersCode", title: "厂家物料编码" },
|
|
|
|
+ // { key: "specification", title: "规格" },
|
|
|
|
+ // { key: "model", title: "型号" },
|
|
|
|
+ // { key: "isMedcine", title: "医药物料" },
|
|
|
|
+ // { key: "manufacturer", title: "生产厂家代理人" },
|
|
|
|
+ // { key: "isDrug", title: "物料药品属性" },
|
|
|
|
+ // { key: "unit", title: "单位" },
|
|
|
|
+ // { key: "qty", title: "数量" },
|
|
|
|
+ // { key: "taxPrice", title: "含税单价" },
|
|
|
|
+ // { key: "money", title: "价税合计" },
|
|
|
|
+ // { key: "tax", title: "税率" },
|
|
|
|
+ // { key: "taxDeductMoneya", title: "折扣金额" },
|
|
|
|
+ // { key: "arrivalQty", title: "已到货数量" },
|
|
|
|
+ // { key: "unarrivedQty", title: "未到货数量" },
|
|
|
|
+ // { key: "notaxMoney", title: "无税金额" },
|
|
|
|
+ // { key: "priceSource", title: "价格目录ID" },
|
|
|
|
+ // { key: "isStorage", title: "入库关闭" },
|
|
|
|
+ // { key: "isInvoice", title: "开票关闭" },
|
|
|
|
+ // { key: "isArrival", title: "到货关闭" },
|
|
|
|
+ // { key: "isPayment", title: "付款关闭" },
|
|
|
|
+ // { key: "isGift", title: "赠品" },
|
|
|
|
+ // { key: "warehouse", title: "收货仓库" },
|
|
|
|
+ // { key: "place", title: "收货地点" },
|
|
|
|
+ // { key: "address", title: "收货地址" },
|
|
|
|
+ // { key: "productBatch", title: "产品批号" },
|
|
|
|
+ // { key: "manufactureDate", title: "生产日期" },
|
|
|
|
+ // { key: "efficacyLoseDate", title: "有效期至/失效日期" },
|
|
|
|
+ // { key: "approvalNumber", title: "批准文号" },
|
|
|
|
+ // { key: "registration", title: "注册证号" },
|
|
|
|
+ // { key: "storageCondition", title: "存储条件" },
|
|
|
|
+ // { key: "carriageCondition", title: "运输条件" },
|
|
|
|
+ // { key: "isBatchLock", title: "批号锁定标识" },
|
|
|
|
+ // { key: "isReplenishment", title: "补单标识" },
|
|
|
|
+ // { key: "isUrgency", title: "紧急标识" },
|
|
|
|
+ // { key: "originalQty", title: "原始数量" },
|
|
|
|
+ // { key: "originalMoney", title: "原始金额" },
|
|
|
|
+ // { key: "directProductBatch", title: "直运产品批号" },
|
|
|
|
+ // { key: "discountRule", title: "折扣规则编码" },
|
|
|
|
+ // { key: "reservedQty", title: "预留数量" },
|
|
|
|
+ // { key: "reservedPeriod", title: "预留周期" },
|
|
|
|
+ // { key: "taxDeductClassify", title: "扣税类别" },
|
|
|
|
+ // { key: "exchangeRate", title: "折本汇率" },
|
|
|
|
+ // { key: "source", title: "上游单据号" },
|
|
|
|
+ // { key: "sourceId", title: "上游单据ID" },
|
|
|
|
+ // { key: "demandCode", title: "采购需求单号" },
|
|
|
|
+ // { key: "arrivalDatePlan", title: "计划到货日期" },
|
|
|
|
+ // { key: "priceType", title: "价格类型" },
|
|
|
|
+ // { key: "isDistributionPrice", title: "配送价" },
|
|
|
|
+ // // { key: "tenantId", title: "租户号" },
|
|
|
|
+ // // { key: "revision", title: "乐观锁" },
|
|
|
|
+ // { key: "createByName", title: "创建人名称" },
|
|
|
|
+ // { key: "updateByName", title: "更新人名称" },
|
|
|
|
+ // // { key: "delFlag", title: "删除标记" },
|
|
|
|
+ // // { key: "materialClassifyOne", title: "物料一级分类" },
|
|
|
|
+ // { key: "materialClassifyOneName", title: "物料一级分类名称" },
|
|
|
|
+ // // { key: "materialClassifyTwo", title: "物料二级分类" },
|
|
|
|
+ // { key: "materialClassifyTwoName", title: "物料二级分类名称" },
|
|
|
|
+ // // { key: "materialClassifyThree", title: "物料三级分类" },
|
|
|
|
+ // { key: "materialClassifyThreeName", title: "物料三级分类名称" },
|
|
|
|
+ // // { key: "materialClassifyFour", title: "物料四级分类" },
|
|
|
|
+ // { key: "materialClassifyFourName", title: "物料四级分类名称" },
|
|
|
|
+ // { key: "price", title: "无税单价" }
|
|
|
|
+ // ]
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // title: '执行结果',
|
|
|
|
+ // key: 'second',
|
|
|
|
+ // tableColumns: [
|
|
|
|
+ // // { key: "id", title: "主键" },
|
|
|
|
+ // { key: "orderId", title: "采购订单ID" },
|
|
|
|
+ // { key: "rowno", title: "行号" },
|
|
|
|
+ // { key: "material", title: "物料" },
|
|
|
|
+ // { key: "materialName", title: "物料名称" },
|
|
|
|
+ // { key: "specification", title: "规格" },
|
|
|
|
+ // { key: "qty", title: "数量" },
|
|
|
|
+ // { key: "stroageQty", title: "累计到货主数量" },
|
|
|
|
+ // { key: "stockQty", title: "累计入库主数量" },
|
|
|
|
+ // { key: "invoiceQty", title: "累计开票主数量" },
|
|
|
|
+ // { key: "rollbackQty", title: "累计退货主数量" },
|
|
|
|
+ // { key: "backStockQty", title: "累计退库主数量" },
|
|
|
|
+ // { key: "floatQty", title: "未到货数量" },
|
|
|
|
+ // // { key: "tenantId", title: "租户号" },
|
|
|
|
+ // // { key: "revision", title: "乐观锁" },
|
|
|
|
+ // { key: "createByName", title: "创建人名称" },
|
|
|
|
+ // { key: "updateByName", title: "更新人名称" },
|
|
|
|
+ // // { key: "delFlag", title: "删除标记" }
|
|
|
|
+ // ]
|
|
|
|
+ // },
|
|
|
|
+ // ];
|
|
|
|
+ const initTabColumns = () => TabColumns;
|
|
return {
|
|
return {
|
|
loading: false,
|
|
loading: false,
|
|
isSimpleSearch: true,
|
|
isSimpleSearch: true,
|
|
@@ -125,12 +125,11 @@ export default {
|
|
tableColumns: TableColumns,
|
|
tableColumns: TableColumns,
|
|
tableData: [],
|
|
tableData: [],
|
|
tabColumns: initTabColumns(),
|
|
tabColumns: initTabColumns(),
|
|
- tabName: "first",
|
|
|
|
|
|
+ tabName: "puOrderItemList",
|
|
tabTableDatas: {
|
|
tabTableDatas: {
|
|
- first: [],
|
|
|
|
- second: [],
|
|
|
|
|
|
+ puOrderItemList: [],
|
|
|
|
+ puOrderExecuteList: [],
|
|
},
|
|
},
|
|
- checkedData: {}
|
|
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -204,7 +203,7 @@ export default {
|
|
handleResetList() {
|
|
handleResetList() {
|
|
|
|
|
|
this.page = initPage();
|
|
this.page = initPage();
|
|
- this.params = initParams();
|
|
|
|
|
|
+ this.params = initParams(SearchColumns);
|
|
this.fetchList(this.params, this.page);
|
|
this.fetchList(this.params, this.page);
|
|
},
|
|
},
|
|
handleTabClick() { },
|
|
handleTabClick() { },
|
|
@@ -233,10 +232,10 @@ export default {
|
|
try {
|
|
try {
|
|
const { code, msg, data } = await orderApi.details(row.id);
|
|
const { code, msg, data } = await orderApi.details(row.id);
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
- this.checkedData = data;
|
|
|
|
// 物料信息:puOrderItemList 执行结果:puOrderExecuteList
|
|
// 物料信息:puOrderItemList 执行结果:puOrderExecuteList
|
|
- this.tabTableDatas.first = data.puOrderItemList;
|
|
|
|
- this.tabTableDatas.second = data.puOrderExecuteList;
|
|
|
|
|
|
+ for (const key in this.tabTableDatas) {
|
|
|
|
+ this.tabTableDatas[key] = data[key];
|
|
|
|
+ }
|
|
this.$notify.success({ title: msg });
|
|
this.$notify.success({ title: msg });
|
|
} else {
|
|
} else {
|
|
this.$notify.warning({ title: msg });
|
|
this.$notify.warning({ title: msg });
|
|
@@ -248,10 +247,10 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 删除操作
|
|
// 删除操作
|
|
- async handleDeleteList(prop) {
|
|
|
|
|
|
+ async handleDeleteList(row) {
|
|
try {
|
|
try {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- const { id } = prop;
|
|
|
|
|
|
+ const { id } = row;
|
|
console.log(id, 'id');
|
|
console.log(id, 'id');
|
|
const { code, msg } = await orderApi.remove(id);
|
|
const { code, msg } = await orderApi.remove(id);
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
@@ -266,6 +265,10 @@ export default {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 提交
|
|
|
|
+ async handleSubmit(row) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
},
|
|
},
|
|
};
|
|
};
|
|
@@ -307,11 +310,10 @@ export default {
|
|
<el-button-group style="margin-left: 10px">
|
|
<el-button-group style="margin-left: 10px">
|
|
<el-button size="mini" type="danger" @click="handleOpenAddDrawer">新增</el-button>
|
|
<el-button size="mini" type="danger" @click="handleOpenAddDrawer">新增</el-button>
|
|
<el-button size="mini">复制</el-button>
|
|
<el-button size="mini">复制</el-button>
|
|
- <el-button size="mini">提交</el-button>
|
|
|
|
|
|
+
|
|
</el-button-group>
|
|
</el-button-group>
|
|
|
|
|
|
<el-button-group style="margin-left: 10px">
|
|
<el-button-group style="margin-left: 10px">
|
|
- <!-- <el-button size="mini" :disabled="checkedData.status != '2'">修订</el-button> -->
|
|
|
|
<el-button size="mini">退回</el-button>
|
|
<el-button size="mini">退回</el-button>
|
|
</el-button-group>
|
|
</el-button-group>
|
|
|
|
|
|
@@ -332,10 +334,13 @@ export default {
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column fixed="right" label="操作" width="120">
|
|
<el-table-column fixed="right" label="操作" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button @click.stop="handleOpenSeeDrawer(scope.row)" type="text" size="small">查看</el-button>
|
|
|
|
|
|
+ <!-- <el-button @click.stop="handleOpenSeeDrawer(scope.row)" type="text" size="small">查看</el-button> -->
|
|
<el-button type="text" size="small" @click.stop="handleOpenEditDrawer(scope.row)">
|
|
<el-button type="text" size="small" @click.stop="handleOpenEditDrawer(scope.row)">
|
|
{{ scope.row.status == '2' ? '修订' : '编辑' }}</el-button>
|
|
{{ scope.row.status == '2' ? '修订' : '编辑' }}</el-button>
|
|
|
|
+ <!-- 0=自由态,1=审批中,2=已审核,3=已驳回 -->
|
|
<el-button type="text" size="small" @click.stop="handleDeleteList(scope.row)">删除</el-button>
|
|
<el-button type="text" size="small" @click.stop="handleDeleteList(scope.row)">删除</el-button>
|
|
|
|
+ <el-button v-if="scope.row.status == '0' || scope.row.status == '3'" type="text" size="mini"
|
|
|
|
+ @click.stop="handleSubmit(scope.row)">提交</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
@@ -345,11 +350,6 @@ export default {
|
|
:layout="layout">
|
|
:layout="layout">
|
|
</el-pagination>
|
|
</el-pagination>
|
|
|
|
|
|
- <!-- <el-card :body-style="{
|
|
|
|
- padding: '20px',
|
|
|
|
- display: 'flex',
|
|
|
|
- 'flex-wrap': 'wrap',
|
|
|
|
- }" style="margin: 10px"> -->
|
|
|
|
<el-tabs v-model="tabName" @tab-click="handleTabClick" style="width: 100%;padding: 20px 10px">
|
|
<el-tabs v-model="tabName" @tab-click="handleTabClick" style="width: 100%;padding: 20px 10px">
|
|
<el-tab-pane v-for="(column, index) in tabColumns" :key="index" :label="column.title" :name="column.key">
|
|
<el-tab-pane v-for="(column, index) in tabColumns" :key="index" :label="column.title" :name="column.key">
|
|
<el-table :data="tabTableDatas[column.key]" style="width: 100%" highlight-current-row>
|
|
<el-table :data="tabTableDatas[column.key]" style="width: 100%" highlight-current-row>
|
|
@@ -360,7 +360,6 @@ export default {
|
|
</el-table>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
- <!-- </el-card> -->
|
|
|
|
|
|
|
|
</el-card>
|
|
</el-card>
|
|
</template>
|
|
</template>
|