测试问题修改3
This commit is contained in:
parent
b4b0fbbe21
commit
5fa12dd165
|
|
@ -964,6 +964,7 @@ export default {
|
||||||
confirmSubmit(){
|
confirmSubmit(){
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
setTimeout(()=>{
|
||||||
let param = this.baseInfo
|
let param = this.baseInfo
|
||||||
if(this.baseInfo.recipeType==1){
|
if(this.baseInfo.recipeType==1){
|
||||||
param.recipeDateList = this.dateRangeList;
|
param.recipeDateList = this.dateRangeList;
|
||||||
|
|
@ -1000,6 +1001,7 @@ export default {
|
||||||
this.loading=false
|
this.loading=false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
},500)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1168,6 +1168,7 @@ export default {
|
||||||
confirmSubmit(){
|
confirmSubmit(){
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
setTimeout(()=>{
|
||||||
let param = this.baseInfo
|
let param = this.baseInfo
|
||||||
if(this.baseInfo.recipeType==1){
|
if(this.baseInfo.recipeType==1){
|
||||||
param.recipeDateList = []
|
param.recipeDateList = []
|
||||||
|
|
@ -1227,7 +1228,7 @@ export default {
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
},500)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -432,7 +432,7 @@ export default {
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
inverse: true,
|
inverse: true,
|
||||||
offset: 60,
|
offset: 90,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
show: true,
|
show: true,
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -444,7 +444,7 @@ export default {
|
||||||
var str = "";
|
var str = "";
|
||||||
var no = "NO.";
|
var no = "NO.";
|
||||||
num = index + 1;
|
num = index + 1;
|
||||||
value = value.length > 7 ? value.slice(0, 7) + '...' : value
|
value = value.length > 5 ? value.slice(0, 5) + '...' : value
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
str = " {num1|" + num + "} {title1|" + value + "}";
|
str = " {num1|" + num + "} {title1|" + value + "}";
|
||||||
} else if (index === 1) {
|
} else if (index === 1) {
|
||||||
|
|
@ -537,7 +537,7 @@ export default {
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
inverse: true,
|
inverse: true,
|
||||||
offset: -10,
|
offset: -40,
|
||||||
axisTick: "none",
|
axisTick: "none",
|
||||||
axisLine: "none",
|
axisLine: "none",
|
||||||
show: true,
|
show: true,
|
||||||
|
|
@ -747,7 +747,7 @@ export default {
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
inverse: true,
|
inverse: true,
|
||||||
offset: 100,
|
offset: 90,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
show: true,
|
show: true,
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -759,7 +759,7 @@ export default {
|
||||||
var str = "";
|
var str = "";
|
||||||
var no = "NO.";
|
var no = "NO.";
|
||||||
num = index + 1;
|
num = index + 1;
|
||||||
value = value.length > 7 ? value.slice(0, 7) + '...' : value
|
value = value.length > 5 ? value.slice(0, 5) + '...' : value
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
str = " {num1|" + num + "} {title1|" + value + "}";
|
str = " {num1|" + num + "} {title1|" + value + "}";
|
||||||
} else if (index === 1) {
|
} else if (index === 1) {
|
||||||
|
|
|
||||||
|
|
@ -549,6 +549,7 @@ export default {
|
||||||
confirmSave(){
|
confirmSave(){
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
setTimeout(()=>{
|
||||||
let param = Object.assign({},this.baseInfo);
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime)
|
param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime)
|
||||||
param.totalNum=0
|
param.totalNum=0
|
||||||
|
|
@ -580,6 +581,7 @@ export default {
|
||||||
this.$modal.msgError("请添加货品!");
|
this.$modal.msgError("请添加货品!");
|
||||||
}else{
|
}else{
|
||||||
this.loadingBtn=true;
|
this.loadingBtn=true;
|
||||||
|
setTimeout(()=>{
|
||||||
addFetchMaterialApi(param).then((response) => {
|
addFetchMaterialApi(param).then((response) => {
|
||||||
this.$modal.msgSuccess("保存成功");
|
this.$modal.msgSuccess("保存成功");
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
|
|
@ -587,8 +589,10 @@ export default {
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
});
|
});
|
||||||
|
},500)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},500)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -596,6 +600,7 @@ export default {
|
||||||
confirmSubmit(){
|
confirmSubmit(){
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
setTimeout(()=>{
|
||||||
let param = Object.assign({},this.baseInfo);
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime)
|
param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime)
|
||||||
param.totalNum=0
|
param.totalNum=0
|
||||||
|
|
@ -636,7 +641,7 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},500)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -725,7 +730,7 @@ export default {
|
||||||
if(Number(row.fetchNum)>Number(row.materialNum)){
|
if(Number(row.fetchNum)>Number(row.materialNum)){
|
||||||
row.fetchNum = row.materialNum
|
row.fetchNum = row.materialNum
|
||||||
}
|
}
|
||||||
},500)
|
},200)
|
||||||
},
|
},
|
||||||
defaultDateRange() {
|
defaultDateRange() {
|
||||||
const end = new Date(new Date().toLocaleDateString());
|
const end = new Date(new Date().toLocaleDateString());
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;align-items: center;">
|
<div style="display: flex;align-items: center;">
|
||||||
<el-button type="primary" plain @click="addMaterial">添加货品</el-button>
|
<el-button type="primary" plain @click="addMaterial">添加货品</el-button>
|
||||||
|
<el-button type="primary" plain @click="importPurchaseOrder">导入采购订单</el-button>
|
||||||
<el-button type="danger" plain @click="delMaterial">删除</el-button>
|
<el-button type="danger" plain @click="delMaterial">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -226,6 +227,57 @@
|
||||||
<el-button @click="openDialog=false">取 消</el-button>
|
<el-button @click="openDialog=false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 导入 -->
|
||||||
|
<el-dialog title="导入采购订单" :visible.sync="openImportDialog" width="60%" append-to-body >
|
||||||
|
<div style="width: 100%;height:600px;">
|
||||||
|
<el-form :model="queryParams2" ref="queryForm2" size="small" :inline="true" label-width="100px">
|
||||||
|
<el-form-item label="采购单号" prop="orderGoodsCode">
|
||||||
|
<el-input v-model="queryParams2.orderGoodsCode" placeholder="请输入采购单号" maxlength="20" clearable style="width: 240px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery2">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<!-- :row-key="(row)=>{return row.fetchMaterialId}" @selection-change="handleSelectionChange3" -->
|
||||||
|
<el-table v-loading="loading2" :data="tableListData2" ref="multipleTable2" height="500">
|
||||||
|
<!-- <el-table-column type="selection" width="50" align="center" :reserve-selection="true" /> -->
|
||||||
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{(queryParams2.pageNum - 1) * queryParams2.pageSize + scope.$index + 1}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="采购单号" align="center" prop="orderGoodsCode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="采购订单标题" align="center" prop="orderTitle" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="采购总金额(元" align="center" prop="orderAmount" :show-overflow-tooltip="true" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (scope.row.orderAmount/100).toFixed(2) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="创建人" align="center" prop="createBy" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="text"
|
||||||
|
@click="confirmImport(scope.row)" v-if="scope.row.orderStatus==2"
|
||||||
|
>导入</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total2>0"
|
||||||
|
:total="total2"
|
||||||
|
:page.sync="queryParams2.pageNum"
|
||||||
|
:limit.sync="queryParams2.pageSize"
|
||||||
|
@pagination="getList2"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="openImportDialog=false">确 定</el-button>
|
||||||
|
<el-button @click="openImportDialog=false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -234,6 +286,7 @@ import { imgUpLoadTwo } from '@/api/system/upload'
|
||||||
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
||||||
import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi } from "@/api/foodManage/purchaseManage";
|
import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi } from "@/api/foodManage/purchaseManage";
|
||||||
import { getPurchaseContractInfoApi,addPurchaseContractApi,editPurchaseContractApi,delPurchaseContractApi } from "@/api/foodManage/purchaseManage";
|
import { getPurchaseContractInfoApi,addPurchaseContractApi,editPurchaseContractApi,delPurchaseContractApi } from "@/api/foodManage/purchaseManage";
|
||||||
|
import { purchaseOrderPageApi,getPurchaseOrderInfoApi } from "@/api/foodManage/purchaseManage";
|
||||||
export default {
|
export default {
|
||||||
name: "ContractEdit",
|
name: "ContractEdit",
|
||||||
dicts: [],
|
dicts: [],
|
||||||
|
|
@ -296,7 +349,18 @@ export default {
|
||||||
tableListData: [],//货品弹窗-货品表格数据
|
tableListData: [],//货品弹窗-货品表格数据
|
||||||
batchChosenMaterial:[],//货品弹窗-货品表格-选中的货品数组
|
batchChosenMaterial:[],//货品弹窗-货品表格-选中的货品数组
|
||||||
noMaterial:false,
|
noMaterial:false,
|
||||||
|
//导入功能
|
||||||
|
openImportDialog:false,
|
||||||
|
queryParams2: { // 货品弹窗-货品表格-查询参数
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
orderGoodsCode:null
|
||||||
|
},
|
||||||
|
loading2:false,
|
||||||
|
total2: 0, // 总条数
|
||||||
|
tableListData2: [],//导入弹窗-表格数据
|
||||||
|
importRow:{},//导入弹窗-表格数据-选中数据
|
||||||
|
materialDetailsData: [],//导入弹窗-明细数据
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -626,7 +690,84 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//导入
|
||||||
|
importPurchaseOrder(){
|
||||||
|
if(this.baseInfo.areaId!=undefined||this.baseInfo.deliveryWarehouseId!=undefined||this.baseInfo.supplierId!=undefined){
|
||||||
|
this.openImportDialog=true
|
||||||
|
this.resetQuery2()
|
||||||
|
// setTimeout(()=>{
|
||||||
|
// this.$refs.multipleTable2.clearSelection()
|
||||||
|
// },300)
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("请先选择区域,供应商");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery2() {
|
||||||
|
this.queryParams2.pageNum = 1;
|
||||||
|
this.getList2();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery2() {
|
||||||
|
this.queryParams2 = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
}
|
||||||
|
this.resetForm("queryForm2");
|
||||||
|
this.handleQuery2();
|
||||||
|
},
|
||||||
|
/** 查询列表 */
|
||||||
|
getList2() {
|
||||||
|
this.loading2 = true;
|
||||||
|
let param = {
|
||||||
|
"pageSize": this.queryParams2.pageSize,
|
||||||
|
"pageNum": this.queryParams2.pageNum,
|
||||||
|
"orderGoodsCode": this.queryParams2.orderGoodsCode,
|
||||||
|
"orderStatus":2,
|
||||||
|
// "isInspect":2,
|
||||||
|
"areaId": this.baseInfo.areaId,
|
||||||
|
// "warehouseId": this.baseInfo.deliveryWarehouseId,
|
||||||
|
"supplierId": this.baseInfo.supplierId,
|
||||||
|
}
|
||||||
|
purchaseOrderPageApi(param).then(response => {
|
||||||
|
this.tableListData2 = response.rows;
|
||||||
|
this.total2 = Number(response.total);
|
||||||
|
this.loading2 = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
confirmImport(row){
|
||||||
|
console.log(row)
|
||||||
|
this.importRow = row;
|
||||||
|
let param = {
|
||||||
|
orderGoodsId:this.importRow.orderGoodsId
|
||||||
|
}
|
||||||
|
getPurchaseOrderInfoApi(param).then((response) => {
|
||||||
|
this.materialDetailsData = response.data.orderGoodsDetailList||[];
|
||||||
|
this.$modal.confirm('是否确认导入采购订单?').then(()=>{
|
||||||
|
if(this.materialDetailsData.length>0){
|
||||||
|
this.contractMaterialList = this.materialDetailsData;
|
||||||
|
this.contractMaterialList.forEach(item=>{
|
||||||
|
this.$set(item,"singlePrice",Number(item.singlePrice/100))
|
||||||
|
this.$set(item,"orderNum",item.orderNum)
|
||||||
|
// if(item.totalQualifiedNum&&item.totalQualifiedNum>0){
|
||||||
|
// this.$set(item,"deliveryNum",Number(item.orderNum)-Number(item.totalQualifiedNum))
|
||||||
|
// this.$set(item,"qualifiedNum",Number(item.orderNum)-Number(item.totalQualifiedNum))
|
||||||
|
// }else{
|
||||||
|
// this.$set(item,"deliveryNum",Number(item.orderNum))
|
||||||
|
// this.$set(item,"qualifiedNum",Number(item.orderNum))
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
// this.baseInfo.relateOrderGoodsId = this.importRow.orderGoodsCode;
|
||||||
|
this.$set(this.baseInfo,"remark","导入采购订单")
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.openImportDialog=false
|
||||||
|
},500)
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("采购订单明细无货品!");
|
||||||
|
}
|
||||||
|
}).catch(() => {});
|
||||||
|
});
|
||||||
|
},
|
||||||
//附件上传
|
//附件上传
|
||||||
fileUpLoad(param){
|
fileUpLoad(param){
|
||||||
param.type = 'canteen'
|
param.type = 'canteen'
|
||||||
|
|
|
||||||
|
|
@ -97,12 +97,12 @@
|
||||||
<el-table-column label="所属区域" align="center" prop="area" :show-overflow-tooltip="true"/>
|
<el-table-column label="所属区域" align="center" prop="area" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="邀请供应商(家)" align="center" prop="inquirySupplierNum" :show-overflow-tooltip="true" />
|
<el-table-column label="邀请供应商(家)" align="center" prop="inquirySupplierNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="已报价供应商(家)" align="center" prop="supplierNum" :show-overflow-tooltip="true" />
|
<el-table-column label="已报价供应商(家)" align="center" prop="supplierNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="中选状态" align="center" prop="status" :show-overflow-tooltip="true" width="100">
|
<!-- <el-table-column label="中选状态" align="center" prop="status" :show-overflow-tooltip="true" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.status==2">已中选</span>
|
<span v-if="scope.row.status==2">已中选</span>
|
||||||
<span v-if="scope.row.status!=2">未中选</span>
|
<span v-if="scope.row.status!=2">未中选</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="中选供应商" align="center" prop="" :show-overflow-tooltip="true" />
|
<el-table-column label="中选供应商" align="center" prop="" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="中选金额(元)" align="center" prop="" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="中选金额(元)" align="center" prop="" :show-overflow-tooltip="true" width="120">
|
||||||
<!-- <template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
|
|
|
||||||
|
|
@ -471,7 +471,7 @@ export default {
|
||||||
this.dialogTableList.forEach(item=>{
|
this.dialogTableList.forEach(item=>{
|
||||||
let obj = Object.assign({}, item)
|
let obj = Object.assign({}, item)
|
||||||
obj.productionPlanNum = Number(obj.purchaseNum)
|
obj.productionPlanNum = Number(obj.purchaseNum)
|
||||||
obj.unitPrice = 100
|
obj.unitPrice = 0
|
||||||
obj.purchasingBudgetPrice = (100*Number(obj.purchaseNum))
|
obj.purchasingBudgetPrice = (100*Number(obj.purchaseNum))
|
||||||
param.purchasePlanDetailList.push(obj)
|
param.purchasePlanDetailList.push(obj)
|
||||||
param.totalNum = param.totalNum+Number(obj.purchaseNum)
|
param.totalNum = param.totalNum+Number(obj.purchaseNum)
|
||||||
|
|
@ -492,7 +492,7 @@ export default {
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
inputRate(row){
|
inputRate(row){
|
||||||
this.$set(row,"rate",row.rate.replace(/[^\d]/g,''))
|
this.$set(row,"rate",row.rate.replace(/^(([1-9]{1}\d*)|(0{1}))(\.\d{2})$/,''))
|
||||||
this.$set(row,"purchaseNum",(row.totalConvertWeight*((Number(row.rate)/100)+1)).toFixed(4))
|
this.$set(row,"purchaseNum",(row.totalConvertWeight*((Number(row.rate)/100)+1)).toFixed(4))
|
||||||
},
|
},
|
||||||
defaultDateRange() {
|
defaultDateRange() {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<div style="background: #FFF;padding: 10px;border-radius: 10px;margin-bottom: 20px;">
|
<div style="background: #FFF;padding: 10px;border-radius: 10px;margin-bottom: 20px;">
|
||||||
<el-form :model="baseInfo" ref="baseInfo" :rules="baseRules" size="medium" :inline="true" label-width="110px">
|
<el-form :model="baseInfo" ref="baseInfo" :rules="baseRules" size="medium" :inline="true" label-width="110px">
|
||||||
<el-form-item label="验货单编号" prop="inspectGoodsCode">
|
<el-form-item label="验货单编号" prop="inspectGoodsCode">
|
||||||
<el-input v-model="baseInfo.inspectGoodsCode" placeholder="合同编号自动生成" disabled maxlength="20" clearable style="width: 240px"/>
|
<el-input v-model="baseInfo.inspectGoodsCode" placeholder="验货单编号自动生成" disabled maxlength="20" clearable style="width: 240px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="送货日期" prop="deliveryDate">
|
<el-form-item label="送货日期" prop="deliveryDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -332,7 +332,7 @@ export default {
|
||||||
{ required: true, message: "验货人不能为空", trigger: "blur" }
|
{ required: true, message: "验货人不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
inspectAttachmentList: [
|
inspectAttachmentList: [
|
||||||
{ required: true, message: "合同附件不能为空", trigger: "change" }
|
{ required: true, message: "查验附件不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
treeAreaOptions:[],
|
treeAreaOptions:[],
|
||||||
|
|
@ -565,6 +565,7 @@ export default {
|
||||||
confirmSave(){
|
confirmSave(){
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
setTimeout(()=>{
|
||||||
let param = Object.assign({},this.baseInfo);
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
|
param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
|
||||||
param.deliveryTotalNum = 0;//送货总数量
|
param.deliveryTotalNum = 0;//送货总数量
|
||||||
|
|
@ -624,6 +625,7 @@ export default {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},500)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -631,6 +633,7 @@ export default {
|
||||||
confirmSubmit(){
|
confirmSubmit(){
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
setTimeout(()=>{
|
||||||
let param = Object.assign({},this.baseInfo);
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
|
param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
|
||||||
param.deliveryTotalNum = 0;//送货总数量
|
param.deliveryTotalNum = 0;//送货总数量
|
||||||
|
|
@ -690,6 +693,7 @@ export default {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},500)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -828,14 +832,16 @@ export default {
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
if(Number(row.deliveryNum)>(Number(row.orderNum)-Number(row.totalQualifiedNum))){
|
if(Number(row.deliveryNum)>(Number(row.orderNum)-Number(row.totalQualifiedNum))){
|
||||||
row.deliveryNum = Number(row.orderNum)-Number(row.totalQualifiedNum)
|
row.deliveryNum = Number(row.orderNum)-Number(row.totalQualifiedNum)
|
||||||
|
row.qualifiedNum = Number(row.orderNum)-Number(row.totalQualifiedNum)
|
||||||
}
|
}
|
||||||
},500)
|
},200)
|
||||||
}else{
|
}else{
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
if(Number(row.deliveryNum)>Number(row.orderNum)){
|
if(Number(row.deliveryNum)>Number(row.orderNum)){
|
||||||
row.deliveryNum = Number(row.orderNum)
|
row.deliveryNum = Number(row.orderNum)
|
||||||
|
row.qualifiedNum = Number(row.orderNum)
|
||||||
}
|
}
|
||||||
},500)
|
},200)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
patternValue2(row){
|
patternValue2(row){
|
||||||
|
|
@ -848,7 +854,7 @@ export default {
|
||||||
if(Number(row.qualifiedNum)>Number(row.deliveryNum)){
|
if(Number(row.qualifiedNum)>Number(row.deliveryNum)){
|
||||||
row.qualifiedNum = Number(row.deliveryNum)
|
row.qualifiedNum = Number(row.deliveryNum)
|
||||||
}
|
}
|
||||||
},500)
|
},200)
|
||||||
},
|
},
|
||||||
//日期
|
//日期
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
|
|
|
||||||
|
|
@ -421,9 +421,9 @@ export default {
|
||||||
},
|
},
|
||||||
//获取参考价
|
//获取参考价
|
||||||
async checkMaterialPrice(){
|
async checkMaterialPrice(){
|
||||||
if(this.batchChosenMaterial.length>0){
|
if(this.materialList.length>0){
|
||||||
console.log(this.batchChosenMaterial)
|
console.log(this.materialList)
|
||||||
let arr = this.batchChosenMaterial.map(item=>item.materialId)
|
let arr = this.materialList.map(item=>item.materialId)
|
||||||
let param = {
|
let param = {
|
||||||
materialIds:arr,
|
materialIds:arr,
|
||||||
type:3
|
type:3
|
||||||
|
|
@ -434,8 +434,8 @@ export default {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.$modal.msgSuccess("获取成功!");
|
this.$modal.msgSuccess("获取成功!");
|
||||||
res.data.forEach(item=>{
|
res.data.forEach(item=>{
|
||||||
let index = this.batchChosenMaterial.findIndex(v=>v.materialId==item.materialId)
|
let index = this.materialList.findIndex(v=>v.materialId==item.materialId)
|
||||||
this.$set(this.batchChosenMaterial[index],"unitPrice",item.unitPrice/100)
|
this.$set(this.materialList[index],"unitPrice",item.unitPrice/100)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@
|
||||||
<el-table-column label="单价(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
|
<el-table-column label="单价(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="baseInfo.relateOrderGoodsId">{{ scope.row.unitPrice }}</span>
|
<span v-if="baseInfo.relateOrderGoodsId">{{ scope.row.unitPrice }}</span>
|
||||||
<el-input v-else v-model="scope.row.unitPrice" placeholder="请输入" maxlength="8" clearable @input="(v)=>(scope.row.unitPrice=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
|
<el-input v-else v-model="scope.row.unitPrice" placeholder="请输入" maxlength="3" clearable @input="(v)=>(scope.row.unitPrice=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="订货数量" align="center" prop="orderNum" :show-overflow-tooltip="true" v-if="baseInfo.relateOrderGoodsId">
|
<el-table-column label="订货数量" align="center" prop="orderNum" :show-overflow-tooltip="true" v-if="baseInfo.relateOrderGoodsId">
|
||||||
|
|
@ -116,9 +116,9 @@
|
||||||
<span>{{scope.row.intoNum}}</span>
|
<span>{{scope.row.intoNum}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="待入库数量" align="center" prop="purNum" :show-overflow-tooltip="true">
|
<el-table-column label="本次入库数量" align="center" prop="purNum" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.purNum" placeholder="请输入" maxlength="8" clearable @change="patternValue(scope.row)"/>
|
<el-input v-model="scope.row.purNum" placeholder="请输入" maxlength="3" clearable @change="patternValue(scope.row)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -542,6 +542,7 @@ export default {
|
||||||
this.noMaterial = false;
|
this.noMaterial = false;
|
||||||
if(this.materialList.length>0){
|
if(this.materialList.length>0){
|
||||||
this.materialList.forEach(item=>{
|
this.materialList.forEach(item=>{
|
||||||
|
this.$set(item,"purNum",Number(item.purNum))
|
||||||
if(item.unitPrice==0 || item.purNum==0 || item.supplierId==null || !item.productDate|| !item.expireTime){
|
if(item.unitPrice==0 || item.purNum==0 || item.supplierId==null || !item.productDate|| !item.expireTime){
|
||||||
this.noMaterial = true
|
this.noMaterial = true
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -602,6 +603,7 @@ export default {
|
||||||
this.noMaterial = false;
|
this.noMaterial = false;
|
||||||
if(this.materialList.length>0){
|
if(this.materialList.length>0){
|
||||||
this.materialList.forEach(item=>{
|
this.materialList.forEach(item=>{
|
||||||
|
this.$set(item,"purNum",Number(item.purNum))
|
||||||
if(item.unitPrice==0 || item.purNum==0 || item.supplierId==null || !item.productDate|| !item.expireTime){
|
if(item.unitPrice==0 || item.purNum==0 || item.supplierId==null || !item.productDate|| !item.expireTime){
|
||||||
this.noMaterial = true
|
this.noMaterial = true
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getGoodsInquiryInfoApi } from "@/api/foodManage/purchaseManage";
|
import { getGoodsInquiryDetailInfoApi } from "@/api/foodManage/purchaseManage";
|
||||||
export default {
|
export default {
|
||||||
name: "SupplierQuotationDetail",
|
name: "SupplierQuotationDetail",
|
||||||
dicts: [],
|
dicts: [],
|
||||||
|
|
@ -179,10 +179,11 @@ export default {
|
||||||
getContractInfo(){
|
getContractInfo(){
|
||||||
console.log(this.goodsInquiryData)
|
console.log(this.goodsInquiryData)
|
||||||
let param = {
|
let param = {
|
||||||
inquiryId:this.goodsInquiryData.inquiryId
|
inquiryId:this.goodsInquiryData.inquiryId,
|
||||||
|
// supplierId:row.supplierId
|
||||||
}
|
}
|
||||||
//查询
|
//查询
|
||||||
getGoodsInquiryInfoApi(param).then((response) => {
|
getGoodsInquiryDetailInfoApi(param).then((response) => {
|
||||||
this.baseInfo = response.data;
|
this.baseInfo = response.data;
|
||||||
// this.$set(this.baseInfo,'dateRange',[this.baseInfo.startTime,this.baseInfo.endTime])
|
// this.$set(this.baseInfo,'dateRange',[this.baseInfo.startTime,this.baseInfo.endTime])
|
||||||
this.materialList = this.baseInfo.detailList;
|
this.materialList = this.baseInfo.detailList;
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">总金额</template>
|
<template slot="label">总金额</template>
|
||||||
{{ baseInfo.bidTotalPrice }}
|
{{ baseInfo.quoteAmount }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">备注</template>
|
<template slot="label">备注</template>
|
||||||
|
|
@ -89,7 +89,7 @@
|
||||||
<el-table-column label="采购数量" align="center" prop="purNum" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column label="采购数量" align="center" prop="purNum" :show-overflow-tooltip="true"></el-table-column>
|
||||||
<el-table-column label="单价(元)" align="center" prop="singlePrice" :show-overflow-tooltip="true">
|
<el-table-column label="单价(元)" align="center" prop="singlePrice" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.singlePrice" placeholder="请输入" maxlength="6" clearable @input="(v)=>(scope.row.singlePrice=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
|
<el-input v-model="scope.row.singlePrice" placeholder="请输入" maxlength="6" clearable @change="sumAmount" @input="(v)=>(scope.row.singlePrice=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总金额(元)" align="center" prop="" :show-overflow-tooltip="true">
|
<el-table-column label="总金额(元)" align="center" prop="" :show-overflow-tooltip="true">
|
||||||
|
|
@ -427,6 +427,7 @@ export default {
|
||||||
let param = Object.assign({},this.baseInfo);
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.arrivalTime = this.formatDateTime(this.baseInfo.arrivalTime)
|
param.arrivalTime = this.formatDateTime(this.baseInfo.arrivalTime)
|
||||||
param.detailList = []
|
param.detailList = []
|
||||||
|
param.quoteAmount=0
|
||||||
console.log(param.arrivalTime)
|
console.log(param.arrivalTime)
|
||||||
if(param.arrivalTime.includes('1970')){
|
if(param.arrivalTime.includes('1970')){
|
||||||
this.$modal.msgError("请选择交货时间!");
|
this.$modal.msgError("请选择交货时间!");
|
||||||
|
|
@ -442,6 +443,7 @@ export default {
|
||||||
obj.quoteNum = Number(obj.purNum)
|
obj.quoteNum = Number(obj.purNum)
|
||||||
obj.singlePrice = Number(obj.singlePrice)*100
|
obj.singlePrice = Number(obj.singlePrice)*100
|
||||||
obj.totalPrice = (Number(obj.singlePrice)*Number(obj.purNum))
|
obj.totalPrice = (Number(obj.singlePrice)*Number(obj.purNum))
|
||||||
|
param.quoteAmount = param.quoteAmount+obj.totalPrice;
|
||||||
param.detailList.push(obj)
|
param.detailList.push(obj)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -469,7 +471,12 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sumAmount(){
|
||||||
|
this.baseInfo.quoteAmount=0
|
||||||
|
this.materialList.forEach(item=>{
|
||||||
|
this.baseInfo.quoteAmount = this.baseInfo.quoteAmount + (Number(item.singlePrice)*Number(item.purNum))
|
||||||
|
})
|
||||||
|
},
|
||||||
//日期
|
//日期
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
// 格式化为 YYYY-MM-DD
|
// 格式化为 YYYY-MM-DD
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@
|
||||||
<el-form-item label="询价标题" prop="title">
|
<el-form-item label="询价标题" prop="title">
|
||||||
<el-input v-model="queryParams.title" placeholder="请输入询价标题" maxlength="20" clearable style="width: 240px"/>
|
<el-input v-model="queryParams.title" placeholder="请输入询价标题" maxlength="20" clearable style="width: 240px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="询价状态" prop="status">
|
<el-form-item label="询价状态" prop="bidStatus">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择询价状态" style="width: 240px;">
|
<el-select v-model="queryParams.bidStatus" placeholder="请选择询价状态" style="width: 240px;">
|
||||||
<el-option label="已决价" :value="2"></el-option>
|
<el-option label="已报价" :value="1"></el-option>
|
||||||
<el-option label="进行中" :value="3"></el-option>
|
<el-option label="未报价" :value="2"></el-option>
|
||||||
<el-option label="未决标" :value="4"></el-option>
|
<el-option label="已中标" :value="3"></el-option>
|
||||||
<el-option label="已取消" :value="5"></el-option>
|
<el-option label="未中标" :value="4"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
@ -35,21 +35,20 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="询价单号" align="center" prop="inquiryCode" :show-overflow-tooltip="true" />
|
<el-table-column label="询价单号" align="center" prop="inquiryCode" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="询价标题" align="center" prop="title" :show-overflow-tooltip="true" />
|
<el-table-column label="询价标题" align="center" prop="title" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="询价状态" align="center" prop="status" :show-overflow-tooltip="true" width="100">
|
<el-table-column label="询价状态" align="center" prop="bidStatus" :show-overflow-tooltip="true" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.status==1">待提交</span>
|
<span v-if="scope.row.bidStatus==1">已报价</span>
|
||||||
<span v-if="scope.row.status==2">已决价</span>
|
<span v-if="scope.row.bidStatus==2">未报价</span>
|
||||||
<span v-if="scope.row.status==3">进行中</span>
|
<span v-if="scope.row.bidStatus==3">已中标</span>
|
||||||
<span v-if="scope.row.status==4">未决标</span>
|
<span v-if="scope.row.bidStatus==4">未中标</span>
|
||||||
<span v-if="scope.row.status==5">已取消</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="报价开始时间" align="center" prop="startTime" :show-overflow-tooltip="true" />
|
<el-table-column label="报价开始时间" align="center" prop="startTime" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="报价结束时间" align="center" prop="endTime" :show-overflow-tooltip="true" />
|
<el-table-column label="报价结束时间" align="center" prop="endTime" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="决标时间" align="center" prop="bidTime" :show-overflow-tooltip="true"/>
|
<el-table-column label="决标时间" align="center" prop="bidTime" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="决标总价(元)" align="center" prop="bidTotalPrice" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="决标总价(元)" align="center" prop="quoteAmount" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.bidTotalPrice/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.quoteAmount/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||||
|
|
@ -57,13 +56,13 @@
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.status==3"
|
icon="el-icon-edit" v-if="scope.row.bidStatus==2"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>报价</el-button>
|
>报价</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.status!=1"
|
icon="el-icon-edit" v-if="scope.row.bidStatus!=2"
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
>详情</el-button>
|
>详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -801,6 +801,8 @@ export default {
|
||||||
},
|
},
|
||||||
getSupplierUserList(){
|
getSupplierUserList(){
|
||||||
let param = {
|
let param = {
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:100,
|
||||||
deptId:225,
|
deptId:225,
|
||||||
queryTyoe:2
|
queryTyoe:2
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue