测试问题修改3
This commit is contained in:
parent
b4b0fbbe21
commit
5fa12dd165
|
|
@ -964,42 +964,44 @@ export default {
|
|||
confirmSubmit(){
|
||||
this.$refs["baseInfo"].validate(valid => {
|
||||
if (valid) {
|
||||
let param = this.baseInfo
|
||||
if(this.baseInfo.recipeType==1){
|
||||
param.recipeDateList = this.dateRangeList;
|
||||
}
|
||||
if(this.baseInfo.recipeType==2){
|
||||
param.recipeDateList = [{
|
||||
anyone:"repeat",
|
||||
detailList:this.detailList
|
||||
}]
|
||||
}
|
||||
if(this.baseInfo.recipeType==3){
|
||||
param.recipeDateList = this.weekDateList
|
||||
}
|
||||
this.noDishes = true;
|
||||
param.recipeDateList.forEach(item=>{
|
||||
item.detailList.forEach(subItem=>{
|
||||
if(subItem.dishesList.length>0){
|
||||
this.noDishes=false
|
||||
subItem.dishesList.forEach(dishItem=>{
|
||||
dishItem.price = Number(dishItem.price)
|
||||
dishItem.salePrice = Number(dishItem.salePrice)
|
||||
})
|
||||
}
|
||||
setTimeout(()=>{
|
||||
let param = this.baseInfo
|
||||
if(this.baseInfo.recipeType==1){
|
||||
param.recipeDateList = this.dateRangeList;
|
||||
}
|
||||
if(this.baseInfo.recipeType==2){
|
||||
param.recipeDateList = [{
|
||||
anyone:"repeat",
|
||||
detailList:this.detailList
|
||||
}]
|
||||
}
|
||||
if(this.baseInfo.recipeType==3){
|
||||
param.recipeDateList = this.weekDateList
|
||||
}
|
||||
this.noDishes = true;
|
||||
param.recipeDateList.forEach(item=>{
|
||||
item.detailList.forEach(subItem=>{
|
||||
if(subItem.dishesList.length>0){
|
||||
this.noDishes=false
|
||||
subItem.dishesList.forEach(dishItem=>{
|
||||
dishItem.price = Number(dishItem.price)
|
||||
dishItem.salePrice = Number(dishItem.salePrice)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
if(this.noDishes){
|
||||
this.$modal.msgError("请选中菜品!");
|
||||
}else{
|
||||
this.loading=true
|
||||
addMenuRecipeApi(param).then((response) => {
|
||||
this.loading=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loading=false
|
||||
});
|
||||
}
|
||||
if(this.noDishes){
|
||||
this.$modal.msgError("请选中菜品!");
|
||||
}else{
|
||||
this.loading=true
|
||||
addMenuRecipeApi(param).then((response) => {
|
||||
this.loading=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loading=false
|
||||
});
|
||||
}
|
||||
},500)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1168,66 +1168,67 @@ export default {
|
|||
confirmSubmit(){
|
||||
this.$refs["baseInfo"].validate(valid => {
|
||||
if (valid) {
|
||||
let param = this.baseInfo
|
||||
if(this.baseInfo.recipeType==1){
|
||||
param.recipeDateList = []
|
||||
this.dateRangeList.forEach(item=>{
|
||||
let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0)
|
||||
if(index>-1){
|
||||
param.recipeDateList.push(item)
|
||||
}else{
|
||||
if(item.editStatus){
|
||||
setTimeout(()=>{
|
||||
let param = this.baseInfo
|
||||
if(this.baseInfo.recipeType==1){
|
||||
param.recipeDateList = []
|
||||
this.dateRangeList.forEach(item=>{
|
||||
let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0)
|
||||
if(index>-1){
|
||||
param.recipeDateList.push(item)
|
||||
}else{
|
||||
if(item.editStatus){
|
||||
param.recipeDateList.push(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
if(this.baseInfo.recipeType==2){
|
||||
param.recipeDateList = [{
|
||||
anyone:"repeat",
|
||||
detailList:this.detailList
|
||||
}]
|
||||
}
|
||||
if(this.baseInfo.recipeType==3){
|
||||
param.recipeDateList = []
|
||||
this.weekDateList.forEach(item=>{
|
||||
let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0)
|
||||
if(index>-1){
|
||||
param.recipeDateList.push(item)
|
||||
}else{
|
||||
if(item.editStatus){
|
||||
})
|
||||
}
|
||||
if(this.baseInfo.recipeType==2){
|
||||
param.recipeDateList = [{
|
||||
anyone:"repeat",
|
||||
detailList:this.detailList
|
||||
}]
|
||||
}
|
||||
if(this.baseInfo.recipeType==3){
|
||||
param.recipeDateList = []
|
||||
this.weekDateList.forEach(item=>{
|
||||
let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0)
|
||||
if(index>-1){
|
||||
param.recipeDateList.push(item)
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
if(item.editStatus){
|
||||
param.recipeDateList.push(item)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
this.noDishes = true;
|
||||
param.recipeDateList.forEach(item=>{
|
||||
item.detailList.forEach(subItem=>{
|
||||
if(subItem.dishesList.length>0){
|
||||
this.noDishes=false
|
||||
subItem.dishesList.forEach(dishItem=>{
|
||||
dishItem.price = Number(dishItem.price)
|
||||
dishItem.salePrice = Number(dishItem.salePrice)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
this.noDishes = true;
|
||||
param.recipeDateList.forEach(item=>{
|
||||
item.detailList.forEach(subItem=>{
|
||||
if(subItem.dishesList.length>0){
|
||||
this.noDishes=false
|
||||
subItem.dishesList.forEach(dishItem=>{
|
||||
dishItem.price = Number(dishItem.price)
|
||||
dishItem.salePrice = Number(dishItem.salePrice)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
console.log(param)
|
||||
if(this.noDishes){
|
||||
this.$modal.msgError("请选中菜品!");
|
||||
}else{
|
||||
this.loading=true
|
||||
editMenuRecipeApi(param).then((response) => {
|
||||
this.loading=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loading=false;
|
||||
console.log(param)
|
||||
if(this.noDishes){
|
||||
this.$modal.msgError("请选中菜品!");
|
||||
}else{
|
||||
this.loading=true
|
||||
editMenuRecipeApi(param).then((response) => {
|
||||
this.loading=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loading=false;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
},500)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ export default {
|
|||
{
|
||||
type: "category",
|
||||
inverse: true,
|
||||
offset: 60,
|
||||
offset: 90,
|
||||
axisLabel: {
|
||||
show: true,
|
||||
align: "left",
|
||||
|
|
@ -444,7 +444,7 @@ export default {
|
|||
var str = "";
|
||||
var no = "NO.";
|
||||
num = index + 1;
|
||||
value = value.length > 7 ? value.slice(0, 7) + '...' : value
|
||||
value = value.length > 5 ? value.slice(0, 5) + '...' : value
|
||||
if (index === 0) {
|
||||
str = " {num1|" + num + "} {title1|" + value + "}";
|
||||
} else if (index === 1) {
|
||||
|
|
@ -537,7 +537,7 @@ export default {
|
|||
{
|
||||
type: "category",
|
||||
inverse: true,
|
||||
offset: -10,
|
||||
offset: -40,
|
||||
axisTick: "none",
|
||||
axisLine: "none",
|
||||
show: true,
|
||||
|
|
@ -747,7 +747,7 @@ export default {
|
|||
{
|
||||
type: "category",
|
||||
inverse: true,
|
||||
offset: 100,
|
||||
offset: 90,
|
||||
axisLabel: {
|
||||
show: true,
|
||||
align: "left",
|
||||
|
|
@ -759,7 +759,7 @@ export default {
|
|||
var str = "";
|
||||
var no = "NO.";
|
||||
num = index + 1;
|
||||
value = value.length > 7 ? value.slice(0, 7) + '...' : value
|
||||
value = value.length > 5 ? value.slice(0, 5) + '...' : value
|
||||
if (index === 0) {
|
||||
str = " {num1|" + num + "} {title1|" + value + "}";
|
||||
} else if (index === 1) {
|
||||
|
|
|
|||
|
|
@ -549,46 +549,50 @@ export default {
|
|||
confirmSave(){
|
||||
this.$refs["baseInfo"].validate(valid => {
|
||||
if (valid) {
|
||||
let param = Object.assign({},this.baseInfo);
|
||||
param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime)
|
||||
param.totalNum=0
|
||||
param.detailList = []
|
||||
this.noMaterial = false;
|
||||
if(this.materialList.length>0){
|
||||
this.materialList.forEach(item=>{
|
||||
if(item.fetchNum==0){
|
||||
this.noMaterial = true
|
||||
}else{
|
||||
let obj = Object.assign({}, item)
|
||||
// obj.singlePrice = Number(obj.singlePrice)*100
|
||||
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.fetchNum))
|
||||
// param.orderAmount = param.orderAmount+obj.totalPrice;
|
||||
param.totalNum = param.totalNum+Number(obj.fetchNum)
|
||||
param.detailList.push(obj)
|
||||
}
|
||||
})
|
||||
}
|
||||
if(this.noMaterial){
|
||||
this.$modal.msgError("请输入货品数量!");
|
||||
}else{
|
||||
this.noMaterial = true;
|
||||
if(this.materialList.length>0){
|
||||
this.noMaterial = false;
|
||||
setTimeout(()=>{
|
||||
let param = Object.assign({},this.baseInfo);
|
||||
param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime)
|
||||
param.totalNum=0
|
||||
param.detailList = []
|
||||
this.noMaterial = false;
|
||||
if(this.materialList.length>0){
|
||||
this.materialList.forEach(item=>{
|
||||
if(item.fetchNum==0){
|
||||
this.noMaterial = true
|
||||
}else{
|
||||
let obj = Object.assign({}, item)
|
||||
// obj.singlePrice = Number(obj.singlePrice)*100
|
||||
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.fetchNum))
|
||||
// param.orderAmount = param.orderAmount+obj.totalPrice;
|
||||
param.totalNum = param.totalNum+Number(obj.fetchNum)
|
||||
param.detailList.push(obj)
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log(param)
|
||||
if(this.noMaterial){
|
||||
this.$modal.msgError("请添加货品!");
|
||||
this.$modal.msgError("请输入货品数量!");
|
||||
}else{
|
||||
this.loadingBtn=true;
|
||||
addFetchMaterialApi(param).then((response) => {
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
this.loadingBtn=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn=false
|
||||
});
|
||||
}
|
||||
}
|
||||
this.noMaterial = true;
|
||||
if(this.materialList.length>0){
|
||||
this.noMaterial = false;
|
||||
}
|
||||
console.log(param)
|
||||
if(this.noMaterial){
|
||||
this.$modal.msgError("请添加货品!");
|
||||
}else{
|
||||
this.loadingBtn=true;
|
||||
setTimeout(()=>{
|
||||
addFetchMaterialApi(param).then((response) => {
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
this.loadingBtn=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn=false
|
||||
});
|
||||
},500)
|
||||
}
|
||||
}
|
||||
},500)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -596,47 +600,48 @@ export default {
|
|||
confirmSubmit(){
|
||||
this.$refs["baseInfo"].validate(valid => {
|
||||
if (valid) {
|
||||
let param = Object.assign({},this.baseInfo);
|
||||
param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime)
|
||||
param.totalNum=0
|
||||
param.detailList = []
|
||||
this.noMaterial = false;
|
||||
if(this.materialList.length>0){
|
||||
this.materialList.forEach(item=>{
|
||||
if(item.fetchNum==0){
|
||||
this.noMaterial = true
|
||||
}else{
|
||||
let obj = Object.assign({}, item)
|
||||
// obj.singlePrice = Number(obj.singlePrice)*100
|
||||
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.fetchNum))
|
||||
// param.orderAmount = param.orderAmount+obj.totalPrice;
|
||||
param.totalNum = param.totalNum+Number(obj.fetchNum)
|
||||
param.detailList.push(obj)
|
||||
}
|
||||
})
|
||||
}
|
||||
if(this.noMaterial){
|
||||
this.$modal.msgError("请输入货品数量!");
|
||||
}else{
|
||||
this.noMaterial = true;
|
||||
if(this.materialList.length>0){
|
||||
this.noMaterial = false;
|
||||
setTimeout(()=>{
|
||||
let param = Object.assign({},this.baseInfo);
|
||||
param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime)
|
||||
param.totalNum=0
|
||||
param.detailList = []
|
||||
this.noMaterial = false;
|
||||
if(this.materialList.length>0){
|
||||
this.materialList.forEach(item=>{
|
||||
if(item.fetchNum==0){
|
||||
this.noMaterial = true
|
||||
}else{
|
||||
let obj = Object.assign({}, item)
|
||||
// obj.singlePrice = Number(obj.singlePrice)*100
|
||||
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.fetchNum))
|
||||
// param.orderAmount = param.orderAmount+obj.totalPrice;
|
||||
param.totalNum = param.totalNum+Number(obj.fetchNum)
|
||||
param.detailList.push(obj)
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log(param)
|
||||
if(this.noMaterial){
|
||||
this.$modal.msgError("请添加货品!");
|
||||
this.$modal.msgError("请输入货品数量!");
|
||||
}else{
|
||||
this.loadingBtn=true;
|
||||
editFetchMaterialApi(param).then((response) => {
|
||||
this.$modal.msgSuccess("提交成功");
|
||||
this.loadingBtn=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn=false
|
||||
});
|
||||
this.noMaterial = true;
|
||||
if(this.materialList.length>0){
|
||||
this.noMaterial = false;
|
||||
}
|
||||
console.log(param)
|
||||
if(this.noMaterial){
|
||||
this.$modal.msgError("请添加货品!");
|
||||
}else{
|
||||
this.loadingBtn=true;
|
||||
editFetchMaterialApi(param).then((response) => {
|
||||
this.$modal.msgSuccess("提交成功");
|
||||
this.loadingBtn=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn=false
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},500)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -725,7 +730,7 @@ export default {
|
|||
if(Number(row.fetchNum)>Number(row.materialNum)){
|
||||
row.fetchNum = row.materialNum
|
||||
}
|
||||
},500)
|
||||
},200)
|
||||
},
|
||||
defaultDateRange() {
|
||||
const end = new Date(new Date().toLocaleDateString());
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@
|
|||
</div>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -226,6 +227,57 @@
|
|||
<el-button @click="openDialog=false">取 消</el-button>
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
|
|
@ -234,6 +286,7 @@ import { imgUpLoadTwo } from '@/api/system/upload'
|
|||
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
||||
import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi } from "@/api/foodManage/purchaseManage";
|
||||
import { getPurchaseContractInfoApi,addPurchaseContractApi,editPurchaseContractApi,delPurchaseContractApi } from "@/api/foodManage/purchaseManage";
|
||||
import { purchaseOrderPageApi,getPurchaseOrderInfoApi } from "@/api/foodManage/purchaseManage";
|
||||
export default {
|
||||
name: "ContractEdit",
|
||||
dicts: [],
|
||||
|
|
@ -296,7 +349,18 @@ export default {
|
|||
tableListData: [],//货品弹窗-货品表格数据
|
||||
batchChosenMaterial:[],//货品弹窗-货品表格-选中的货品数组
|
||||
noMaterial:false,
|
||||
|
||||
//导入功能
|
||||
openImportDialog:false,
|
||||
queryParams2: { // 货品弹窗-货品表格-查询参数
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderGoodsCode:null
|
||||
},
|
||||
loading2:false,
|
||||
total2: 0, // 总条数
|
||||
tableListData2: [],//导入弹窗-表格数据
|
||||
importRow:{},//导入弹窗-表格数据-选中数据
|
||||
materialDetailsData: [],//导入弹窗-明细数据
|
||||
};
|
||||
},
|
||||
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){
|
||||
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="inquirySupplierNum" :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">
|
||||
<span v-if="scope.row.status==2">已中选</span>
|
||||
<span v-if="scope.row.status!=2">未中选</span>
|
||||
</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" width="120">
|
||||
<!-- <template slot-scope="scope">
|
||||
|
|
|
|||
|
|
@ -471,7 +471,7 @@ export default {
|
|||
this.dialogTableList.forEach(item=>{
|
||||
let obj = Object.assign({}, item)
|
||||
obj.productionPlanNum = Number(obj.purchaseNum)
|
||||
obj.unitPrice = 100
|
||||
obj.unitPrice = 0
|
||||
obj.purchasingBudgetPrice = (100*Number(obj.purchaseNum))
|
||||
param.purchasePlanDetailList.push(obj)
|
||||
param.totalNum = param.totalNum+Number(obj.purchaseNum)
|
||||
|
|
@ -492,7 +492,7 @@ export default {
|
|||
}).catch(() => {});
|
||||
},
|
||||
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))
|
||||
},
|
||||
defaultDateRange() {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<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-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 label="送货日期" prop="deliveryDate">
|
||||
<el-date-picker
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
<el-form-item label="验货日期" prop="inspectDate">
|
||||
<el-date-picker
|
||||
v-model="baseInfo.inspectDate"
|
||||
type="datetime" align="right"
|
||||
type="datetime" align="right"
|
||||
format="yyyy-MM-dd HH:mm:ss" style="width: 240px;"
|
||||
:picker-options="pickerOptions" @change="baseInfo.inspectDate=formatDateTime(baseInfo.inspectDate)">
|
||||
</el-date-picker>
|
||||
|
|
@ -67,15 +67,15 @@
|
|||
ref="upload"
|
||||
:http-request="fileUpLoad"
|
||||
action="#" :limit="5"
|
||||
accept=".xlsx, .xls, .png, .jpg, .jpeg, .docx, .doc"
|
||||
:show-file-list="true"
|
||||
accept=".xlsx, .xls, .png, .jpg, .jpeg, .docx, .doc"
|
||||
:show-file-list="true"
|
||||
:file-list="attachmentList"
|
||||
:on-remove="handleRemoveFile"
|
||||
>
|
||||
<el-button
|
||||
:disabled="attachmentList.length==5"
|
||||
type="primary"
|
||||
size="mini"
|
||||
size="mini"
|
||||
>上传附件
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
|
@ -95,21 +95,21 @@
|
|||
</div>
|
||||
<div style="width: 100%;height: 400px;overflow-y: auto;">
|
||||
<el-table v-loading="loading" :data="materialList" ref="multipleTable" height="380" :row-key="(row)=>{return row.materialId}" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" :reserve-selection="true" />
|
||||
<el-table-column label="序号" align="center" width="80" type="index" />
|
||||
<el-table-column type="selection" width="50" align="center" :reserve-selection="true"/>
|
||||
<el-table-column label="序号" align="center" width="80" type="index"/>
|
||||
<!-- <el-table-column label="图片" align="center" prop="" :show-overflow-tooltip="true" /> -->
|
||||
<el-table-column label="货品编码" align="center" prop="materialCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="货品编码" align="center" prop="materialCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true">
|
||||
<!-- <template slot-scope="scope">
|
||||
<span v-if="scope.row.salesMode==1">按份</span>
|
||||
<span v-if="scope.row.salesMode==2">称重</span>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.unitPrice/100).toFixed(2) }}</span>
|
||||
<!-- <el-input v-model="scope.row.unitPrice" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.unitPrice=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/> -->
|
||||
</template>
|
||||
|
|
@ -169,7 +169,7 @@
|
|||
multiple: true,
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'categoryName'
|
||||
value:'id',label:'categoryName'
|
||||
}" collapse-tags>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
|
|
@ -332,7 +332,7 @@ export default {
|
|||
{ required: true, message: "验货人不能为空", trigger: "blur" }
|
||||
],
|
||||
inspectAttachmentList: [
|
||||
{ required: true, message: "合同附件不能为空", trigger: "change" }
|
||||
{ required: true, message: "查验附件不能为空", trigger: "change" }
|
||||
],
|
||||
},
|
||||
treeAreaOptions:[],
|
||||
|
|
@ -564,66 +564,68 @@ export default {
|
|||
//保存草稿
|
||||
confirmSave(){
|
||||
this.$refs["baseInfo"].validate(valid => {
|
||||
if (valid) {
|
||||
let param = Object.assign({},this.baseInfo);
|
||||
param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
|
||||
param.deliveryTotalNum = 0;//送货总数量
|
||||
param.inspectQualifiedNum = 0;//验货合格总数量
|
||||
param.status=1
|
||||
param.inspectGoodsDetails = []
|
||||
param.inspectAttachment = ""
|
||||
if(this.attachmentList.length>0){
|
||||
let arr = this.attachmentList.map(item=>item.url)
|
||||
param.inspectAttachment = arr.join(',')
|
||||
console.log(param)
|
||||
}
|
||||
this.noMaterial = false;
|
||||
if(this.materialList.length>0){
|
||||
this.materialList.forEach(item=>{
|
||||
if(item.orderNum>item.totalQualifiedNum){
|
||||
if(Number(item.deliveryNum)==0 || Number(item.qualifiedNum)==0){
|
||||
this.noMaterial = true
|
||||
}else{
|
||||
let obj = Object.assign({}, item)
|
||||
param.deliveryTotalNum = param.deliveryTotalNum+Number(obj.deliveryNum)//送货总数量
|
||||
param.inspectQualifiedNum = param.inspectQualifiedNum+Number(obj.qualifiedNum)//验货合格总数量
|
||||
param.inspectGoodsDetails.push(obj)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
if(this.noMaterial){
|
||||
this.$modal.msgError("请输入单价和数量!");
|
||||
}else{
|
||||
this.noMaterial = true;
|
||||
if (valid) {
|
||||
setTimeout(()=>{
|
||||
let param = Object.assign({},this.baseInfo);
|
||||
param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
|
||||
param.deliveryTotalNum = 0;//送货总数量
|
||||
param.inspectQualifiedNum = 0;//验货合格总数量
|
||||
param.status=1
|
||||
param.inspectGoodsDetails = []
|
||||
param.inspectAttachment = ""
|
||||
if(this.attachmentList.length>0){
|
||||
let arr = this.attachmentList.map(item=>item.url)
|
||||
param.inspectAttachment = arr.join(',')
|
||||
console.log(param)
|
||||
}
|
||||
this.noMaterial = false;
|
||||
if(this.materialList.length>0){
|
||||
this.noMaterial = false;
|
||||
}
|
||||
console.log(param)
|
||||
this.materialList.forEach(item=>{
|
||||
if(item.orderNum>item.totalQualifiedNum){
|
||||
if(Number(item.deliveryNum)==0 || Number(item.qualifiedNum)==0){
|
||||
this.noMaterial = true
|
||||
}else{
|
||||
let obj = Object.assign({}, item)
|
||||
param.deliveryTotalNum = param.deliveryTotalNum+Number(obj.deliveryNum)//送货总数量
|
||||
param.inspectQualifiedNum = param.inspectQualifiedNum+Number(obj.qualifiedNum)//验货合格总数量
|
||||
param.inspectGoodsDetails.push(obj)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
if(this.noMaterial){
|
||||
this.$modal.msgError("请添加货品!");
|
||||
this.$modal.msgError("请输入单价和数量!");
|
||||
}else{
|
||||
this.loadingBtn=true;
|
||||
if (this.baseInfo.inspectGoodsId != undefined) {
|
||||
editPurchaseInspectApi(param).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.loadingBtn=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn=false
|
||||
});
|
||||
} else {
|
||||
addPurchaseInspectApi(param).then((response) => {
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
this.loadingBtn=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn=false
|
||||
});
|
||||
}
|
||||
|
||||
this.noMaterial = true;
|
||||
if(this.materialList.length>0){
|
||||
this.noMaterial = false;
|
||||
}
|
||||
console.log(param)
|
||||
if(this.noMaterial){
|
||||
this.$modal.msgError("请添加货品!");
|
||||
}else{
|
||||
this.loadingBtn=true;
|
||||
if (this.baseInfo.inspectGoodsId != undefined) {
|
||||
editPurchaseInspectApi(param).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.loadingBtn=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn=false
|
||||
});
|
||||
} else {
|
||||
addPurchaseInspectApi(param).then((response) => {
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
this.loadingBtn=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn=false
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
},500)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -631,65 +633,67 @@ export default {
|
|||
confirmSubmit(){
|
||||
this.$refs["baseInfo"].validate(valid => {
|
||||
if (valid) {
|
||||
let param = Object.assign({},this.baseInfo);
|
||||
param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
|
||||
param.deliveryTotalNum = 0;//送货总数量
|
||||
param.inspectQualifiedNum = 0;//验货合格总数量
|
||||
param.status=2
|
||||
param.inspectGoodsDetails = []
|
||||
param.inspectAttachment = ""
|
||||
if(this.attachmentList.length>0){
|
||||
let arr = this.attachmentList.map(item=>item.url)
|
||||
param.inspectAttachment = arr.join(',')
|
||||
console.log(param)
|
||||
}
|
||||
this.noMaterial = false;
|
||||
if(this.materialList.length>0){
|
||||
this.materialList.forEach(item=>{
|
||||
if(item.orderNum>item.totalQualifiedNum){
|
||||
if(Number(item.deliveryNum)==0 || Number(item.qualifiedNum)==0){
|
||||
this.noMaterial = true
|
||||
}else{
|
||||
let obj = Object.assign({}, item)
|
||||
param.deliveryTotalNum = param.deliveryTotalNum+Number(obj.deliveryNum)//送货总数量
|
||||
param.inspectQualifiedNum = param.inspectQualifiedNum+Number(obj.qualifiedNum)//验货合格总数量
|
||||
param.inspectGoodsDetails.push(obj)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
if(this.noMaterial){
|
||||
this.$modal.msgError("请输入表格数据!");
|
||||
}else{
|
||||
this.noMaterial = true;
|
||||
if(this.materialList.length>0){
|
||||
this.noMaterial = false;
|
||||
setTimeout(()=>{
|
||||
let param = Object.assign({},this.baseInfo);
|
||||
param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
|
||||
param.deliveryTotalNum = 0;//送货总数量
|
||||
param.inspectQualifiedNum = 0;//验货合格总数量
|
||||
param.status=2
|
||||
param.inspectGoodsDetails = []
|
||||
param.inspectAttachment = ""
|
||||
if(this.attachmentList.length>0){
|
||||
let arr = this.attachmentList.map(item=>item.url)
|
||||
param.inspectAttachment = arr.join(',')
|
||||
console.log(param)
|
||||
}
|
||||
this.noMaterial = false;
|
||||
if(this.materialList.length>0){
|
||||
this.materialList.forEach(item=>{
|
||||
if(item.orderNum>item.totalQualifiedNum){
|
||||
if(Number(item.deliveryNum)==0 || Number(item.qualifiedNum)==0){
|
||||
this.noMaterial = true
|
||||
}else{
|
||||
let obj = Object.assign({}, item)
|
||||
param.deliveryTotalNum = param.deliveryTotalNum+Number(obj.deliveryNum)//送货总数量
|
||||
param.inspectQualifiedNum = param.inspectQualifiedNum+Number(obj.qualifiedNum)//验货合格总数量
|
||||
param.inspectGoodsDetails.push(obj)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log(param)
|
||||
if(this.noMaterial){
|
||||
this.$modal.msgError("请添加货品!");
|
||||
this.$modal.msgError("请输入表格数据!");
|
||||
}else{
|
||||
this.loadingBtn=true;
|
||||
if (this.baseInfo.inspectGoodsId != undefined) {
|
||||
editPurchaseInspectApi(param).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.loadingBtn=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn=false
|
||||
});
|
||||
} else {
|
||||
addPurchaseInspectApi(param).then((response) => {
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
this.loadingBtn=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn=false
|
||||
});
|
||||
}
|
||||
|
||||
this.noMaterial = true;
|
||||
if(this.materialList.length>0){
|
||||
this.noMaterial = false;
|
||||
}
|
||||
console.log(param)
|
||||
if(this.noMaterial){
|
||||
this.$modal.msgError("请添加货品!");
|
||||
}else{
|
||||
this.loadingBtn=true;
|
||||
if (this.baseInfo.inspectGoodsId != undefined) {
|
||||
editPurchaseInspectApi(param).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.loadingBtn=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn=false
|
||||
});
|
||||
} else {
|
||||
addPurchaseInspectApi(param).then((response) => {
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
this.loadingBtn=false
|
||||
this.jumpList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn=false
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
},500)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -828,14 +832,16 @@ export default {
|
|||
setTimeout(()=>{
|
||||
if(Number(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{
|
||||
setTimeout(()=>{
|
||||
if(Number(row.deliveryNum)>Number(row.orderNum)){
|
||||
if(Number(row.deliveryNum)>Number(row.orderNum)){
|
||||
row.deliveryNum = Number(row.orderNum)
|
||||
row.qualifiedNum = Number(row.orderNum)
|
||||
}
|
||||
},500)
|
||||
},200)
|
||||
}
|
||||
},
|
||||
patternValue2(row){
|
||||
|
|
@ -848,7 +854,7 @@ export default {
|
|||
if(Number(row.qualifiedNum)>Number(row.deliveryNum)){
|
||||
row.qualifiedNum = Number(row.deliveryNum)
|
||||
}
|
||||
},500)
|
||||
},200)
|
||||
},
|
||||
//日期
|
||||
formatDate(date) {
|
||||
|
|
|
|||
|
|
@ -421,9 +421,9 @@ export default {
|
|||
},
|
||||
//获取参考价
|
||||
async checkMaterialPrice(){
|
||||
if(this.batchChosenMaterial.length>0){
|
||||
console.log(this.batchChosenMaterial)
|
||||
let arr = this.batchChosenMaterial.map(item=>item.materialId)
|
||||
if(this.materialList.length>0){
|
||||
console.log(this.materialList)
|
||||
let arr = this.materialList.map(item=>item.materialId)
|
||||
let param = {
|
||||
materialIds:arr,
|
||||
type:3
|
||||
|
|
@ -434,8 +434,8 @@ export default {
|
|||
console.log(res)
|
||||
this.$modal.msgSuccess("获取成功!");
|
||||
res.data.forEach(item=>{
|
||||
let index = this.batchChosenMaterial.findIndex(v=>v.materialId==item.materialId)
|
||||
this.$set(this.batchChosenMaterial[index],"unitPrice",item.unitPrice/100)
|
||||
let index = this.materialList.findIndex(v=>v.materialId==item.materialId)
|
||||
this.$set(this.materialList[index],"unitPrice",item.unitPrice/100)
|
||||
})
|
||||
}
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
<el-cascader v-model="baseInfo.areaId"
|
||||
:options="treeAreaOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
|
||||
:disabled="materialList.length>0"
|
||||
:props="{
|
||||
:props="{
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'label'
|
||||
}" @change="handleAreaChange">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="货品仓库" prop="warehouseId">
|
||||
<el-select v-model="baseInfo.warehouseId" clearable :disabled="materialList.length>0" placeholder="请选择货品仓库" style="width: 100%;">
|
||||
<el-option v-for="item in wareHouseOptions"
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" prop="supplierId" :show-overflow-tooltip="true" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.supplierId" placeholder="请选择供应商" style="width: 100%;">
|
||||
|
|
@ -75,9 +75,9 @@
|
|||
:label="item.supplierName"
|
||||
:value="item.supplierId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产日期" align="center" prop="productDate" :show-overflow-tooltip="true" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
:picker-options="pickerOptions3" >
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="保质期截止日期" align="center" prop="expireTime" :show-overflow-tooltip="true" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
<el-table-column label="单价(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<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>
|
||||
</template>
|
||||
</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">
|
||||
<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>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -409,16 +409,16 @@ export default {
|
|||
this.getSupplierData()
|
||||
},
|
||||
/** 查询供应商下拉结构 */
|
||||
getWareHouseData() {
|
||||
getWareHouseData() {
|
||||
drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => {
|
||||
this.wareHouseOptions = response.rows||[];
|
||||
if(this.wareHouseOptions.length>0){
|
||||
this.$set(this.baseInfo,"warehouseId",this.wareHouseOptions[0].warehouseId)
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
/** 查询供应商下拉结构 */
|
||||
getSupplierData() {
|
||||
getSupplierData() {
|
||||
supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
|
||||
this.supplierOptions = response.rows||[];
|
||||
});
|
||||
|
|
@ -448,7 +448,7 @@ export default {
|
|||
this.materialList.splice(index,1)
|
||||
}
|
||||
})
|
||||
setTimeout(()=>{
|
||||
setTimeout(()=>{
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
},300)
|
||||
},
|
||||
|
|
@ -498,7 +498,7 @@ export default {
|
|||
},
|
||||
handleSelectionChange2(selection) {
|
||||
this.batchChosenMaterial = [];
|
||||
selection.forEach(item=>{
|
||||
selection.forEach(item=>{
|
||||
let obj = Object.assign({}, item)
|
||||
obj.unitPrice = item.unitPrice/100;
|
||||
this.$set(obj,"purNum",0)
|
||||
|
|
@ -526,7 +526,7 @@ export default {
|
|||
this.loading = false
|
||||
this.openDialog=false
|
||||
},500)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//保存草稿
|
||||
|
|
@ -542,6 +542,7 @@ export default {
|
|||
this.noMaterial = false;
|
||||
if(this.materialList.length>0){
|
||||
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){
|
||||
this.noMaterial = true
|
||||
}else{
|
||||
|
|
@ -602,6 +603,7 @@ export default {
|
|||
this.noMaterial = false;
|
||||
if(this.materialList.length>0){
|
||||
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){
|
||||
this.noMaterial = true
|
||||
}else{
|
||||
|
|
@ -683,7 +685,7 @@ export default {
|
|||
"pageNum": this.queryParams2.pageNum,
|
||||
"orderGoodsCode": this.queryParams2.orderGoodsCode,
|
||||
"orderStatus":2,
|
||||
"ifAllInto":2,
|
||||
"ifAllInto":2,
|
||||
"areaId": this.baseInfo.areaId,
|
||||
"warehouseId": this.baseInfo.warehouseId,
|
||||
"supplierId": this.baseInfo.deliverySupplierId,
|
||||
|
|
@ -727,13 +729,13 @@ export default {
|
|||
},
|
||||
patternValue(row){
|
||||
row.purNum = row.purNum.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1')
|
||||
if(row.intoNum&&row.intoNum>0){
|
||||
if(row.intoNum&&row.intoNum>0){
|
||||
setTimeout(()=>{
|
||||
if(Number(row.purNum)>(Number(row.totalQualifiedNum)-Number(row.intoNum))){
|
||||
row.purNum = Number(row.totalQualifiedNum)-Number(row.intoNum)
|
||||
}
|
||||
},500)
|
||||
}else{
|
||||
}else{
|
||||
setTimeout(()=>{
|
||||
if(Number(row.purNum)>Number(row.totalQualifiedNum)){
|
||||
row.purNum = Number(row.totalQualifiedNum)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="过期状态" prop="expireState">
|
||||
<el-select v-model="queryParams.expireState" placeholder="请选择过期状态" style="width: 240px;">
|
||||
<el-option label="过期" :value="1"></el-option>
|
||||
<el-option label="过期" :value="1"></el-option>
|
||||
<el-option label="保质期内" :value="2"></el-option>
|
||||
<el-option label="临期" :value="3"></el-option>
|
||||
</el-select>
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getGoodsInquiryInfoApi } from "@/api/foodManage/purchaseManage";
|
||||
import { getGoodsInquiryDetailInfoApi } from "@/api/foodManage/purchaseManage";
|
||||
export default {
|
||||
name: "SupplierQuotationDetail",
|
||||
dicts: [],
|
||||
|
|
@ -179,10 +179,11 @@ export default {
|
|||
getContractInfo(){
|
||||
console.log(this.goodsInquiryData)
|
||||
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.$set(this.baseInfo,'dateRange',[this.baseInfo.startTime,this.baseInfo.endTime])
|
||||
this.materialList = this.baseInfo.detailList;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">总金额</template>
|
||||
{{ baseInfo.bidTotalPrice }}
|
||||
{{ baseInfo.quoteAmount }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<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="singlePrice" :show-overflow-tooltip="true">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额(元)" align="center" prop="" :show-overflow-tooltip="true">
|
||||
|
|
@ -427,6 +427,7 @@ export default {
|
|||
let param = Object.assign({},this.baseInfo);
|
||||
param.arrivalTime = this.formatDateTime(this.baseInfo.arrivalTime)
|
||||
param.detailList = []
|
||||
param.quoteAmount=0
|
||||
console.log(param.arrivalTime)
|
||||
if(param.arrivalTime.includes('1970')){
|
||||
this.$modal.msgError("请选择交货时间!");
|
||||
|
|
@ -442,6 +443,7 @@ export default {
|
|||
obj.quoteNum = Number(obj.purNum)
|
||||
obj.singlePrice = Number(obj.singlePrice)*100
|
||||
obj.totalPrice = (Number(obj.singlePrice)*Number(obj.purNum))
|
||||
param.quoteAmount = param.quoteAmount+obj.totalPrice;
|
||||
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) {
|
||||
// 格式化为 YYYY-MM-DD
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
<el-form-item label="询价标题" prop="title">
|
||||
<el-input v-model="queryParams.title" placeholder="请输入询价标题" maxlength="20" clearable style="width: 240px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="询价状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择询价状态" style="width: 240px;">
|
||||
<el-option label="已决价" :value="2"></el-option>
|
||||
<el-option label="进行中" :value="3"></el-option>
|
||||
<el-option label="未决标" :value="4"></el-option>
|
||||
<el-option label="已取消" :value="5"></el-option>
|
||||
<el-form-item label="询价状态" prop="bidStatus">
|
||||
<el-select v-model="queryParams.bidStatus" placeholder="请选择询价状态" style="width: 240px;">
|
||||
<el-option label="已报价" :value="1"></el-option>
|
||||
<el-option label="未报价" :value="2"></el-option>
|
||||
<el-option label="已中标" :value="3"></el-option>
|
||||
<el-option label="未中标" :value="4"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
|
@ -35,21 +35,20 @@
|
|||
</el-table-column>
|
||||
<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="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">
|
||||
<span v-if="scope.row.status==1">待提交</span>
|
||||
<span v-if="scope.row.status==2">已决价</span>
|
||||
<span v-if="scope.row.status==3">进行中</span>
|
||||
<span v-if="scope.row.status==4">未决标</span>
|
||||
<span v-if="scope.row.status==5">已取消</span>
|
||||
<span v-if="scope.row.bidStatus==1">已报价</span>
|
||||
<span v-if="scope.row.bidStatus==2">未报价</span>
|
||||
<span v-if="scope.row.bidStatus==3">已中标</span>
|
||||
<span v-if="scope.row.bidStatus==4">未中标</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="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">
|
||||
<span>{{ (scope.row.bidTotalPrice/100).toFixed(2) }}</span>
|
||||
<span>{{ (scope.row.quoteAmount/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||
|
|
@ -57,13 +56,13 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
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)"
|
||||
>报价</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
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)"
|
||||
>详情</el-button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -801,6 +801,8 @@ export default {
|
|||
},
|
||||
getSupplierUserList(){
|
||||
let param = {
|
||||
pageNum:1,
|
||||
pageSize:100,
|
||||
deptId:225,
|
||||
queryTyoe:2
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue