Merge remote-tracking branch 'origin/bonus-jyy-smart-canteen' into bonus-jyy-smart-canteen
# Conflicts: # src/views/canteen/order/reserveManagement/index.vue
This commit is contained in:
commit
a730a7761a
|
|
@ -124,6 +124,16 @@ export function delPurchaseContractApi(data) {
|
|||
}
|
||||
})
|
||||
}
|
||||
// 终止
|
||||
export function nullifyPurchaseContractApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/ims_purchase_contract/nullify/'+data.contractIds,
|
||||
method: 'post',
|
||||
headers: {
|
||||
//"merchant-id":"378915229716713472",
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// -------------采购询价---------------
|
||||
//获取采购询价分页列表
|
||||
|
|
@ -319,7 +329,7 @@ export function purchasePlanPageApi(data) {
|
|||
headers: {
|
||||
//"merchant-id":"378915229716713472",
|
||||
},
|
||||
data
|
||||
params:data
|
||||
})
|
||||
}
|
||||
//获取采购计划分页详情
|
||||
|
|
|
|||
|
|
@ -157,6 +157,17 @@ export function delHealthInfoApi(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getHealthReportPageApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/health_person_medical_report/list',
|
||||
method: 'get',
|
||||
headers: {
|
||||
//"merchant-id":"378915229716713472",
|
||||
},
|
||||
params:data
|
||||
})
|
||||
}
|
||||
// 模板-列表
|
||||
export function getModelListApi() {
|
||||
return request({
|
||||
|
|
|
|||
|
|
@ -0,0 +1,193 @@
|
|||
var port = 18080;
|
||||
var connectionMode = "ws:";
|
||||
var wsPrint = null;
|
||||
var wsGetPrinterList = null;
|
||||
var CHUNK_SIZE = 1024 * 64;
|
||||
|
||||
const WebSocketPrint = function (serverURL, strPrinterName, request, callback) {
|
||||
var _websocket;
|
||||
var _callback = callback;
|
||||
var _request = request;
|
||||
var _connectedsocket = false;
|
||||
|
||||
var onMessage = function (msg) {
|
||||
if (_websocket.readyState == 1) {
|
||||
var res = JSON.parse(msg.data);
|
||||
var ret = res.statusMessage;
|
||||
var printerStatus;
|
||||
if (res.printerStatus !== undefined) {
|
||||
printerStatus = res.printerStatus.message;
|
||||
ret += ":" + printerStatus;
|
||||
}
|
||||
_callback(res);
|
||||
} else {
|
||||
_callback(msg.data);
|
||||
}
|
||||
};
|
||||
|
||||
var onClose = function (msg) {
|
||||
if (!_connectedsocket) {
|
||||
_callback("Cannot connect to server");
|
||||
}
|
||||
_websocket.close();
|
||||
_connectedsocket = false;
|
||||
wsPrint = null;
|
||||
};
|
||||
|
||||
var webSocketInit = function (uri) {
|
||||
_websocket = new WebSocket(uri);
|
||||
_websocket.binaryType = "arraybuffer";
|
||||
_websocket.onopen = function (event) {
|
||||
console.log("open : " + uri);
|
||||
};
|
||||
_websocket.onerror = function (event) {
|
||||
wsPrint = null;
|
||||
if (_websocket.readyState == 3) {
|
||||
_callback("Cannot connect to server");
|
||||
}
|
||||
};
|
||||
_websocket.onmessage = function (msg) {
|
||||
onMessage(msg);
|
||||
};
|
||||
_websocket.onclose = function (msg) {
|
||||
onClose(msg);
|
||||
};
|
||||
};
|
||||
|
||||
webSocketInit(serverURL + strPrinterName + _request);
|
||||
|
||||
this.send = function (data) {
|
||||
const sendData = () => {
|
||||
for (let i = 0; i < data.length; i += CHUNK_SIZE) {
|
||||
const chunk = data.slice(i, i + CHUNK_SIZE);
|
||||
_websocket.send(chunk);
|
||||
}
|
||||
};
|
||||
|
||||
if (_websocket.readyState === WebSocket.OPEN) {
|
||||
sendData();
|
||||
} else if (_websocket.readyState === WebSocket.CONNECTING) {
|
||||
const originalOnOpen = _websocket.onopen;
|
||||
_websocket.onopen = function(event) {
|
||||
if (originalOnOpen) originalOnOpen(event);
|
||||
sendData();
|
||||
_connectedsocket = true;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
this.disconnect = function () {
|
||||
if (_websocket && _websocket.readyState === WebSocket.OPEN) {
|
||||
console.log("Closing WebSocket connection...");
|
||||
_websocket.close();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const WebSocketGetPrinterList = function (serverURL, callback) {
|
||||
var _websocket;
|
||||
var _callback = callback;
|
||||
var _connectedsocket = false;
|
||||
|
||||
var onMessage = function (msg) {
|
||||
if (_websocket.readyState == 1) {
|
||||
var res = JSON.parse(msg.data);
|
||||
_callback(res);
|
||||
} else {
|
||||
a;
|
||||
_callback(msg.data);
|
||||
}
|
||||
};
|
||||
|
||||
var onClose = function (msg) {
|
||||
if (!_connectedsocket) {
|
||||
_callback("Cannot connect to server");
|
||||
}
|
||||
_websocket.close();
|
||||
_connectedsocket = false;
|
||||
wsGetPrinterList = null;
|
||||
};
|
||||
|
||||
var webSocketInit = function (uri) {
|
||||
_websocket = new WebSocket(uri);
|
||||
_websocket.onopen = function (event) {
|
||||
console.log("open : " + uri);
|
||||
};
|
||||
_websocket.onerror = function (event) {
|
||||
wsGetPrinterList = null;
|
||||
if (_websocket.readyState == 3) {
|
||||
_callback("Cannot connect to server");
|
||||
}
|
||||
};
|
||||
_websocket.onmessage = function (msg) {
|
||||
onMessage(msg);
|
||||
};
|
||||
_websocket.onclose = function (msg) {
|
||||
console.log("WebSocket connection closed");
|
||||
onClose(msg);
|
||||
};
|
||||
};
|
||||
|
||||
webSocketInit(serverURL);
|
||||
|
||||
this.send = function (strSubmit) {
|
||||
if (_websocket.readyState == 1) {
|
||||
_websocket.send(strSubmit);
|
||||
} else {
|
||||
_websocket.onopen = function () {
|
||||
if (_websocket.readyState == 1) {
|
||||
_websocket.send(strSubmit);
|
||||
_connectedsocket = true;
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function setPort(serverPort) {
|
||||
port = serverPort;
|
||||
}
|
||||
|
||||
function getServerURL() {
|
||||
var localAddress = `//127.0.0.1:${port}/WebSDK/`;
|
||||
var serverURL = connectionMode + localAddress;
|
||||
return {
|
||||
url: serverURL,
|
||||
};
|
||||
}
|
||||
|
||||
function setConnectionMode(mode) {
|
||||
connectionMode = mode;
|
||||
}
|
||||
|
||||
function requestPrint(strPrinterName, strSubmit, _callback) {
|
||||
_callback("");
|
||||
var serverURL = getServerURL().url;
|
||||
console.log(serverURL);
|
||||
|
||||
if (wsPrint == null)
|
||||
wsPrint = new WebSocketPrint(serverURL, strPrinterName, "", _callback);
|
||||
const encoder = new TextEncoder();
|
||||
const bytesSubmit = encoder.encode(strSubmit);
|
||||
wsPrint.send(bytesSubmit);
|
||||
}
|
||||
|
||||
function getPrinterList(category, _callback) {
|
||||
var serverURL = getServerURL().url + "getPrinterList";
|
||||
if (wsGetPrinterList == null) {
|
||||
wsGetPrinterList = new WebSocketGetPrinterList(serverURL, _callback);
|
||||
}
|
||||
wsGetPrinterList.send(JSON.stringify(category));
|
||||
}
|
||||
|
||||
export {
|
||||
setPort,
|
||||
getServerURL,
|
||||
setConnectionMode,
|
||||
requestPrint,
|
||||
getPrinterList,
|
||||
wsPrint,
|
||||
wsGetPrinterList,
|
||||
WebSocketPrint,
|
||||
WebSocketGetPrinterList
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -301,6 +301,7 @@ export default {
|
|||
materialName: [{ required: true, message: '请输入原料名称', trigger: 'blur' }],
|
||||
areaId: [{ required: true, message: '请选择所属区域', trigger: 'change' }],
|
||||
materialTypeId: [{ required: true, message: '请选择原料类别', trigger: 'change' }],
|
||||
unitId: [{ required: true, message: '请选择单位', trigger: 'change' }],
|
||||
salesMode: [{ required: true, message: '请选择计量类型', trigger: 'change' }],
|
||||
shelfLifeDays: [{ required: true, message: '请输入临期天数', trigger: 'change' }],
|
||||
nutritionTypeId: [{ required: true, message: '请选择营养信息类别', trigger: 'change' }],
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="住院日期" align="center" prop="inpatientDate" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column label="慢性病" align="center" prop="chronicNames" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column label="劳动强度" align="center" prop="labourIntensity" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.labourIntensity==1">轻劳动</span>
|
||||
|
|
@ -302,7 +300,7 @@
|
|||
|
||||
<script>
|
||||
import { deptTreeSelect } from '@/api/system/user'
|
||||
import { dictHealthChronicApi,addHealthScienceApi,editHealthScienceApi,delHealthScienceApi,getHealthInfoPageApi
|
||||
import { dictHealthChronicApi,addHealthScienceApi,editHealthScienceApi,delHealthScienceApi,getHealthInfoPageApi,getHealthReportPageApi
|
||||
,getModelListApi,getHealthInfoDetailApi,getModelByIdApi,addReportApi,getReportApi,delReportListApi,getReportByIdApi } from "@/api/healthCenter/index";
|
||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||
import { decryptWithSM4,encryptWithSM4 } from '@/utils/sm';
|
||||
|
|
@ -351,6 +349,7 @@ export default {
|
|||
dateRange:[new Date(),new Date()],
|
||||
chronicOptions:[],
|
||||
personData:{
|
||||
'nickName':''
|
||||
},
|
||||
reportDatas:[
|
||||
{"medicalProjectName":"身体","medicalProjectDetailNames":[
|
||||
|
|
@ -470,7 +469,7 @@ export default {
|
|||
// }else{
|
||||
// this.queryParams.chronicIds = ""
|
||||
// }
|
||||
getHealthInfoPageApi(param).then(response => {
|
||||
getHealthReportPageApi(param).then(response => {
|
||||
this.tableListData = response.rows;
|
||||
this.tableListData.forEach(item=>{
|
||||
if(item.mobile&&item.mobile!=""){
|
||||
|
|
@ -542,6 +541,7 @@ export default {
|
|||
this.title = "新增";
|
||||
},
|
||||
handleReport(row) {
|
||||
console.log("体检报告",)
|
||||
this.form = Object.assign({}, row);
|
||||
this.selectUser=this.form.userId;
|
||||
this.openAddReport = true;
|
||||
|
|
@ -552,60 +552,64 @@ export default {
|
|||
this.loading = false;
|
||||
});
|
||||
getHealthInfoDetailApi(this.form).then(response => {
|
||||
if(response.data){
|
||||
this.personData=response.data;
|
||||
console.log("this.personData",this.personData)
|
||||
if(this.personData.bloodType==1){
|
||||
this.personData.bloodType="A型";
|
||||
}else if(this.personData.bloodType==2){
|
||||
this.personData.bloodType="B型";
|
||||
}else if(this.personData.bloodType==3){
|
||||
this.personData.bloodType="AB型";
|
||||
}else if(this.personData.bloodType==4){
|
||||
this.personData.bloodType="O型";
|
||||
}else if(this.personData.bloodType==5){
|
||||
this.personData.bloodType="Rh阳型";
|
||||
}else if(this.personData.bloodType==6){
|
||||
this.personData.bloodType="Rh阴型";
|
||||
}
|
||||
if(this.personData.doctorAdvice==1){
|
||||
this.personData.doctorAdvice="禁食";
|
||||
}else if(this.personData.doctorAdvice==2){
|
||||
this.personData.doctorAdvice="流食";
|
||||
}else if(this.personData.doctorAdvice==3){
|
||||
this.personData.doctorAdvice="半流食";
|
||||
}else if(this.personData.doctorAdvice==4){
|
||||
this.personData.doctorAdvice="治疗饮食";
|
||||
}
|
||||
if(this.personData.weightControl==1){
|
||||
this.personData.weightControl="减重";
|
||||
}else if(this.personData.weightControl==2){
|
||||
this.personData.weightControl="增重";
|
||||
}
|
||||
if(this.personData.ifHospitalized==1){
|
||||
this.personData.ifHospitalized="是";
|
||||
}else if(this.personData.ifHospitalized==2){
|
||||
this.personData.ifHospitalized="否";
|
||||
}
|
||||
if(this.personData.pregnantStatus==0){
|
||||
this.personData.pregnantStatus="保密";
|
||||
}else if(this.personData.pregnantStatus==1){
|
||||
this.personData.pregnantStatus="未怀孕";
|
||||
}else if(this.personData.pregnantStatus==2){
|
||||
this.personData.pregnantStatus="孕妇(早期)";
|
||||
}else if(this.personData.pregnantStatus==3){
|
||||
this.personData.pregnantStatus="孕妇(中期)";
|
||||
}else if(this.personData.pregnantStatus==4){
|
||||
this.personData.pregnantStatus="孕妇(晚期)";
|
||||
}else if(this.personData.pregnantStatus==5){
|
||||
this.personData.pregnantStatus="乳母";
|
||||
}
|
||||
if(this.personData.labourIntensity==1){
|
||||
this.personData.labourIntensity="轻劳动";
|
||||
}else if(this.personData.labourIntensity==2){
|
||||
this.personData.labourIntensity="中等强度劳动";
|
||||
}else if(this.personData.labourIntensity==3){
|
||||
this.personData.labourIntensity="重强度劳动";
|
||||
|
||||
console.log("this.personData",this.personData)
|
||||
if(this.personData.bloodType==1){
|
||||
this.personData.bloodType="A型";
|
||||
}else if(this.personData.bloodType==2){
|
||||
this.personData.bloodType="B型";
|
||||
}else if(this.personData.bloodType==3){
|
||||
this.personData.bloodType="AB型";
|
||||
}else if(this.personData.bloodType==4){
|
||||
this.personData.bloodType="O型";
|
||||
}else if(this.personData.bloodType==5){
|
||||
this.personData.bloodType="Rh阳型";
|
||||
}else if(this.personData.bloodType==6){
|
||||
this.personData.bloodType="Rh阴型";
|
||||
}
|
||||
if(this.personData.doctorAdvice==1){
|
||||
this.personData.doctorAdvice="禁食";
|
||||
}else if(this.personData.doctorAdvice==2){
|
||||
this.personData.doctorAdvice="流食";
|
||||
}else if(this.personData.doctorAdvice==3){
|
||||
this.personData.doctorAdvice="半流食";
|
||||
}else if(this.personData.doctorAdvice==4){
|
||||
this.personData.doctorAdvice="治疗饮食";
|
||||
}
|
||||
if(this.personData.weightControl==1){
|
||||
this.personData.weightControl="减重";
|
||||
}else if(this.personData.weightControl==2){
|
||||
this.personData.weightControl="增重";
|
||||
}
|
||||
if(this.personData.ifHospitalized==1){
|
||||
this.personData.ifHospitalized="是";
|
||||
}else if(this.personData.ifHospitalized==2){
|
||||
this.personData.ifHospitalized="否";
|
||||
}
|
||||
if(this.personData.pregnantStatus==0){
|
||||
this.personData.pregnantStatus="保密";
|
||||
}else if(this.personData.pregnantStatus==1){
|
||||
this.personData.pregnantStatus="未怀孕";
|
||||
}else if(this.personData.pregnantStatus==2){
|
||||
this.personData.pregnantStatus="孕妇(早期)";
|
||||
}else if(this.personData.pregnantStatus==3){
|
||||
this.personData.pregnantStatus="孕妇(中期)";
|
||||
}else if(this.personData.pregnantStatus==4){
|
||||
this.personData.pregnantStatus="孕妇(晚期)";
|
||||
}else if(this.personData.pregnantStatus==5){
|
||||
this.personData.pregnantStatus="乳母";
|
||||
}
|
||||
if(this.personData.labourIntensity==1){
|
||||
this.personData.labourIntensity="轻劳动";
|
||||
}else if(this.personData.labourIntensity==2){
|
||||
this.personData.labourIntensity="中等强度劳动";
|
||||
}else if(this.personData.labourIntensity==3){
|
||||
this.personData.labourIntensity="重强度劳动";
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
getReportList(){
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -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;
|
||||
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.noMaterial = false;
|
||||
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;
|
||||
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.noMaterial = false;
|
||||
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)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -680,11 +685,11 @@ export default {
|
|||
"stallId": this.baseInfo.stallId
|
||||
}
|
||||
if(this.dateRange&&this.dateRange.length>0){
|
||||
param.startDateTime=this.formatDateTime(this.dateRange[0])
|
||||
param.endDateTime=this.formatDateTime(this.dateRange[1])
|
||||
param.startTime=this.formatDateTime(this.dateRange[0])
|
||||
param.endTime=this.formatDateTime(this.dateRange[1])
|
||||
}else{
|
||||
param.startDateTime=undefined;
|
||||
param.endDateTime=undefined;
|
||||
param.startTime=undefined;
|
||||
param.endTime=undefined;
|
||||
}
|
||||
purchasePlanPageApi(param).then(response => {
|
||||
this.tableListData2 = response.rows;
|
||||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
<el-table-column label="数量" align="center" prop="orderNum" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="总金额(元)" align="center" prop="" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.orderNum*scope.row.singlePrice }}</span>
|
||||
<span>{{ (scope.row.orderNum*scope.row.singlePrice/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"></el-table-column>
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -125,10 +125,16 @@
|
|||
>提交</el-button> -->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
type="text" style="color: red;"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text" style="color: red;"
|
||||
icon="el-icon-edit" v-if="scope.row.commitStatus==2&&scope.row.contractStatus==2"
|
||||
@click="handleNullify(scope.row)"
|
||||
>终止</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -160,7 +166,7 @@
|
|||
|
||||
<script>
|
||||
import { systemAreaTreeApi,getCanteenByAreaApi } from "@/api/base/stall";
|
||||
import { purchaseContractPageApi,getPurchaseContractInfoApi,addPurchaseContractApi,editPurchaseContractApi,delPurchaseContractApi } from "@/api/foodManage/purchaseManage";
|
||||
import { purchaseContractPageApi,getPurchaseContractInfoApi,addPurchaseContractApi,editPurchaseContractApi,delPurchaseContractApi,nullifyPurchaseContractApi } from "@/api/foodManage/purchaseManage";
|
||||
|
||||
export default {
|
||||
name: "",
|
||||
|
|
@ -333,6 +339,15 @@ export default {
|
|||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 终止按钮操作 */
|
||||
handleNullify(row) {
|
||||
this.$modal.confirm('是否确认终止数据项?').then(function() {
|
||||
return nullifyPurchaseContractApi({contractIds:[row.contractId]});
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("终止成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 提交按钮
|
||||
confirmSubmit(row){
|
||||
|
|
|
|||
|
|
@ -752,11 +752,11 @@ export default {
|
|||
"areaId": this.baseInfo.areaId,
|
||||
}
|
||||
if(this.dateRange&&this.dateRange.length>0){
|
||||
param.startDateTime=this.formatDateTime(this.dateRange[0])
|
||||
param.endDateTime=this.formatDateTime(this.dateRange[1])
|
||||
param.startTime=this.formatDateTime(this.dateRange[0])
|
||||
param.endTime=this.formatDateTime(this.dateRange[1])
|
||||
}else{
|
||||
param.startDateTime=undefined;
|
||||
param.endDateTime=undefined;
|
||||
param.startTime=undefined;
|
||||
param.endTime=undefined;
|
||||
}
|
||||
purchasePlanPageApi(param).then(response => {
|
||||
this.tableListData2 = response.rows;
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
<el-table-column label="订货数量" align="center" prop="orderNum" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="总金额(元)" align="center" prop="" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.orderNum*scope.row.unitPrice }}</span>
|
||||
<span>{{ (scope.row.orderNum*scope.row.unitPrice/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="送货数量" align="center" prop="deliveryNum" :show-overflow-tooltip="true"></el-table-column>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -95,13 +95,13 @@
|
|||
</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>
|
||||
|
|
@ -332,7 +332,7 @@ export default {
|
|||
{ required: true, message: "验货人不能为空", trigger: "blur" }
|
||||
],
|
||||
inspectAttachmentList: [
|
||||
{ required: true, message: "合同附件不能为空", trigger: "change" }
|
||||
{ required: true, message: "查验附件不能为空", trigger: "change" }
|
||||
],
|
||||
},
|
||||
treeAreaOptions:[],
|
||||
|
|
@ -565,65 +565,67 @@ 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;
|
||||
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;
|
||||
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)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -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;
|
||||
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.noMaterial = false;
|
||||
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)){
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@
|
|||
<el-table-column label="数量" align="center" prop="orderNum" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="总金额(元)" align="center" prop="" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.orderNum*scope.row.singlePrice }}</span>
|
||||
<span>{{ (scope.row.orderNum*scope.row.singlePrice/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"></el-table-column>
|
||||
|
|
|
|||
|
|
@ -821,11 +821,11 @@ export default {
|
|||
"stallId": this.baseInfo.stallId
|
||||
}
|
||||
if(this.dateRange&&this.dateRange.length>0){
|
||||
param.startDateTime=this.formatDateTime(this.dateRange[0])
|
||||
param.endDateTime=this.formatDateTime(this.dateRange[1])
|
||||
param.startTime=this.formatDateTime(this.dateRange[0])
|
||||
param.endTime=this.formatDateTime(this.dateRange[1])
|
||||
}else{
|
||||
param.startDateTime=undefined;
|
||||
param.endDateTime=undefined;
|
||||
param.startTime=undefined;
|
||||
param.endTime=undefined;
|
||||
}
|
||||
purchasePlanPageApi(param).then(response => {
|
||||
this.tableListData2 = response.rows;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
<el-table-column label="采购数量" align="center" prop="purchaseNum" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="预计采购金额(元)" align="center" prop="" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.purchaseNum*scope.row.unitPrice }}</span>
|
||||
<span>{{ (scope.row.purchaseNum*scope.row.unitPrice/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"></el-table-column>
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -322,11 +322,11 @@ export default {
|
|||
"stallId": this.queryParams.stallId,
|
||||
}
|
||||
if(this.dateRange&&this.dateRange.length>0){
|
||||
param.startDateTime=this.formatDateTime(this.dateRange[0])
|
||||
param.endDateTime=this.formatDateTime(this.dateRange[1])
|
||||
param.startTime=this.formatDateTime(this.dateRange[0])
|
||||
param.endTime=this.formatDateTime(this.dateRange[1])
|
||||
}else{
|
||||
param.startDateTime=undefined;
|
||||
param.endDateTime=undefined;
|
||||
param.startTime=undefined;
|
||||
param.endTime=undefined;
|
||||
}
|
||||
purchasePlanPageApi(param).then(response => {
|
||||
this.tableListData = response.rows;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="差异数" align="center" prop="" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.actualNum-scope.row.bookNum }}</span>
|
||||
<span>{{ (scope.row.actualNum-scope.row.bookNum).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="差异总额(元)" align="center" prop="" :show-overflow-tooltip="true" width="120">
|
||||
|
|
|
|||
|
|
@ -65,14 +65,14 @@
|
|||
<el-table-column label="盘点单号" align="center" prop="checkCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="货品仓库" align="center" prop="warehouseName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="盘点员" align="center" prop="firstCheckUser" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="盘点员" align="center" prop="firstCheckUserName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="盘点开始时间" align="center" prop="firstCheckDate" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="盘点结束时间" align="center" prop="secondCheckDate" :show-overflow-tooltip="true" width="150"/>
|
||||
<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">
|
||||
<span>{{ (scope.row.totalAmount/100).toFixed(2) }}</span>
|
||||
</template> -->
|
||||
<el-table-column label="差异总数" align="center" prop="differNum" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="差异总额(元)" align="center" prop="differAmount" :show-overflow-tooltip="true" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.differAmount/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作人" align="center" prop="createBy" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="操作时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="150"/> -->
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -265,6 +265,7 @@ export default {
|
|||
contractType:undefined,
|
||||
areaId:undefined,
|
||||
canteenId:undefined,
|
||||
intoDate:new Date()
|
||||
},
|
||||
// 表单校验
|
||||
baseRules: {
|
||||
|
|
@ -486,6 +487,7 @@ export default {
|
|||
"pageSize": this.queryParams.pageSize,
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"areaId": this.baseInfo.areaId,
|
||||
"warehouseId": this.baseInfo.warehouseId,
|
||||
"materialName": this.queryParams.materialName,
|
||||
"materialCode": this.queryParams.materialCode,
|
||||
"materialTypeIds": this.queryParams.materialTypeIds,
|
||||
|
|
@ -542,6 +544,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 +605,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,6 +687,7 @@ export default {
|
|||
"pageNum": this.queryParams2.pageNum,
|
||||
"orderGoodsCode": this.queryParams2.orderGoodsCode,
|
||||
"orderStatus":2,
|
||||
"isInspect":0,
|
||||
"ifAllInto":2,
|
||||
"areaId": this.baseInfo.areaId,
|
||||
"warehouseId": this.baseInfo.warehouseId,
|
||||
|
|
|
|||
|
|
@ -69,11 +69,11 @@
|
|||
<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 label="金额(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-table-column label="金额(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.unitPrice/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="入库时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="库存数量" align="center" prop="materialNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="出库数量" align="center" prop="fetchNum" :show-overflow-tooltip="true">
|
||||
|
|
@ -135,11 +135,11 @@
|
|||
<span v-if="scope.row.salesMode==2">称重</span>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<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">
|
||||
<span>{{ (scope.row.unitPrice/100).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="货品库存" align="center" prop="materialNum" :show-overflow-tooltip="true" />
|
||||
|
||||
</el-table>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">总金额</template>
|
||||
{{ baseInfo.bidTotalPrice }}
|
||||
{{ (baseInfo.quoteAmount/100).toFixed(2) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">备注</template>
|
||||
|
|
@ -89,13 +89,13 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getGoodsInquiryInfoApi } from "@/api/foodManage/purchaseManage";
|
||||
import { getGoodsInquiryDetailInfoApi } from "@/api/foodManage/purchaseManage";
|
||||
export default {
|
||||
name: "SupplierQuotationDetail",
|
||||
dicts: [],
|
||||
data() {
|
||||
return {
|
||||
goodsInquiryData:{},//页面传参
|
||||
supplierQuotationData:{},//页面传参
|
||||
loading:false,
|
||||
loadingBtn:false,
|
||||
baseInfo: {
|
||||
|
|
@ -153,15 +153,16 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
if(this.$route.query.goodsInquiryData){
|
||||
this.goodsInquiryData = JSON.parse(this.$route.query.goodsInquiryData)
|
||||
if(this.$route.query.supplierQuotationData){
|
||||
this.supplierQuotationData = JSON.parse(this.$route.query.supplierQuotationData)
|
||||
console.log(this.supplierQuotationData)
|
||||
this.getContractInfo()
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$route.query.goodsInquiryData':function(newId, oldId) {
|
||||
'$route.query.supplierQuotationData':function(newId, oldId) {
|
||||
if(newId){
|
||||
this.goodsInquiryData = JSON.parse(newId)
|
||||
this.supplierQuotationData = JSON.parse(newId)
|
||||
this.getContractInfo()
|
||||
}else{
|
||||
this.baseInfo={}
|
||||
|
|
@ -177,15 +178,16 @@ export default {
|
|||
this.$router.replace({ path: "/foodManage/supplierFunction/supplierQuotation" }); // 要打开的页面
|
||||
},
|
||||
getContractInfo(){
|
||||
console.log(this.goodsInquiryData)
|
||||
console.log(this.supplierQuotationData)
|
||||
let param = {
|
||||
inquiryId:this.goodsInquiryData.inquiryId
|
||||
inquiryId:this.supplierQuotationData.inquiryId,
|
||||
supplierId:this.supplierQuotationData.supplierId
|
||||
}
|
||||
//查询
|
||||
getGoodsInquiryInfoApi(param).then((response) => {
|
||||
this.baseInfo = response.data;
|
||||
getGoodsInquiryDetailInfoApi(param).then((response) => {
|
||||
this.baseInfo = this.supplierQuotationData;
|
||||
// this.$set(this.baseInfo,'dateRange',[this.baseInfo.startTime,this.baseInfo.endTime])
|
||||
this.materialList = this.baseInfo.detailList;
|
||||
this.materialList = response.data;
|
||||
// supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
|
||||
// this.supplierOptions = response.rows||[];
|
||||
// });
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
@ -255,6 +255,7 @@ export default {
|
|||
this.getMaterialTree()
|
||||
if(this.$route.query.supplierQuotationData){
|
||||
this.supplierQuotationData = JSON.parse(this.$route.query.supplierQuotationData)
|
||||
console.log(this.supplierQuotationData)
|
||||
this.getContractInfo()
|
||||
}
|
||||
},
|
||||
|
|
@ -277,7 +278,6 @@ export default {
|
|||
this.$router.replace({ path: "/foodManage/supplierFunction/supplierQuotation" }); // 要打开的页面
|
||||
},
|
||||
getContractInfo(){
|
||||
console.log(this.supplierQuotationData)
|
||||
let param = {
|
||||
inquiryId:this.supplierQuotationData.inquiryId
|
||||
}
|
||||
|
|
@ -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="bidTime" :show-overflow-tooltip="true"/> -->
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -494,11 +494,16 @@ export default {
|
|||
if(row.alternativeSuppliers&&row.alternativeSuppliers.length>0){
|
||||
let index = row.alternativeSuppliers.findIndex(v=>v.supplierId==item.supplierId)
|
||||
if(index==-1){
|
||||
flag=false
|
||||
if(item.status==1){
|
||||
flag=false
|
||||
}else{
|
||||
flag=true
|
||||
}
|
||||
}else{
|
||||
flag=true
|
||||
}
|
||||
}
|
||||
|
||||
return flag;
|
||||
},
|
||||
//首选选过的供应商,不能在备选里选
|
||||
|
|
@ -507,9 +512,13 @@ export default {
|
|||
let flag = false;
|
||||
if(row.supplierId&&row.supplierId!=""){
|
||||
if(item.supplierId==row.supplierId){
|
||||
flag=true
|
||||
if(item.status==1){
|
||||
flag=false
|
||||
}else{
|
||||
flag=true
|
||||
}
|
||||
}else{
|
||||
flag=false
|
||||
flag=true
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
|
|
|
|||
|
|
@ -801,6 +801,8 @@ export default {
|
|||
},
|
||||
getSupplierUserList(){
|
||||
let param = {
|
||||
pageNum:1,
|
||||
pageSize:100,
|
||||
deptId:225,
|
||||
queryTyoe:2
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,7 +216,14 @@
|
|||
align="center"
|
||||
key="userName"
|
||||
prop="userName"
|
||||
v-if="columns[1].visible"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="用户编码"
|
||||
align="center"
|
||||
key="userCode"
|
||||
prop="userCode"
|
||||
v-if="columns[2].visible"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ module.exports = {
|
|||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: `http://192.168.2.75:48380`,//旭
|
||||
target: `http://192.168.0.244:48380`,//测试
|
||||
target: `http://192.168.0.34:48380`,//测试
|
||||
// target: `http://192.168.2.108:48380`,//测试
|
||||
// target: `http://192.168.0.34:48380`,//测试
|
||||
// target: `http://192.168.0.176:48380`,//
|
||||
|
|
|
|||
Loading…
Reference in New Issue