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: {
|
headers: {
|
||||||
//"merchant-id":"378915229716713472",
|
//"merchant-id":"378915229716713472",
|
||||||
},
|
},
|
||||||
data
|
params:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//获取采购计划分页详情
|
//获取采购计划分页详情
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,17 @@ export function delHealthInfoApi(data) {
|
||||||
data: 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() {
|
export function getModelListApi() {
|
||||||
return request({
|
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' }],
|
materialName: [{ required: true, message: '请输入原料名称', trigger: 'blur' }],
|
||||||
areaId: [{ required: true, message: '请选择所属区域', trigger: 'change' }],
|
areaId: [{ required: true, message: '请选择所属区域', trigger: 'change' }],
|
||||||
materialTypeId: [{ required: true, message: '请选择原料类别', trigger: 'change' }],
|
materialTypeId: [{ required: true, message: '请选择原料类别', trigger: 'change' }],
|
||||||
|
unitId: [{ required: true, message: '请选择单位', trigger: 'change' }],
|
||||||
salesMode: [{ required: true, message: '请选择计量类型', trigger: 'change' }],
|
salesMode: [{ required: true, message: '请选择计量类型', trigger: 'change' }],
|
||||||
shelfLifeDays: [{ required: true, message: '请输入临期天数', trigger: 'change' }],
|
shelfLifeDays: [{ required: true, message: '请输入临期天数', trigger: 'change' }],
|
||||||
nutritionTypeId: [{ required: true, message: '请选择营养信息类别', trigger: 'change' }],
|
nutritionTypeId: [{ required: true, message: '请选择营养信息类别', trigger: 'change' }],
|
||||||
|
|
|
||||||
|
|
@ -964,42 +964,44 @@ export default {
|
||||||
confirmSubmit(){
|
confirmSubmit(){
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = this.baseInfo
|
setTimeout(()=>{
|
||||||
if(this.baseInfo.recipeType==1){
|
let param = this.baseInfo
|
||||||
param.recipeDateList = this.dateRangeList;
|
if(this.baseInfo.recipeType==1){
|
||||||
}
|
param.recipeDateList = this.dateRangeList;
|
||||||
if(this.baseInfo.recipeType==2){
|
}
|
||||||
param.recipeDateList = [{
|
if(this.baseInfo.recipeType==2){
|
||||||
anyone:"repeat",
|
param.recipeDateList = [{
|
||||||
detailList:this.detailList
|
anyone:"repeat",
|
||||||
}]
|
detailList:this.detailList
|
||||||
}
|
}]
|
||||||
if(this.baseInfo.recipeType==3){
|
}
|
||||||
param.recipeDateList = this.weekDateList
|
if(this.baseInfo.recipeType==3){
|
||||||
}
|
param.recipeDateList = this.weekDateList
|
||||||
this.noDishes = true;
|
}
|
||||||
param.recipeDateList.forEach(item=>{
|
this.noDishes = true;
|
||||||
item.detailList.forEach(subItem=>{
|
param.recipeDateList.forEach(item=>{
|
||||||
if(subItem.dishesList.length>0){
|
item.detailList.forEach(subItem=>{
|
||||||
this.noDishes=false
|
if(subItem.dishesList.length>0){
|
||||||
subItem.dishesList.forEach(dishItem=>{
|
this.noDishes=false
|
||||||
dishItem.price = Number(dishItem.price)
|
subItem.dishesList.forEach(dishItem=>{
|
||||||
dishItem.salePrice = Number(dishItem.salePrice)
|
dishItem.price = Number(dishItem.price)
|
||||||
})
|
dishItem.salePrice = Number(dishItem.salePrice)
|
||||||
}
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
if(this.noDishes){
|
||||||
if(this.noDishes){
|
this.$modal.msgError("请选中菜品!");
|
||||||
this.$modal.msgError("请选中菜品!");
|
}else{
|
||||||
}else{
|
this.loading=true
|
||||||
this.loading=true
|
addMenuRecipeApi(param).then((response) => {
|
||||||
addMenuRecipeApi(param).then((response) => {
|
this.loading=false
|
||||||
this.loading=false
|
this.jumpList()
|
||||||
this.jumpList()
|
}).catch(() => {
|
||||||
}).catch(() => {
|
this.loading=false
|
||||||
this.loading=false
|
});
|
||||||
});
|
}
|
||||||
}
|
},500)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -337,7 +337,7 @@
|
||||||
<el-button type="primary" @click="copyWeekMenu">确 定</el-button>
|
<el-button type="primary" @click="copyWeekMenu">确 定</el-button>
|
||||||
<el-button @click="openCopyWeek=false">取 消</el-button>
|
<el-button @click="openCopyWeek=false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -796,7 +796,7 @@ export default {
|
||||||
mealtimeName:"夜宵",
|
mealtimeName:"夜宵",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 返回列表页
|
// 返回列表页
|
||||||
jumpList() {
|
jumpList() {
|
||||||
const obj = { path: "/canteen/dish/menuDetail" };
|
const obj = { path: "/canteen/dish/menuDetail" };
|
||||||
|
|
@ -1168,66 +1168,67 @@ export default {
|
||||||
confirmSubmit(){
|
confirmSubmit(){
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = this.baseInfo
|
setTimeout(()=>{
|
||||||
if(this.baseInfo.recipeType==1){
|
let param = this.baseInfo
|
||||||
param.recipeDateList = []
|
if(this.baseInfo.recipeType==1){
|
||||||
this.dateRangeList.forEach(item=>{
|
param.recipeDateList = []
|
||||||
let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0)
|
this.dateRangeList.forEach(item=>{
|
||||||
if(index>-1){
|
let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0)
|
||||||
param.recipeDateList.push(item)
|
if(index>-1){
|
||||||
}else{
|
|
||||||
if(item.editStatus){
|
|
||||||
param.recipeDateList.push(item)
|
param.recipeDateList.push(item)
|
||||||
|
}else{
|
||||||
|
if(item.editStatus){
|
||||||
|
param.recipeDateList.push(item)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
}
|
if(this.baseInfo.recipeType==2){
|
||||||
if(this.baseInfo.recipeType==2){
|
param.recipeDateList = [{
|
||||||
param.recipeDateList = [{
|
anyone:"repeat",
|
||||||
anyone:"repeat",
|
detailList:this.detailList
|
||||||
detailList:this.detailList
|
}]
|
||||||
}]
|
}
|
||||||
}
|
if(this.baseInfo.recipeType==3){
|
||||||
if(this.baseInfo.recipeType==3){
|
param.recipeDateList = []
|
||||||
param.recipeDateList = []
|
this.weekDateList.forEach(item=>{
|
||||||
this.weekDateList.forEach(item=>{
|
let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0)
|
||||||
let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0)
|
if(index>-1){
|
||||||
if(index>-1){
|
|
||||||
param.recipeDateList.push(item)
|
|
||||||
}else{
|
|
||||||
if(item.editStatus){
|
|
||||||
param.recipeDateList.push(item)
|
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)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
console.log(param)
|
||||||
this.noDishes = true;
|
if(this.noDishes){
|
||||||
param.recipeDateList.forEach(item=>{
|
this.$modal.msgError("请选中菜品!");
|
||||||
item.detailList.forEach(subItem=>{
|
}else{
|
||||||
if(subItem.dishesList.length>0){
|
this.loading=true
|
||||||
this.noDishes=false
|
editMenuRecipeApi(param).then((response) => {
|
||||||
subItem.dishesList.forEach(dishItem=>{
|
this.loading=false
|
||||||
dishItem.price = Number(dishItem.price)
|
this.jumpList()
|
||||||
dishItem.salePrice = Number(dishItem.salePrice)
|
}).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>
|
||||||
<el-table-column label="住院日期" align="center" prop="inpatientDate" :show-overflow-tooltip="true">
|
<el-table-column label="住院日期" align="center" prop="inpatientDate" :show-overflow-tooltip="true">
|
||||||
</el-table-column>
|
</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">
|
<el-table-column label="劳动强度" align="center" prop="labourIntensity" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.labourIntensity==1">轻劳动</span>
|
<span v-if="scope.row.labourIntensity==1">轻劳动</span>
|
||||||
|
|
@ -70,7 +68,7 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
<!-- 体检报告对话框 -->
|
<!-- 体检报告对话框 -->
|
||||||
<el-dialog :title="titleAddReport" :visible.sync="openAddReport" custom-class="dialog-right" append-to-body>
|
<el-dialog :title="titleAddReport" :visible.sync="openAddReport" custom-class="dialog-right" append-to-body>
|
||||||
<div style="margin: 10px;">
|
<div style="margin: 10px;">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -99,7 +97,7 @@
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 新增-体检报告对话框 -->
|
<!-- 新增-体检报告对话框 -->
|
||||||
<el-dialog :title="titleAddReportModel" :visible.sync="openAddReportModel" append-to-body>
|
<el-dialog :title="titleAddReportModel" :visible.sync="openAddReportModel" append-to-body>
|
||||||
|
|
@ -302,7 +300,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { deptTreeSelect } from '@/api/system/user'
|
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";
|
,getModelListApi,getHealthInfoDetailApi,getModelByIdApi,addReportApi,getReportApi,delReportListApi,getReportByIdApi } from "@/api/healthCenter/index";
|
||||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||||
import { decryptWithSM4,encryptWithSM4 } from '@/utils/sm';
|
import { decryptWithSM4,encryptWithSM4 } from '@/utils/sm';
|
||||||
|
|
@ -351,6 +349,7 @@ export default {
|
||||||
dateRange:[new Date(),new Date()],
|
dateRange:[new Date(),new Date()],
|
||||||
chronicOptions:[],
|
chronicOptions:[],
|
||||||
personData:{
|
personData:{
|
||||||
|
'nickName':''
|
||||||
},
|
},
|
||||||
reportDatas:[
|
reportDatas:[
|
||||||
{"medicalProjectName":"身体","medicalProjectDetailNames":[
|
{"medicalProjectName":"身体","medicalProjectDetailNames":[
|
||||||
|
|
@ -470,7 +469,7 @@ export default {
|
||||||
// }else{
|
// }else{
|
||||||
// this.queryParams.chronicIds = ""
|
// this.queryParams.chronicIds = ""
|
||||||
// }
|
// }
|
||||||
getHealthInfoPageApi(param).then(response => {
|
getHealthReportPageApi(param).then(response => {
|
||||||
this.tableListData = response.rows;
|
this.tableListData = response.rows;
|
||||||
this.tableListData.forEach(item=>{
|
this.tableListData.forEach(item=>{
|
||||||
if(item.mobile&&item.mobile!=""){
|
if(item.mobile&&item.mobile!=""){
|
||||||
|
|
@ -542,6 +541,7 @@ export default {
|
||||||
this.title = "新增";
|
this.title = "新增";
|
||||||
},
|
},
|
||||||
handleReport(row) {
|
handleReport(row) {
|
||||||
|
console.log("体检报告",)
|
||||||
this.form = Object.assign({}, row);
|
this.form = Object.assign({}, row);
|
||||||
this.selectUser=this.form.userId;
|
this.selectUser=this.form.userId;
|
||||||
this.openAddReport = true;
|
this.openAddReport = true;
|
||||||
|
|
@ -552,60 +552,64 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
getHealthInfoDetailApi(this.form).then(response => {
|
getHealthInfoDetailApi(this.form).then(response => {
|
||||||
|
if(response.data){
|
||||||
this.personData=response.data;
|
this.personData=response.data;
|
||||||
console.log("this.personData",this.personData)
|
|
||||||
if(this.personData.bloodType==1){
|
console.log("this.personData",this.personData)
|
||||||
this.personData.bloodType="A型";
|
if(this.personData.bloodType==1){
|
||||||
}else if(this.personData.bloodType==2){
|
this.personData.bloodType="A型";
|
||||||
this.personData.bloodType="B型";
|
}else if(this.personData.bloodType==2){
|
||||||
}else if(this.personData.bloodType==3){
|
this.personData.bloodType="B型";
|
||||||
this.personData.bloodType="AB型";
|
}else if(this.personData.bloodType==3){
|
||||||
}else if(this.personData.bloodType==4){
|
this.personData.bloodType="AB型";
|
||||||
this.personData.bloodType="O型";
|
}else if(this.personData.bloodType==4){
|
||||||
}else if(this.personData.bloodType==5){
|
this.personData.bloodType="O型";
|
||||||
this.personData.bloodType="Rh阳型";
|
}else if(this.personData.bloodType==5){
|
||||||
}else if(this.personData.bloodType==6){
|
this.personData.bloodType="Rh阳型";
|
||||||
this.personData.bloodType="Rh阴型";
|
}else if(this.personData.bloodType==6){
|
||||||
}
|
this.personData.bloodType="Rh阴型";
|
||||||
if(this.personData.doctorAdvice==1){
|
}
|
||||||
this.personData.doctorAdvice="禁食";
|
if(this.personData.doctorAdvice==1){
|
||||||
}else if(this.personData.doctorAdvice==2){
|
this.personData.doctorAdvice="禁食";
|
||||||
this.personData.doctorAdvice="流食";
|
}else if(this.personData.doctorAdvice==2){
|
||||||
}else if(this.personData.doctorAdvice==3){
|
this.personData.doctorAdvice="流食";
|
||||||
this.personData.doctorAdvice="半流食";
|
}else if(this.personData.doctorAdvice==3){
|
||||||
}else if(this.personData.doctorAdvice==4){
|
this.personData.doctorAdvice="半流食";
|
||||||
this.personData.doctorAdvice="治疗饮食";
|
}else if(this.personData.doctorAdvice==4){
|
||||||
}
|
this.personData.doctorAdvice="治疗饮食";
|
||||||
if(this.personData.weightControl==1){
|
}
|
||||||
this.personData.weightControl="减重";
|
if(this.personData.weightControl==1){
|
||||||
}else if(this.personData.weightControl==2){
|
this.personData.weightControl="减重";
|
||||||
this.personData.weightControl="增重";
|
}else if(this.personData.weightControl==2){
|
||||||
}
|
this.personData.weightControl="增重";
|
||||||
if(this.personData.ifHospitalized==1){
|
}
|
||||||
this.personData.ifHospitalized="是";
|
if(this.personData.ifHospitalized==1){
|
||||||
}else if(this.personData.ifHospitalized==2){
|
this.personData.ifHospitalized="是";
|
||||||
this.personData.ifHospitalized="否";
|
}else if(this.personData.ifHospitalized==2){
|
||||||
}
|
this.personData.ifHospitalized="否";
|
||||||
if(this.personData.pregnantStatus==0){
|
}
|
||||||
this.personData.pregnantStatus="保密";
|
if(this.personData.pregnantStatus==0){
|
||||||
}else if(this.personData.pregnantStatus==1){
|
this.personData.pregnantStatus="保密";
|
||||||
this.personData.pregnantStatus="未怀孕";
|
}else if(this.personData.pregnantStatus==1){
|
||||||
}else if(this.personData.pregnantStatus==2){
|
this.personData.pregnantStatus="未怀孕";
|
||||||
this.personData.pregnantStatus="孕妇(早期)";
|
}else if(this.personData.pregnantStatus==2){
|
||||||
}else if(this.personData.pregnantStatus==3){
|
this.personData.pregnantStatus="孕妇(早期)";
|
||||||
this.personData.pregnantStatus="孕妇(中期)";
|
}else if(this.personData.pregnantStatus==3){
|
||||||
}else if(this.personData.pregnantStatus==4){
|
this.personData.pregnantStatus="孕妇(中期)";
|
||||||
this.personData.pregnantStatus="孕妇(晚期)";
|
}else if(this.personData.pregnantStatus==4){
|
||||||
}else if(this.personData.pregnantStatus==5){
|
this.personData.pregnantStatus="孕妇(晚期)";
|
||||||
this.personData.pregnantStatus="乳母";
|
}else if(this.personData.pregnantStatus==5){
|
||||||
}
|
this.personData.pregnantStatus="乳母";
|
||||||
if(this.personData.labourIntensity==1){
|
}
|
||||||
this.personData.labourIntensity="轻劳动";
|
if(this.personData.labourIntensity==1){
|
||||||
}else if(this.personData.labourIntensity==2){
|
this.personData.labourIntensity="轻劳动";
|
||||||
this.personData.labourIntensity="中等强度劳动";
|
}else if(this.personData.labourIntensity==2){
|
||||||
}else if(this.personData.labourIntensity==3){
|
this.personData.labourIntensity="中等强度劳动";
|
||||||
this.personData.labourIntensity="重强度劳动";
|
}else if(this.personData.labourIntensity==3){
|
||||||
|
this.personData.labourIntensity="重强度劳动";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getReportList(){
|
getReportList(){
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -432,7 +432,7 @@ export default {
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
inverse: true,
|
inverse: true,
|
||||||
offset: 60,
|
offset: 90,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
show: true,
|
show: true,
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -444,7 +444,7 @@ export default {
|
||||||
var str = "";
|
var str = "";
|
||||||
var no = "NO.";
|
var no = "NO.";
|
||||||
num = index + 1;
|
num = index + 1;
|
||||||
value = value.length > 7 ? value.slice(0, 7) + '...' : value
|
value = value.length > 5 ? value.slice(0, 5) + '...' : value
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
str = " {num1|" + num + "} {title1|" + value + "}";
|
str = " {num1|" + num + "} {title1|" + value + "}";
|
||||||
} else if (index === 1) {
|
} else if (index === 1) {
|
||||||
|
|
@ -537,7 +537,7 @@ export default {
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
inverse: true,
|
inverse: true,
|
||||||
offset: -10,
|
offset: -40,
|
||||||
axisTick: "none",
|
axisTick: "none",
|
||||||
axisLine: "none",
|
axisLine: "none",
|
||||||
show: true,
|
show: true,
|
||||||
|
|
@ -747,7 +747,7 @@ export default {
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
inverse: true,
|
inverse: true,
|
||||||
offset: 100,
|
offset: 90,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
show: true,
|
show: true,
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
@ -759,7 +759,7 @@ export default {
|
||||||
var str = "";
|
var str = "";
|
||||||
var no = "NO.";
|
var no = "NO.";
|
||||||
num = index + 1;
|
num = index + 1;
|
||||||
value = value.length > 7 ? value.slice(0, 7) + '...' : value
|
value = value.length > 5 ? value.slice(0, 5) + '...' : value
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
str = " {num1|" + num + "} {title1|" + value + "}";
|
str = " {num1|" + num + "} {title1|" + value + "}";
|
||||||
} else if (index === 1) {
|
} else if (index === 1) {
|
||||||
|
|
|
||||||
|
|
@ -549,46 +549,50 @@ export default {
|
||||||
confirmSave(){
|
confirmSave(){
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = Object.assign({},this.baseInfo);
|
setTimeout(()=>{
|
||||||
param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime)
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.totalNum=0
|
param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime)
|
||||||
param.detailList = []
|
param.totalNum=0
|
||||||
this.noMaterial = false;
|
param.detailList = []
|
||||||
if(this.materialList.length>0){
|
this.noMaterial = false;
|
||||||
this.materialList.forEach(item=>{
|
if(this.materialList.length>0){
|
||||||
if(item.fetchNum==0){
|
this.materialList.forEach(item=>{
|
||||||
this.noMaterial = true
|
if(item.fetchNum==0){
|
||||||
}else{
|
this.noMaterial = true
|
||||||
let obj = Object.assign({}, item)
|
}else{
|
||||||
// obj.singlePrice = Number(obj.singlePrice)*100
|
let obj = Object.assign({}, item)
|
||||||
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.fetchNum))
|
// obj.singlePrice = Number(obj.singlePrice)*100
|
||||||
// param.orderAmount = param.orderAmount+obj.totalPrice;
|
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.fetchNum))
|
||||||
param.totalNum = param.totalNum+Number(obj.fetchNum)
|
// param.orderAmount = param.orderAmount+obj.totalPrice;
|
||||||
param.detailList.push(obj)
|
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;
|
|
||||||
}
|
}
|
||||||
console.log(param)
|
|
||||||
if(this.noMaterial){
|
if(this.noMaterial){
|
||||||
this.$modal.msgError("请添加货品!");
|
this.$modal.msgError("请输入货品数量!");
|
||||||
}else{
|
}else{
|
||||||
this.loadingBtn=true;
|
this.noMaterial = true;
|
||||||
addFetchMaterialApi(param).then((response) => {
|
if(this.materialList.length>0){
|
||||||
this.$modal.msgSuccess("保存成功");
|
this.noMaterial = false;
|
||||||
this.loadingBtn=false
|
}
|
||||||
this.jumpList()
|
console.log(param)
|
||||||
}).catch(() => {
|
if(this.noMaterial){
|
||||||
this.loadingBtn=false
|
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(){
|
confirmSubmit(){
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = Object.assign({},this.baseInfo);
|
setTimeout(()=>{
|
||||||
param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime)
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.totalNum=0
|
param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime)
|
||||||
param.detailList = []
|
param.totalNum=0
|
||||||
this.noMaterial = false;
|
param.detailList = []
|
||||||
if(this.materialList.length>0){
|
this.noMaterial = false;
|
||||||
this.materialList.forEach(item=>{
|
if(this.materialList.length>0){
|
||||||
if(item.fetchNum==0){
|
this.materialList.forEach(item=>{
|
||||||
this.noMaterial = true
|
if(item.fetchNum==0){
|
||||||
}else{
|
this.noMaterial = true
|
||||||
let obj = Object.assign({}, item)
|
}else{
|
||||||
// obj.singlePrice = Number(obj.singlePrice)*100
|
let obj = Object.assign({}, item)
|
||||||
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.fetchNum))
|
// obj.singlePrice = Number(obj.singlePrice)*100
|
||||||
// param.orderAmount = param.orderAmount+obj.totalPrice;
|
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.fetchNum))
|
||||||
param.totalNum = param.totalNum+Number(obj.fetchNum)
|
// param.orderAmount = param.orderAmount+obj.totalPrice;
|
||||||
param.detailList.push(obj)
|
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;
|
|
||||||
}
|
}
|
||||||
console.log(param)
|
|
||||||
if(this.noMaterial){
|
if(this.noMaterial){
|
||||||
this.$modal.msgError("请添加货品!");
|
this.$modal.msgError("请输入货品数量!");
|
||||||
}else{
|
}else{
|
||||||
this.loadingBtn=true;
|
this.noMaterial = true;
|
||||||
editFetchMaterialApi(param).then((response) => {
|
if(this.materialList.length>0){
|
||||||
this.$modal.msgSuccess("提交成功");
|
this.noMaterial = false;
|
||||||
this.loadingBtn=false
|
}
|
||||||
this.jumpList()
|
console.log(param)
|
||||||
}).catch(() => {
|
if(this.noMaterial){
|
||||||
this.loadingBtn=false
|
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
|
"stallId": this.baseInfo.stallId
|
||||||
}
|
}
|
||||||
if(this.dateRange&&this.dateRange.length>0){
|
if(this.dateRange&&this.dateRange.length>0){
|
||||||
param.startDateTime=this.formatDateTime(this.dateRange[0])
|
param.startTime=this.formatDateTime(this.dateRange[0])
|
||||||
param.endDateTime=this.formatDateTime(this.dateRange[1])
|
param.endTime=this.formatDateTime(this.dateRange[1])
|
||||||
}else{
|
}else{
|
||||||
param.startDateTime=undefined;
|
param.startTime=undefined;
|
||||||
param.endDateTime=undefined;
|
param.endTime=undefined;
|
||||||
}
|
}
|
||||||
purchasePlanPageApi(param).then(response => {
|
purchasePlanPageApi(param).then(response => {
|
||||||
this.tableListData2 = response.rows;
|
this.tableListData2 = response.rows;
|
||||||
|
|
@ -725,7 +730,7 @@ export default {
|
||||||
if(Number(row.fetchNum)>Number(row.materialNum)){
|
if(Number(row.fetchNum)>Number(row.materialNum)){
|
||||||
row.fetchNum = row.materialNum
|
row.fetchNum = row.materialNum
|
||||||
}
|
}
|
||||||
},500)
|
},200)
|
||||||
},
|
},
|
||||||
defaultDateRange() {
|
defaultDateRange() {
|
||||||
const end = new Date(new Date().toLocaleDateString());
|
const end = new Date(new Date().toLocaleDateString());
|
||||||
|
|
|
||||||
|
|
@ -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="orderNum" :show-overflow-tooltip="true"></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">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.orderNum*scope.row.singlePrice }}</span>
|
<span>{{ (scope.row.orderNum*scope.row.singlePrice/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"></el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex;align-items: center;">
|
<div style="display: flex;align-items: center;">
|
||||||
<el-button type="primary" plain @click="addMaterial">添加货品</el-button>
|
<el-button type="primary" plain @click="addMaterial">添加货品</el-button>
|
||||||
|
<el-button type="primary" plain @click="importPurchaseOrder">导入采购订单</el-button>
|
||||||
<el-button type="danger" plain @click="delMaterial">删除</el-button>
|
<el-button type="danger" plain @click="delMaterial">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -226,6 +227,57 @@
|
||||||
<el-button @click="openDialog=false">取 消</el-button>
|
<el-button @click="openDialog=false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 导入 -->
|
||||||
|
<el-dialog title="导入采购订单" :visible.sync="openImportDialog" width="60%" append-to-body >
|
||||||
|
<div style="width: 100%;height:600px;">
|
||||||
|
<el-form :model="queryParams2" ref="queryForm2" size="small" :inline="true" label-width="100px">
|
||||||
|
<el-form-item label="采购单号" prop="orderGoodsCode">
|
||||||
|
<el-input v-model="queryParams2.orderGoodsCode" placeholder="请输入采购单号" maxlength="20" clearable style="width: 240px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery2">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<!-- :row-key="(row)=>{return row.fetchMaterialId}" @selection-change="handleSelectionChange3" -->
|
||||||
|
<el-table v-loading="loading2" :data="tableListData2" ref="multipleTable2" height="500">
|
||||||
|
<!-- <el-table-column type="selection" width="50" align="center" :reserve-selection="true" /> -->
|
||||||
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{(queryParams2.pageNum - 1) * queryParams2.pageSize + scope.$index + 1}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="采购单号" align="center" prop="orderGoodsCode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="采购订单标题" align="center" prop="orderTitle" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="采购总金额(元" align="center" prop="orderAmount" :show-overflow-tooltip="true" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (scope.row.orderAmount/100).toFixed(2) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="创建人" align="center" prop="createBy" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="text"
|
||||||
|
@click="confirmImport(scope.row)" v-if="scope.row.orderStatus==2"
|
||||||
|
>导入</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total2>0"
|
||||||
|
:total="total2"
|
||||||
|
:page.sync="queryParams2.pageNum"
|
||||||
|
:limit.sync="queryParams2.pageSize"
|
||||||
|
@pagination="getList2"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="openImportDialog=false">确 定</el-button>
|
||||||
|
<el-button @click="openImportDialog=false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -234,6 +286,7 @@ import { imgUpLoadTwo } from '@/api/system/upload'
|
||||||
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
||||||
import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi } from "@/api/foodManage/purchaseManage";
|
import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi } from "@/api/foodManage/purchaseManage";
|
||||||
import { getPurchaseContractInfoApi,addPurchaseContractApi,editPurchaseContractApi,delPurchaseContractApi } from "@/api/foodManage/purchaseManage";
|
import { getPurchaseContractInfoApi,addPurchaseContractApi,editPurchaseContractApi,delPurchaseContractApi } from "@/api/foodManage/purchaseManage";
|
||||||
|
import { purchaseOrderPageApi,getPurchaseOrderInfoApi } from "@/api/foodManage/purchaseManage";
|
||||||
export default {
|
export default {
|
||||||
name: "ContractEdit",
|
name: "ContractEdit",
|
||||||
dicts: [],
|
dicts: [],
|
||||||
|
|
@ -296,7 +349,18 @@ export default {
|
||||||
tableListData: [],//货品弹窗-货品表格数据
|
tableListData: [],//货品弹窗-货品表格数据
|
||||||
batchChosenMaterial:[],//货品弹窗-货品表格-选中的货品数组
|
batchChosenMaterial:[],//货品弹窗-货品表格-选中的货品数组
|
||||||
noMaterial:false,
|
noMaterial:false,
|
||||||
|
//导入功能
|
||||||
|
openImportDialog:false,
|
||||||
|
queryParams2: { // 货品弹窗-货品表格-查询参数
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
orderGoodsCode:null
|
||||||
|
},
|
||||||
|
loading2:false,
|
||||||
|
total2: 0, // 总条数
|
||||||
|
tableListData2: [],//导入弹窗-表格数据
|
||||||
|
importRow:{},//导入弹窗-表格数据-选中数据
|
||||||
|
materialDetailsData: [],//导入弹窗-明细数据
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -626,7 +690,84 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//导入
|
||||||
|
importPurchaseOrder(){
|
||||||
|
if(this.baseInfo.areaId!=undefined||this.baseInfo.deliveryWarehouseId!=undefined||this.baseInfo.supplierId!=undefined){
|
||||||
|
this.openImportDialog=true
|
||||||
|
this.resetQuery2()
|
||||||
|
// setTimeout(()=>{
|
||||||
|
// this.$refs.multipleTable2.clearSelection()
|
||||||
|
// },300)
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("请先选择区域,供应商");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery2() {
|
||||||
|
this.queryParams2.pageNum = 1;
|
||||||
|
this.getList2();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery2() {
|
||||||
|
this.queryParams2 = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
}
|
||||||
|
this.resetForm("queryForm2");
|
||||||
|
this.handleQuery2();
|
||||||
|
},
|
||||||
|
/** 查询列表 */
|
||||||
|
getList2() {
|
||||||
|
this.loading2 = true;
|
||||||
|
let param = {
|
||||||
|
"pageSize": this.queryParams2.pageSize,
|
||||||
|
"pageNum": this.queryParams2.pageNum,
|
||||||
|
"orderGoodsCode": this.queryParams2.orderGoodsCode,
|
||||||
|
"orderStatus":2,
|
||||||
|
// "isInspect":2,
|
||||||
|
"areaId": this.baseInfo.areaId,
|
||||||
|
// "warehouseId": this.baseInfo.deliveryWarehouseId,
|
||||||
|
"supplierId": this.baseInfo.supplierId,
|
||||||
|
}
|
||||||
|
purchaseOrderPageApi(param).then(response => {
|
||||||
|
this.tableListData2 = response.rows;
|
||||||
|
this.total2 = Number(response.total);
|
||||||
|
this.loading2 = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
confirmImport(row){
|
||||||
|
console.log(row)
|
||||||
|
this.importRow = row;
|
||||||
|
let param = {
|
||||||
|
orderGoodsId:this.importRow.orderGoodsId
|
||||||
|
}
|
||||||
|
getPurchaseOrderInfoApi(param).then((response) => {
|
||||||
|
this.materialDetailsData = response.data.orderGoodsDetailList||[];
|
||||||
|
this.$modal.confirm('是否确认导入采购订单?').then(()=>{
|
||||||
|
if(this.materialDetailsData.length>0){
|
||||||
|
this.contractMaterialList = this.materialDetailsData;
|
||||||
|
this.contractMaterialList.forEach(item=>{
|
||||||
|
this.$set(item,"singlePrice",Number(item.singlePrice/100))
|
||||||
|
this.$set(item,"orderNum",item.orderNum)
|
||||||
|
// if(item.totalQualifiedNum&&item.totalQualifiedNum>0){
|
||||||
|
// this.$set(item,"deliveryNum",Number(item.orderNum)-Number(item.totalQualifiedNum))
|
||||||
|
// this.$set(item,"qualifiedNum",Number(item.orderNum)-Number(item.totalQualifiedNum))
|
||||||
|
// }else{
|
||||||
|
// this.$set(item,"deliveryNum",Number(item.orderNum))
|
||||||
|
// this.$set(item,"qualifiedNum",Number(item.orderNum))
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
// this.baseInfo.relateOrderGoodsId = this.importRow.orderGoodsCode;
|
||||||
|
this.$set(this.baseInfo,"remark","导入采购订单")
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.openImportDialog=false
|
||||||
|
},500)
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("采购订单明细无货品!");
|
||||||
|
}
|
||||||
|
}).catch(() => {});
|
||||||
|
});
|
||||||
|
},
|
||||||
//附件上传
|
//附件上传
|
||||||
fileUpLoad(param){
|
fileUpLoad(param){
|
||||||
param.type = 'canteen'
|
param.type = 'canteen'
|
||||||
|
|
|
||||||
|
|
@ -125,10 +125,16 @@
|
||||||
>提交</el-button> -->
|
>提交</el-button> -->
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text" style="color: red;"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button>
|
>删除</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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -160,7 +166,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { systemAreaTreeApi,getCanteenByAreaApi } from "@/api/base/stall";
|
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 {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
|
|
@ -334,6 +340,15 @@ export default {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
|
/** 终止按钮操作 */
|
||||||
|
handleNullify(row) {
|
||||||
|
this.$modal.confirm('是否确认终止数据项?').then(function() {
|
||||||
|
return nullifyPurchaseContractApi({contractIds:[row.contractId]});
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("终止成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
confirmSubmit(row){
|
confirmSubmit(row){
|
||||||
let param = Object.assign({},row);
|
let param = Object.assign({},row);
|
||||||
|
|
|
||||||
|
|
@ -752,11 +752,11 @@ export default {
|
||||||
"areaId": this.baseInfo.areaId,
|
"areaId": this.baseInfo.areaId,
|
||||||
}
|
}
|
||||||
if(this.dateRange&&this.dateRange.length>0){
|
if(this.dateRange&&this.dateRange.length>0){
|
||||||
param.startDateTime=this.formatDateTime(this.dateRange[0])
|
param.startTime=this.formatDateTime(this.dateRange[0])
|
||||||
param.endDateTime=this.formatDateTime(this.dateRange[1])
|
param.endTime=this.formatDateTime(this.dateRange[1])
|
||||||
}else{
|
}else{
|
||||||
param.startDateTime=undefined;
|
param.startTime=undefined;
|
||||||
param.endDateTime=undefined;
|
param.endTime=undefined;
|
||||||
}
|
}
|
||||||
purchasePlanPageApi(param).then(response => {
|
purchasePlanPageApi(param).then(response => {
|
||||||
this.tableListData2 = response.rows;
|
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="area" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="邀请供应商(家)" align="center" prop="inquirySupplierNum" :show-overflow-tooltip="true" />
|
<el-table-column label="邀请供应商(家)" align="center" prop="inquirySupplierNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="已报价供应商(家)" align="center" prop="supplierNum" :show-overflow-tooltip="true" />
|
<el-table-column label="已报价供应商(家)" align="center" prop="supplierNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="中选状态" align="center" prop="status" :show-overflow-tooltip="true" width="100">
|
<!-- <el-table-column label="中选状态" align="center" prop="status" :show-overflow-tooltip="true" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.status==2">已中选</span>
|
<span v-if="scope.row.status==2">已中选</span>
|
||||||
<span v-if="scope.row.status!=2">未中选</span>
|
<span v-if="scope.row.status!=2">未中选</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="中选供应商" align="center" prop="" :show-overflow-tooltip="true" />
|
<el-table-column label="中选供应商" align="center" prop="" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="中选金额(元)" align="center" prop="" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="中选金额(元)" align="center" prop="" :show-overflow-tooltip="true" width="120">
|
||||||
<!-- <template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
|
|
|
||||||
|
|
@ -471,7 +471,7 @@ export default {
|
||||||
this.dialogTableList.forEach(item=>{
|
this.dialogTableList.forEach(item=>{
|
||||||
let obj = Object.assign({}, item)
|
let obj = Object.assign({}, item)
|
||||||
obj.productionPlanNum = Number(obj.purchaseNum)
|
obj.productionPlanNum = Number(obj.purchaseNum)
|
||||||
obj.unitPrice = 100
|
obj.unitPrice = 0
|
||||||
obj.purchasingBudgetPrice = (100*Number(obj.purchaseNum))
|
obj.purchasingBudgetPrice = (100*Number(obj.purchaseNum))
|
||||||
param.purchasePlanDetailList.push(obj)
|
param.purchasePlanDetailList.push(obj)
|
||||||
param.totalNum = param.totalNum+Number(obj.purchaseNum)
|
param.totalNum = param.totalNum+Number(obj.purchaseNum)
|
||||||
|
|
@ -492,7 +492,7 @@ export default {
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
inputRate(row){
|
inputRate(row){
|
||||||
this.$set(row,"rate",row.rate.replace(/[^\d]/g,''))
|
this.$set(row,"rate",row.rate.replace(/^(([1-9]{1}\d*)|(0{1}))(\.\d{2})$/,''))
|
||||||
this.$set(row,"purchaseNum",(row.totalConvertWeight*((Number(row.rate)/100)+1)).toFixed(4))
|
this.$set(row,"purchaseNum",(row.totalConvertWeight*((Number(row.rate)/100)+1)).toFixed(4))
|
||||||
},
|
},
|
||||||
defaultDateRange() {
|
defaultDateRange() {
|
||||||
|
|
|
||||||
|
|
@ -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="orderNum" :show-overflow-tooltip="true"></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">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.orderNum*scope.row.unitPrice }}</span>
|
<span>{{ (scope.row.orderNum*scope.row.unitPrice/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="送货数量" align="center" prop="deliveryNum" :show-overflow-tooltip="true"></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;">
|
<div style="background: #FFF;padding: 10px;border-radius: 10px;margin-bottom: 20px;">
|
||||||
<el-form :model="baseInfo" ref="baseInfo" :rules="baseRules" size="medium" :inline="true" label-width="110px">
|
<el-form :model="baseInfo" ref="baseInfo" :rules="baseRules" size="medium" :inline="true" label-width="110px">
|
||||||
<el-form-item label="验货单编号" prop="inspectGoodsCode">
|
<el-form-item label="验货单编号" prop="inspectGoodsCode">
|
||||||
<el-input v-model="baseInfo.inspectGoodsCode" placeholder="合同编号自动生成" disabled maxlength="20" clearable style="width: 240px"/>
|
<el-input v-model="baseInfo.inspectGoodsCode" placeholder="验货单编号自动生成" disabled maxlength="20" clearable style="width: 240px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="送货日期" prop="deliveryDate">
|
<el-form-item label="送货日期" prop="deliveryDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
<el-form-item label="验货日期" prop="inspectDate">
|
<el-form-item label="验货日期" prop="inspectDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="baseInfo.inspectDate"
|
v-model="baseInfo.inspectDate"
|
||||||
type="datetime" align="right"
|
type="datetime" align="right"
|
||||||
format="yyyy-MM-dd HH:mm:ss" style="width: 240px;"
|
format="yyyy-MM-dd HH:mm:ss" style="width: 240px;"
|
||||||
:picker-options="pickerOptions" @change="baseInfo.inspectDate=formatDateTime(baseInfo.inspectDate)">
|
:picker-options="pickerOptions" @change="baseInfo.inspectDate=formatDateTime(baseInfo.inspectDate)">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
|
|
@ -67,15 +67,15 @@
|
||||||
ref="upload"
|
ref="upload"
|
||||||
:http-request="fileUpLoad"
|
:http-request="fileUpLoad"
|
||||||
action="#" :limit="5"
|
action="#" :limit="5"
|
||||||
accept=".xlsx, .xls, .png, .jpg, .jpeg, .docx, .doc"
|
accept=".xlsx, .xls, .png, .jpg, .jpeg, .docx, .doc"
|
||||||
:show-file-list="true"
|
:show-file-list="true"
|
||||||
:file-list="attachmentList"
|
:file-list="attachmentList"
|
||||||
:on-remove="handleRemoveFile"
|
:on-remove="handleRemoveFile"
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="attachmentList.length==5"
|
:disabled="attachmentList.length==5"
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
>上传附件
|
>上传附件
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
|
@ -95,21 +95,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%;height: 400px;overflow-y: auto;">
|
<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 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 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" width="80" type="index"/>
|
||||||
<!-- <el-table-column label="图片" align="center" prop="" :show-overflow-tooltip="true" /> -->
|
<!-- <el-table-column label="图片" align="center" prop="" :show-overflow-tooltip="true" /> -->
|
||||||
<el-table-column label="货品编码" align="center" prop="materialCode" :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="materialName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="货品类别" align="center" prop="materialTypeName" :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="unitName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true">
|
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true">
|
||||||
<!-- <template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
<span v-if="scope.row.salesMode==1">按份</span>
|
<span v-if="scope.row.salesMode==1">按份</span>
|
||||||
<span v-if="scope.row.salesMode==2">称重</span>
|
<span v-if="scope.row.salesMode==2">称重</span>
|
||||||
</template> -->
|
</template> -->
|
||||||
</el-table-column>
|
</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">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.unitPrice/100).toFixed(2) }}</span>
|
<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'))"/> -->
|
<!-- <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>
|
</template>
|
||||||
|
|
@ -169,7 +169,7 @@
|
||||||
multiple: true,
|
multiple: true,
|
||||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||||
value:'id',label:'categoryName'
|
value:'id',label:'categoryName'
|
||||||
}" collapse-tags>
|
}" collapse-tags>
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -332,7 +332,7 @@ export default {
|
||||||
{ required: true, message: "验货人不能为空", trigger: "blur" }
|
{ required: true, message: "验货人不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
inspectAttachmentList: [
|
inspectAttachmentList: [
|
||||||
{ required: true, message: "合同附件不能为空", trigger: "change" }
|
{ required: true, message: "查验附件不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
treeAreaOptions:[],
|
treeAreaOptions:[],
|
||||||
|
|
@ -564,66 +564,68 @@ export default {
|
||||||
//保存草稿
|
//保存草稿
|
||||||
confirmSave(){
|
confirmSave(){
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = Object.assign({},this.baseInfo);
|
setTimeout(()=>{
|
||||||
param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.deliveryTotalNum = 0;//送货总数量
|
param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
|
||||||
param.inspectQualifiedNum = 0;//验货合格总数量
|
param.deliveryTotalNum = 0;//送货总数量
|
||||||
param.status=1
|
param.inspectQualifiedNum = 0;//验货合格总数量
|
||||||
param.inspectGoodsDetails = []
|
param.status=1
|
||||||
param.inspectAttachment = ""
|
param.inspectGoodsDetails = []
|
||||||
if(this.attachmentList.length>0){
|
param.inspectAttachment = ""
|
||||||
let arr = this.attachmentList.map(item=>item.url)
|
if(this.attachmentList.length>0){
|
||||||
param.inspectAttachment = arr.join(',')
|
let arr = this.attachmentList.map(item=>item.url)
|
||||||
console.log(param)
|
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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if(this.noMaterial){
|
|
||||||
this.$modal.msgError("请输入单价和数量!");
|
|
||||||
}else{
|
|
||||||
this.noMaterial = true;
|
|
||||||
if(this.materialList.length>0){
|
if(this.materialList.length>0){
|
||||||
this.noMaterial = false;
|
this.materialList.forEach(item=>{
|
||||||
}
|
if(item.orderNum>item.totalQualifiedNum){
|
||||||
console.log(param)
|
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){
|
if(this.noMaterial){
|
||||||
this.$modal.msgError("请添加货品!");
|
this.$modal.msgError("请输入单价和数量!");
|
||||||
}else{
|
}else{
|
||||||
this.loadingBtn=true;
|
this.noMaterial = true;
|
||||||
if (this.baseInfo.inspectGoodsId != undefined) {
|
if(this.materialList.length>0){
|
||||||
editPurchaseInspectApi(param).then((response) => {
|
this.noMaterial = false;
|
||||||
this.$modal.msgSuccess("修改成功");
|
}
|
||||||
this.loadingBtn=false
|
console.log(param)
|
||||||
this.jumpList()
|
if(this.noMaterial){
|
||||||
}).catch(() => {
|
this.$modal.msgError("请添加货品!");
|
||||||
this.loadingBtn=false
|
}else{
|
||||||
});
|
this.loadingBtn=true;
|
||||||
} else {
|
if (this.baseInfo.inspectGoodsId != undefined) {
|
||||||
addPurchaseInspectApi(param).then((response) => {
|
editPurchaseInspectApi(param).then((response) => {
|
||||||
this.$modal.msgSuccess("保存成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
this.jumpList()
|
this.jumpList()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loadingBtn=false
|
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(){
|
confirmSubmit(){
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = Object.assign({},this.baseInfo);
|
setTimeout(()=>{
|
||||||
param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.deliveryTotalNum = 0;//送货总数量
|
param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
|
||||||
param.inspectQualifiedNum = 0;//验货合格总数量
|
param.deliveryTotalNum = 0;//送货总数量
|
||||||
param.status=2
|
param.inspectQualifiedNum = 0;//验货合格总数量
|
||||||
param.inspectGoodsDetails = []
|
param.status=2
|
||||||
param.inspectAttachment = ""
|
param.inspectGoodsDetails = []
|
||||||
if(this.attachmentList.length>0){
|
param.inspectAttachment = ""
|
||||||
let arr = this.attachmentList.map(item=>item.url)
|
if(this.attachmentList.length>0){
|
||||||
param.inspectAttachment = arr.join(',')
|
let arr = this.attachmentList.map(item=>item.url)
|
||||||
console.log(param)
|
param.inspectAttachment = arr.join(',')
|
||||||
}
|
console.log(param)
|
||||||
this.noMaterial = false;
|
}
|
||||||
if(this.materialList.length>0){
|
this.noMaterial = false;
|
||||||
this.materialList.forEach(item=>{
|
if(this.materialList.length>0){
|
||||||
if(item.orderNum>item.totalQualifiedNum){
|
this.materialList.forEach(item=>{
|
||||||
if(Number(item.deliveryNum)==0 || Number(item.qualifiedNum)==0){
|
if(item.orderNum>item.totalQualifiedNum){
|
||||||
this.noMaterial = true
|
if(Number(item.deliveryNum)==0 || Number(item.qualifiedNum)==0){
|
||||||
}else{
|
this.noMaterial = true
|
||||||
let obj = Object.assign({}, item)
|
}else{
|
||||||
param.deliveryTotalNum = param.deliveryTotalNum+Number(obj.deliveryNum)//送货总数量
|
let obj = Object.assign({}, item)
|
||||||
param.inspectQualifiedNum = param.inspectQualifiedNum+Number(obj.qualifiedNum)//验货合格总数量
|
param.deliveryTotalNum = param.deliveryTotalNum+Number(obj.deliveryNum)//送货总数量
|
||||||
param.inspectGoodsDetails.push(obj)
|
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;
|
|
||||||
}
|
}
|
||||||
console.log(param)
|
|
||||||
if(this.noMaterial){
|
if(this.noMaterial){
|
||||||
this.$modal.msgError("请添加货品!");
|
this.$modal.msgError("请输入表格数据!");
|
||||||
}else{
|
}else{
|
||||||
this.loadingBtn=true;
|
this.noMaterial = true;
|
||||||
if (this.baseInfo.inspectGoodsId != undefined) {
|
if(this.materialList.length>0){
|
||||||
editPurchaseInspectApi(param).then((response) => {
|
this.noMaterial = false;
|
||||||
this.$modal.msgSuccess("修改成功");
|
}
|
||||||
this.loadingBtn=false
|
console.log(param)
|
||||||
this.jumpList()
|
if(this.noMaterial){
|
||||||
}).catch(() => {
|
this.$modal.msgError("请添加货品!");
|
||||||
this.loadingBtn=false
|
}else{
|
||||||
});
|
this.loadingBtn=true;
|
||||||
} else {
|
if (this.baseInfo.inspectGoodsId != undefined) {
|
||||||
addPurchaseInspectApi(param).then((response) => {
|
editPurchaseInspectApi(param).then((response) => {
|
||||||
this.$modal.msgSuccess("保存成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
this.jumpList()
|
this.jumpList()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loadingBtn=false
|
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(()=>{
|
setTimeout(()=>{
|
||||||
if(Number(row.deliveryNum)>(Number(row.orderNum)-Number(row.totalQualifiedNum))){
|
if(Number(row.deliveryNum)>(Number(row.orderNum)-Number(row.totalQualifiedNum))){
|
||||||
row.deliveryNum = Number(row.orderNum)-Number(row.totalQualifiedNum)
|
row.deliveryNum = Number(row.orderNum)-Number(row.totalQualifiedNum)
|
||||||
|
row.qualifiedNum = Number(row.orderNum)-Number(row.totalQualifiedNum)
|
||||||
}
|
}
|
||||||
},500)
|
},200)
|
||||||
}else{
|
}else{
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
if(Number(row.deliveryNum)>Number(row.orderNum)){
|
if(Number(row.deliveryNum)>Number(row.orderNum)){
|
||||||
row.deliveryNum = Number(row.orderNum)
|
row.deliveryNum = Number(row.orderNum)
|
||||||
|
row.qualifiedNum = Number(row.orderNum)
|
||||||
}
|
}
|
||||||
},500)
|
},200)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
patternValue2(row){
|
patternValue2(row){
|
||||||
|
|
@ -848,7 +854,7 @@ export default {
|
||||||
if(Number(row.qualifiedNum)>Number(row.deliveryNum)){
|
if(Number(row.qualifiedNum)>Number(row.deliveryNum)){
|
||||||
row.qualifiedNum = Number(row.deliveryNum)
|
row.qualifiedNum = Number(row.deliveryNum)
|
||||||
}
|
}
|
||||||
},500)
|
},200)
|
||||||
},
|
},
|
||||||
//日期
|
//日期
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
|
|
|
||||||
|
|
@ -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="orderNum" :show-overflow-tooltip="true"></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">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.orderNum*scope.row.singlePrice }}</span>
|
<span>{{ (scope.row.orderNum*scope.row.singlePrice/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"></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
|
"stallId": this.baseInfo.stallId
|
||||||
}
|
}
|
||||||
if(this.dateRange&&this.dateRange.length>0){
|
if(this.dateRange&&this.dateRange.length>0){
|
||||||
param.startDateTime=this.formatDateTime(this.dateRange[0])
|
param.startTime=this.formatDateTime(this.dateRange[0])
|
||||||
param.endDateTime=this.formatDateTime(this.dateRange[1])
|
param.endTime=this.formatDateTime(this.dateRange[1])
|
||||||
}else{
|
}else{
|
||||||
param.startDateTime=undefined;
|
param.startTime=undefined;
|
||||||
param.endDateTime=undefined;
|
param.endTime=undefined;
|
||||||
}
|
}
|
||||||
purchasePlanPageApi(param).then(response => {
|
purchasePlanPageApi(param).then(response => {
|
||||||
this.tableListData2 = response.rows;
|
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="purchaseNum" :show-overflow-tooltip="true"></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">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.purchaseNum*scope.row.unitPrice }}</span>
|
<span>{{ (scope.row.purchaseNum*scope.row.unitPrice/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"></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(){
|
async checkMaterialPrice(){
|
||||||
if(this.batchChosenMaterial.length>0){
|
if(this.materialList.length>0){
|
||||||
console.log(this.batchChosenMaterial)
|
console.log(this.materialList)
|
||||||
let arr = this.batchChosenMaterial.map(item=>item.materialId)
|
let arr = this.materialList.map(item=>item.materialId)
|
||||||
let param = {
|
let param = {
|
||||||
materialIds:arr,
|
materialIds:arr,
|
||||||
type:3
|
type:3
|
||||||
|
|
@ -434,8 +434,8 @@ export default {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.$modal.msgSuccess("获取成功!");
|
this.$modal.msgSuccess("获取成功!");
|
||||||
res.data.forEach(item=>{
|
res.data.forEach(item=>{
|
||||||
let index = this.batchChosenMaterial.findIndex(v=>v.materialId==item.materialId)
|
let index = this.materialList.findIndex(v=>v.materialId==item.materialId)
|
||||||
this.$set(this.batchChosenMaterial[index],"unitPrice",item.unitPrice/100)
|
this.$set(this.materialList[index],"unitPrice",item.unitPrice/100)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
|
||||||
|
|
@ -322,11 +322,11 @@ export default {
|
||||||
"stallId": this.queryParams.stallId,
|
"stallId": this.queryParams.stallId,
|
||||||
}
|
}
|
||||||
if(this.dateRange&&this.dateRange.length>0){
|
if(this.dateRange&&this.dateRange.length>0){
|
||||||
param.startDateTime=this.formatDateTime(this.dateRange[0])
|
param.startTime=this.formatDateTime(this.dateRange[0])
|
||||||
param.endDateTime=this.formatDateTime(this.dateRange[1])
|
param.endTime=this.formatDateTime(this.dateRange[1])
|
||||||
}else{
|
}else{
|
||||||
param.startDateTime=undefined;
|
param.startTime=undefined;
|
||||||
param.endDateTime=undefined;
|
param.endTime=undefined;
|
||||||
}
|
}
|
||||||
purchasePlanPageApi(param).then(response => {
|
purchasePlanPageApi(param).then(response => {
|
||||||
this.tableListData = response.rows;
|
this.tableListData = response.rows;
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
</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">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.actualNum-scope.row.bookNum }}</span>
|
<span>{{ (scope.row.actualNum-scope.row.bookNum).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <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">
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,11 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="盘点单号" prop="checkCode">
|
<el-form-item label="盘点单号" prop="checkCode">
|
||||||
<el-input v-model="queryParams.checkCode" placeholder="请输入盘点单号" maxlength="20" clearable style="width: 240px"/>
|
<el-input v-model="queryParams.checkCode" placeholder="请输入盘点单号" maxlength="20" clearable style="width: 240px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属区域" prop="areaId">
|
<el-form-item label="所属区域" prop="areaId">
|
||||||
<el-cascader v-model="queryParams.areaId"
|
<el-cascader v-model="queryParams.areaId"
|
||||||
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||||
:props="{
|
:props="{
|
||||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||||
value:'id',label:'label'
|
value:'id',label:'label'
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
:label="item.warehouseName"
|
:label="item.warehouseName"
|
||||||
:value="item.warehouseId"
|
:value="item.warehouseId"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
@ -62,39 +62,39 @@
|
||||||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="盘点单号" align="center" prop="checkCode" :show-overflow-tooltip="true" />
|
<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="areaName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="货品仓库" align="center" prop="warehouseName" :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="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="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="differNum" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="差异总额(元)" align="center" prop="" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="差异总额(元)" align="center" prop="differAmount" :show-overflow-tooltip="true" width="120">
|
||||||
<!-- <template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.totalAmount/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.differAmount/100).toFixed(2) }}</span>
|
||||||
</template> -->
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="操作人" align="center" prop="createBy" :show-overflow-tooltip="true" width="120"/>
|
<!-- <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"/> -->
|
<el-table-column label="操作时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="150"/> -->
|
||||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.status==1"
|
icon="el-icon-edit" v-if="scope.row.status==1"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>编辑</el-button>
|
>编辑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.status==2"
|
icon="el-icon-edit" v-if="scope.row.status==2"
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
>详情</el-button>
|
>详情</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete" v-if="scope.row.status==1"
|
icon="el-icon-delete" v-if="scope.row.status==1"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -115,7 +115,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|
@ -126,9 +126,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { systemAreaTreeApi } from "@/api/base/stall";
|
import { systemAreaTreeApi } from "@/api/base/stall";
|
||||||
import { drpWareHousePageApi } from "@/api/foodManage/stockManage";
|
import { drpWareHousePageApi } from "@/api/foodManage/stockManage";
|
||||||
import { checkInventoryPageApi,delCheckInventoryApi } from "@/api/foodManage/stockManage";
|
import { checkInventoryPageApi,delCheckInventoryApi } from "@/api/foodManage/stockManage";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
|
|
@ -153,11 +153,11 @@ export default {
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
},
|
},
|
||||||
treeAreaOptions:[],//区域树
|
treeAreaOptions:[],//区域树
|
||||||
wareHouseOptions:[],//仓库下拉选
|
wareHouseOptions:[],//仓库下拉选
|
||||||
|
|
@ -202,8 +202,8 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getAreaTreeData();
|
this.getAreaTreeData();
|
||||||
this.getWareHouseData()
|
this.getWareHouseData()
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
|
@ -211,18 +211,18 @@ export default {
|
||||||
//区域树
|
//区域树
|
||||||
getAreaTreeData() {
|
getAreaTreeData() {
|
||||||
systemAreaTreeApi({}).then((response) => {
|
systemAreaTreeApi({}).then((response) => {
|
||||||
this.treeAreaOptions = response.data;
|
this.treeAreaOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleAreaChange(e){
|
handleAreaChange(e){
|
||||||
this.getWareHouseData()
|
this.getWareHouseData()
|
||||||
},
|
},
|
||||||
/** 查询货品下拉结构 */
|
/** 查询货品下拉结构 */
|
||||||
getWareHouseData() {
|
getWareHouseData() {
|
||||||
drpWareHousePageApi({ areaId:this.queryParams.areaId }).then((response) => {
|
drpWareHousePageApi({ areaId:this.queryParams.areaId }).then((response) => {
|
||||||
this.wareHouseOptions = response.rows||[];
|
this.wareHouseOptions = response.rows||[];
|
||||||
this.$set(this.queryParams,'warehouseId',null)
|
this.$set(this.queryParams,'warehouseId',null)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
|
@ -230,7 +230,7 @@ export default {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = this.defaultDateRange()
|
this.dateRange = this.defaultDateRange()
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|
@ -243,12 +243,12 @@ export default {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let param = {
|
let param = {
|
||||||
"pageNum": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
"pageSize": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"checkCode": this.queryParams.checkCode,
|
"checkCode": this.queryParams.checkCode,
|
||||||
"areaId": this.queryParams.areaId,
|
"areaId": this.queryParams.areaId,
|
||||||
// "warehouseId": this.queryParams.warehouseId,
|
// "warehouseId": this.queryParams.warehouseId,
|
||||||
// "status": this.queryParams.status,
|
// "status": this.queryParams.status,
|
||||||
// "intoType": this.queryParams.intoType
|
// "intoType": this.queryParams.intoType
|
||||||
}
|
}
|
||||||
if(this.dateRange&&this.dateRange.length>0){
|
if(this.dateRange&&this.dateRange.length>0){
|
||||||
|
|
@ -257,23 +257,23 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
param.startTime=undefined;
|
param.startTime=undefined;
|
||||||
param.endTime=undefined;
|
param.endTime=undefined;
|
||||||
}
|
}
|
||||||
checkInventoryPageApi(param).then(response => {
|
checkInventoryPageApi(param).then(response => {
|
||||||
this.tableListData = response.rows;
|
this.tableListData = response.rows;
|
||||||
this.total = Number(response.total);
|
this.total = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$router.push({ path: "/foodManage/stockManage/inventoryCountEdit" });
|
this.$router.push({ path: "/foodManage/stockManage/inventoryCountEdit" });
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleView(row) {
|
handleView(row) {
|
||||||
this.$router.push({ path: "/foodManage/stockManage/inventoryCountDetail",query: {countRowData:JSON.stringify(row)} });
|
this.$router.push({ path: "/foodManage/stockManage/inventoryCountDetail",query: {countRowData:JSON.stringify(row)} });
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.$router.push({ path: "/foodManage/stockManage/inventoryCountEdit",query: {countRowData:JSON.stringify(row)} });
|
this.$router.push({ path: "/foodManage/stockManage/inventoryCountEdit",query: {countRowData:JSON.stringify(row)} });
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
|
|
@ -285,7 +285,7 @@ export default {
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {};
|
this.form = {};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
|
|
@ -307,7 +307,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
return delCheckInventoryApi({checkId:row.checkId});
|
return delCheckInventoryApi({checkId:row.checkId});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|
@ -319,11 +319,11 @@ export default {
|
||||||
const end = new Date(new Date().toLocaleDateString());
|
const end = new Date(new Date().toLocaleDateString());
|
||||||
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 -1);
|
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 -1);
|
||||||
const start = new Date((new Date().toLocaleDateString()));
|
const start = new Date((new Date().toLocaleDateString()));
|
||||||
start.setTime(start.getTime() - 30 * 24 * 60 * 60 * 1000);
|
start.setTime(start.getTime() - 30 * 24 * 60 * 60 * 1000);
|
||||||
this.start = parseInt(start.getTime() / 1000)
|
this.start = parseInt(start.getTime() / 1000)
|
||||||
this.end = parseInt(end.getTime() / 1000)
|
this.end = parseInt(end.getTime() / 1000)
|
||||||
return [start, end]
|
return [start, end]
|
||||||
},
|
},
|
||||||
//日期
|
//日期
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
// 格式化为 YYYY-MM-DD
|
// 格式化为 YYYY-MM-DD
|
||||||
|
|
@ -344,7 +344,7 @@ export default {
|
||||||
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
||||||
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
||||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@
|
||||||
<el-cascader v-model="baseInfo.areaId"
|
<el-cascader v-model="baseInfo.areaId"
|
||||||
:options="treeAreaOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
|
:options="treeAreaOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
|
||||||
:disabled="materialList.length>0"
|
:disabled="materialList.length>0"
|
||||||
:props="{
|
:props="{
|
||||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||||
value:'id',label:'label'
|
value:'id',label:'label'
|
||||||
}" @change="handleAreaChange">
|
}" @change="handleAreaChange">
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="货品仓库" prop="warehouseId">
|
<el-form-item label="货品仓库" prop="warehouseId">
|
||||||
<el-select v-model="baseInfo.warehouseId" clearable :disabled="materialList.length>0" placeholder="请选择货品仓库" style="width: 100%;">
|
<el-select v-model="baseInfo.warehouseId" clearable :disabled="materialList.length>0" placeholder="请选择货品仓库" style="width: 100%;">
|
||||||
<el-option v-for="item in wareHouseOptions"
|
<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="materialTypeName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="计量单位" align="center" prop="unitName" :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 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">
|
<el-table-column label="供应商" align="center" prop="supplierId" :show-overflow-tooltip="true" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="scope.row.supplierId" placeholder="请选择供应商" style="width: 100%;">
|
<el-select v-model="scope.row.supplierId" placeholder="请选择供应商" style="width: 100%;">
|
||||||
|
|
@ -75,9 +75,9 @@
|
||||||
:label="item.supplierName"
|
:label="item.supplierName"
|
||||||
:value="item.supplierId"
|
:value="item.supplierId"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="生产日期" align="center" prop="productDate" :show-overflow-tooltip="true" width="160">
|
<el-table-column label="生产日期" align="center" prop="productDate" :show-overflow-tooltip="true" width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -88,7 +88,7 @@
|
||||||
:picker-options="pickerOptions3" >
|
:picker-options="pickerOptions3" >
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="保质期截止日期" align="center" prop="expireTime" :show-overflow-tooltip="true" width="180">
|
<el-table-column label="保质期截止日期" align="center" prop="expireTime" :show-overflow-tooltip="true" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -103,7 +103,7 @@
|
||||||
<el-table-column label="单价(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
|
<el-table-column label="单价(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="baseInfo.relateOrderGoodsId">{{ scope.row.unitPrice }}</span>
|
<span v-if="baseInfo.relateOrderGoodsId">{{ scope.row.unitPrice }}</span>
|
||||||
<el-input v-else v-model="scope.row.unitPrice" placeholder="请输入" maxlength="8" clearable @input="(v)=>(scope.row.unitPrice=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
|
<el-input v-else v-model="scope.row.unitPrice" placeholder="请输入" maxlength="3" clearable @input="(v)=>(scope.row.unitPrice=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="订货数量" align="center" prop="orderNum" :show-overflow-tooltip="true" v-if="baseInfo.relateOrderGoodsId">
|
<el-table-column label="订货数量" align="center" prop="orderNum" :show-overflow-tooltip="true" v-if="baseInfo.relateOrderGoodsId">
|
||||||
|
|
@ -116,9 +116,9 @@
|
||||||
<span>{{scope.row.intoNum}}</span>
|
<span>{{scope.row.intoNum}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="待入库数量" align="center" prop="purNum" :show-overflow-tooltip="true">
|
<el-table-column label="本次入库数量" align="center" prop="purNum" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.purNum" placeholder="请输入" maxlength="8" clearable @change="patternValue(scope.row)"/>
|
<el-input v-model="scope.row.purNum" placeholder="请输入" maxlength="3" clearable @change="patternValue(scope.row)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -265,6 +265,7 @@ export default {
|
||||||
contractType:undefined,
|
contractType:undefined,
|
||||||
areaId:undefined,
|
areaId:undefined,
|
||||||
canteenId:undefined,
|
canteenId:undefined,
|
||||||
|
intoDate:new Date()
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
baseRules: {
|
baseRules: {
|
||||||
|
|
@ -409,16 +410,16 @@ export default {
|
||||||
this.getSupplierData()
|
this.getSupplierData()
|
||||||
},
|
},
|
||||||
/** 查询供应商下拉结构 */
|
/** 查询供应商下拉结构 */
|
||||||
getWareHouseData() {
|
getWareHouseData() {
|
||||||
drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => {
|
drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => {
|
||||||
this.wareHouseOptions = response.rows||[];
|
this.wareHouseOptions = response.rows||[];
|
||||||
if(this.wareHouseOptions.length>0){
|
if(this.wareHouseOptions.length>0){
|
||||||
this.$set(this.baseInfo,"warehouseId",this.wareHouseOptions[0].warehouseId)
|
this.$set(this.baseInfo,"warehouseId",this.wareHouseOptions[0].warehouseId)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 查询供应商下拉结构 */
|
/** 查询供应商下拉结构 */
|
||||||
getSupplierData() {
|
getSupplierData() {
|
||||||
supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
|
supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
|
||||||
this.supplierOptions = response.rows||[];
|
this.supplierOptions = response.rows||[];
|
||||||
});
|
});
|
||||||
|
|
@ -448,7 +449,7 @@ export default {
|
||||||
this.materialList.splice(index,1)
|
this.materialList.splice(index,1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.$refs.multipleTable.clearSelection()
|
this.$refs.multipleTable.clearSelection()
|
||||||
},300)
|
},300)
|
||||||
},
|
},
|
||||||
|
|
@ -486,6 +487,7 @@ export default {
|
||||||
"pageSize": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"pageNum": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
"areaId": this.baseInfo.areaId,
|
"areaId": this.baseInfo.areaId,
|
||||||
|
"warehouseId": this.baseInfo.warehouseId,
|
||||||
"materialName": this.queryParams.materialName,
|
"materialName": this.queryParams.materialName,
|
||||||
"materialCode": this.queryParams.materialCode,
|
"materialCode": this.queryParams.materialCode,
|
||||||
"materialTypeIds": this.queryParams.materialTypeIds,
|
"materialTypeIds": this.queryParams.materialTypeIds,
|
||||||
|
|
@ -498,7 +500,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleSelectionChange2(selection) {
|
handleSelectionChange2(selection) {
|
||||||
this.batchChosenMaterial = [];
|
this.batchChosenMaterial = [];
|
||||||
selection.forEach(item=>{
|
selection.forEach(item=>{
|
||||||
let obj = Object.assign({}, item)
|
let obj = Object.assign({}, item)
|
||||||
obj.unitPrice = item.unitPrice/100;
|
obj.unitPrice = item.unitPrice/100;
|
||||||
this.$set(obj,"purNum",0)
|
this.$set(obj,"purNum",0)
|
||||||
|
|
@ -526,7 +528,7 @@ export default {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.openDialog=false
|
this.openDialog=false
|
||||||
},500)
|
},500)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//保存草稿
|
//保存草稿
|
||||||
|
|
@ -542,6 +544,7 @@ export default {
|
||||||
this.noMaterial = false;
|
this.noMaterial = false;
|
||||||
if(this.materialList.length>0){
|
if(this.materialList.length>0){
|
||||||
this.materialList.forEach(item=>{
|
this.materialList.forEach(item=>{
|
||||||
|
this.$set(item,"purNum",Number(item.purNum))
|
||||||
if(item.unitPrice==0 || item.purNum==0 || item.supplierId==null || !item.productDate|| !item.expireTime){
|
if(item.unitPrice==0 || item.purNum==0 || item.supplierId==null || !item.productDate|| !item.expireTime){
|
||||||
this.noMaterial = true
|
this.noMaterial = true
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -602,6 +605,7 @@ export default {
|
||||||
this.noMaterial = false;
|
this.noMaterial = false;
|
||||||
if(this.materialList.length>0){
|
if(this.materialList.length>0){
|
||||||
this.materialList.forEach(item=>{
|
this.materialList.forEach(item=>{
|
||||||
|
this.$set(item,"purNum",Number(item.purNum))
|
||||||
if(item.unitPrice==0 || item.purNum==0 || item.supplierId==null || !item.productDate|| !item.expireTime){
|
if(item.unitPrice==0 || item.purNum==0 || item.supplierId==null || !item.productDate|| !item.expireTime){
|
||||||
this.noMaterial = true
|
this.noMaterial = true
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -683,7 +687,8 @@ export default {
|
||||||
"pageNum": this.queryParams2.pageNum,
|
"pageNum": this.queryParams2.pageNum,
|
||||||
"orderGoodsCode": this.queryParams2.orderGoodsCode,
|
"orderGoodsCode": this.queryParams2.orderGoodsCode,
|
||||||
"orderStatus":2,
|
"orderStatus":2,
|
||||||
"ifAllInto":2,
|
"isInspect":0,
|
||||||
|
"ifAllInto":2,
|
||||||
"areaId": this.baseInfo.areaId,
|
"areaId": this.baseInfo.areaId,
|
||||||
"warehouseId": this.baseInfo.warehouseId,
|
"warehouseId": this.baseInfo.warehouseId,
|
||||||
"supplierId": this.baseInfo.deliverySupplierId,
|
"supplierId": this.baseInfo.deliverySupplierId,
|
||||||
|
|
@ -727,13 +732,13 @@ export default {
|
||||||
},
|
},
|
||||||
patternValue(row){
|
patternValue(row){
|
||||||
row.purNum = row.purNum.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1')
|
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(()=>{
|
setTimeout(()=>{
|
||||||
if(Number(row.purNum)>(Number(row.totalQualifiedNum)-Number(row.intoNum))){
|
if(Number(row.purNum)>(Number(row.totalQualifiedNum)-Number(row.intoNum))){
|
||||||
row.purNum = Number(row.totalQualifiedNum)-Number(row.intoNum)
|
row.purNum = Number(row.totalQualifiedNum)-Number(row.intoNum)
|
||||||
}
|
}
|
||||||
},500)
|
},500)
|
||||||
}else{
|
}else{
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
if(Number(row.purNum)>Number(row.totalQualifiedNum)){
|
if(Number(row.purNum)>Number(row.totalQualifiedNum)){
|
||||||
row.purNum = Number(row.totalQualifiedNum)
|
row.purNum = Number(row.totalQualifiedNum)
|
||||||
|
|
|
||||||
|
|
@ -69,11 +69,11 @@
|
||||||
<el-table-column label="计量单位" align="center" prop="unitName" :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 label="货品规格" align="center" prop="size" :show-overflow-tooltip="true">
|
||||||
</el-table-column>
|
</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">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.unitPrice/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.unitPrice/100).toFixed(2) }}</span>
|
||||||
</template>
|
</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="createTime" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="库存数量" align="center" prop="materialNum" :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">
|
<el-table-column label="出库数量" align="center" prop="fetchNum" :show-overflow-tooltip="true">
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
<el-input v-if="!baseInfo.fetchMaterialId" v-model="scope.row.fetchNum" placeholder="请输入" maxlength="8" clearable @change="patternValue(scope.row)"/>
|
<el-input v-if="!baseInfo.fetchMaterialId" v-model="scope.row.fetchNum" placeholder="请输入" maxlength="8" clearable @change="patternValue(scope.row)"/>
|
||||||
<span v-else>{{ scope.row.fetchNum }}</span>
|
<span v-else>{{ scope.row.fetchNum }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -135,11 +135,11 @@
|
||||||
<span v-if="scope.row.salesMode==2">称重</span>
|
<span v-if="scope.row.salesMode==2">称重</span>
|
||||||
</template> -->
|
</template> -->
|
||||||
</el-table-column>
|
</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">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.unitPrice/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.unitPrice/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="货品库存" align="center" prop="materialNum" :show-overflow-tooltip="true" />
|
<el-table-column label="货品库存" align="center" prop="materialNum" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -265,7 +265,7 @@ export default {
|
||||||
disabledDate(v) {
|
disabledDate(v) {
|
||||||
return v.getTime() > (new Date().getTime() + 86400000);// - 86400000是否包括当天
|
return v.getTime() > (new Date().getTime() + 86400000);// - 86400000是否包括当天
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
materialList:[],//货品信息-表格数据
|
materialList:[],//货品信息-表格数据
|
||||||
batchIds:[],//货品信息-表格数据-多选
|
batchIds:[],//货品信息-表格数据-多选
|
||||||
openDialog:false,
|
openDialog:false,
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="过期状态" prop="expireState">
|
<el-form-item label="过期状态" prop="expireState">
|
||||||
<el-select v-model="queryParams.expireState" placeholder="请选择过期状态" style="width: 240px;">
|
<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="2"></el-option>
|
||||||
<el-option label="临期" :value="3"></el-option>
|
<el-option label="临期" :value="3"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">总金额</template>
|
<template slot="label">总金额</template>
|
||||||
{{ baseInfo.bidTotalPrice }}
|
{{ (baseInfo.quoteAmount/100).toFixed(2) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">备注</template>
|
<template slot="label">备注</template>
|
||||||
|
|
@ -89,13 +89,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getGoodsInquiryInfoApi } from "@/api/foodManage/purchaseManage";
|
import { getGoodsInquiryDetailInfoApi } from "@/api/foodManage/purchaseManage";
|
||||||
export default {
|
export default {
|
||||||
name: "SupplierQuotationDetail",
|
name: "SupplierQuotationDetail",
|
||||||
dicts: [],
|
dicts: [],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
goodsInquiryData:{},//页面传参
|
supplierQuotationData:{},//页面传参
|
||||||
loading:false,
|
loading:false,
|
||||||
loadingBtn:false,
|
loadingBtn:false,
|
||||||
baseInfo: {
|
baseInfo: {
|
||||||
|
|
@ -153,15 +153,16 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if(this.$route.query.goodsInquiryData){
|
if(this.$route.query.supplierQuotationData){
|
||||||
this.goodsInquiryData = JSON.parse(this.$route.query.goodsInquiryData)
|
this.supplierQuotationData = JSON.parse(this.$route.query.supplierQuotationData)
|
||||||
|
console.log(this.supplierQuotationData)
|
||||||
this.getContractInfo()
|
this.getContractInfo()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
'$route.query.goodsInquiryData':function(newId, oldId) {
|
'$route.query.supplierQuotationData':function(newId, oldId) {
|
||||||
if(newId){
|
if(newId){
|
||||||
this.goodsInquiryData = JSON.parse(newId)
|
this.supplierQuotationData = JSON.parse(newId)
|
||||||
this.getContractInfo()
|
this.getContractInfo()
|
||||||
}else{
|
}else{
|
||||||
this.baseInfo={}
|
this.baseInfo={}
|
||||||
|
|
@ -177,15 +178,16 @@ export default {
|
||||||
this.$router.replace({ path: "/foodManage/supplierFunction/supplierQuotation" }); // 要打开的页面
|
this.$router.replace({ path: "/foodManage/supplierFunction/supplierQuotation" }); // 要打开的页面
|
||||||
},
|
},
|
||||||
getContractInfo(){
|
getContractInfo(){
|
||||||
console.log(this.goodsInquiryData)
|
console.log(this.supplierQuotationData)
|
||||||
let param = {
|
let param = {
|
||||||
inquiryId:this.goodsInquiryData.inquiryId
|
inquiryId:this.supplierQuotationData.inquiryId,
|
||||||
|
supplierId:this.supplierQuotationData.supplierId
|
||||||
}
|
}
|
||||||
//查询
|
//查询
|
||||||
getGoodsInquiryInfoApi(param).then((response) => {
|
getGoodsInquiryDetailInfoApi(param).then((response) => {
|
||||||
this.baseInfo = response.data;
|
this.baseInfo = this.supplierQuotationData;
|
||||||
// this.$set(this.baseInfo,'dateRange',[this.baseInfo.startTime,this.baseInfo.endTime])
|
// this.$set(this.baseInfo,'dateRange',[this.baseInfo.startTime,this.baseInfo.endTime])
|
||||||
this.materialList = this.baseInfo.detailList;
|
this.materialList = response.data;
|
||||||
// supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
|
// supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
|
||||||
// this.supplierOptions = response.rows||[];
|
// this.supplierOptions = response.rows||[];
|
||||||
// });
|
// });
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">总金额</template>
|
<template slot="label">总金额</template>
|
||||||
{{ baseInfo.bidTotalPrice }}
|
{{ baseInfo.quoteAmount }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">备注</template>
|
<template slot="label">备注</template>
|
||||||
|
|
@ -89,7 +89,7 @@
|
||||||
<el-table-column label="采购数量" align="center" prop="purNum" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column label="采购数量" align="center" prop="purNum" :show-overflow-tooltip="true"></el-table-column>
|
||||||
<el-table-column label="单价(元)" align="center" prop="singlePrice" :show-overflow-tooltip="true">
|
<el-table-column label="单价(元)" align="center" prop="singlePrice" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.singlePrice" placeholder="请输入" maxlength="6" clearable @input="(v)=>(scope.row.singlePrice=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
|
<el-input v-model="scope.row.singlePrice" placeholder="请输入" maxlength="6" clearable @change="sumAmount" @input="(v)=>(scope.row.singlePrice=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总金额(元)" align="center" prop="" :show-overflow-tooltip="true">
|
<el-table-column label="总金额(元)" align="center" prop="" :show-overflow-tooltip="true">
|
||||||
|
|
@ -255,6 +255,7 @@ export default {
|
||||||
this.getMaterialTree()
|
this.getMaterialTree()
|
||||||
if(this.$route.query.supplierQuotationData){
|
if(this.$route.query.supplierQuotationData){
|
||||||
this.supplierQuotationData = JSON.parse(this.$route.query.supplierQuotationData)
|
this.supplierQuotationData = JSON.parse(this.$route.query.supplierQuotationData)
|
||||||
|
console.log(this.supplierQuotationData)
|
||||||
this.getContractInfo()
|
this.getContractInfo()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -277,7 +278,6 @@ export default {
|
||||||
this.$router.replace({ path: "/foodManage/supplierFunction/supplierQuotation" }); // 要打开的页面
|
this.$router.replace({ path: "/foodManage/supplierFunction/supplierQuotation" }); // 要打开的页面
|
||||||
},
|
},
|
||||||
getContractInfo(){
|
getContractInfo(){
|
||||||
console.log(this.supplierQuotationData)
|
|
||||||
let param = {
|
let param = {
|
||||||
inquiryId:this.supplierQuotationData.inquiryId
|
inquiryId:this.supplierQuotationData.inquiryId
|
||||||
}
|
}
|
||||||
|
|
@ -427,6 +427,7 @@ export default {
|
||||||
let param = Object.assign({},this.baseInfo);
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.arrivalTime = this.formatDateTime(this.baseInfo.arrivalTime)
|
param.arrivalTime = this.formatDateTime(this.baseInfo.arrivalTime)
|
||||||
param.detailList = []
|
param.detailList = []
|
||||||
|
param.quoteAmount=0
|
||||||
console.log(param.arrivalTime)
|
console.log(param.arrivalTime)
|
||||||
if(param.arrivalTime.includes('1970')){
|
if(param.arrivalTime.includes('1970')){
|
||||||
this.$modal.msgError("请选择交货时间!");
|
this.$modal.msgError("请选择交货时间!");
|
||||||
|
|
@ -442,6 +443,7 @@ export default {
|
||||||
obj.quoteNum = Number(obj.purNum)
|
obj.quoteNum = Number(obj.purNum)
|
||||||
obj.singlePrice = Number(obj.singlePrice)*100
|
obj.singlePrice = Number(obj.singlePrice)*100
|
||||||
obj.totalPrice = (Number(obj.singlePrice)*Number(obj.purNum))
|
obj.totalPrice = (Number(obj.singlePrice)*Number(obj.purNum))
|
||||||
|
param.quoteAmount = param.quoteAmount+obj.totalPrice;
|
||||||
param.detailList.push(obj)
|
param.detailList.push(obj)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -469,7 +471,12 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sumAmount(){
|
||||||
|
this.baseInfo.quoteAmount=0
|
||||||
|
this.materialList.forEach(item=>{
|
||||||
|
this.baseInfo.quoteAmount = this.baseInfo.quoteAmount + (Number(item.singlePrice)*Number(item.purNum))
|
||||||
|
})
|
||||||
|
},
|
||||||
//日期
|
//日期
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
// 格式化为 YYYY-MM-DD
|
// 格式化为 YYYY-MM-DD
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@
|
||||||
<el-form-item label="询价标题" prop="title">
|
<el-form-item label="询价标题" prop="title">
|
||||||
<el-input v-model="queryParams.title" placeholder="请输入询价标题" maxlength="20" clearable style="width: 240px"/>
|
<el-input v-model="queryParams.title" placeholder="请输入询价标题" maxlength="20" clearable style="width: 240px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="询价状态" prop="status">
|
<el-form-item label="询价状态" prop="bidStatus">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择询价状态" style="width: 240px;">
|
<el-select v-model="queryParams.bidStatus" placeholder="请选择询价状态" style="width: 240px;">
|
||||||
<el-option label="已决价" :value="2"></el-option>
|
<el-option label="已报价" :value="1"></el-option>
|
||||||
<el-option label="进行中" :value="3"></el-option>
|
<el-option label="未报价" :value="2"></el-option>
|
||||||
<el-option label="未决标" :value="4"></el-option>
|
<el-option label="已中标" :value="3"></el-option>
|
||||||
<el-option label="已取消" :value="5"></el-option>
|
<el-option label="未中标" :value="4"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
@ -35,21 +35,20 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="询价单号" align="center" prop="inquiryCode" :show-overflow-tooltip="true" />
|
<el-table-column label="询价单号" align="center" prop="inquiryCode" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="询价标题" align="center" prop="title" :show-overflow-tooltip="true" />
|
<el-table-column label="询价标题" align="center" prop="title" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="询价状态" align="center" prop="status" :show-overflow-tooltip="true" width="100">
|
<el-table-column label="询价状态" align="center" prop="bidStatus" :show-overflow-tooltip="true" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.status==1">待提交</span>
|
<span v-if="scope.row.bidStatus==1">已报价</span>
|
||||||
<span v-if="scope.row.status==2">已决价</span>
|
<span v-if="scope.row.bidStatus==2">未报价</span>
|
||||||
<span v-if="scope.row.status==3">进行中</span>
|
<span v-if="scope.row.bidStatus==3">已中标</span>
|
||||||
<span v-if="scope.row.status==4">未决标</span>
|
<span v-if="scope.row.bidStatus==4">未中标</span>
|
||||||
<span v-if="scope.row.status==5">已取消</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="报价开始时间" align="center" prop="startTime" :show-overflow-tooltip="true" />
|
<el-table-column label="报价开始时间" align="center" prop="startTime" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="报价结束时间" align="center" prop="endTime" :show-overflow-tooltip="true" />
|
<el-table-column label="报价结束时间" align="center" prop="endTime" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="决标时间" align="center" prop="bidTime" :show-overflow-tooltip="true"/>
|
<!-- <el-table-column label="决标时间" align="center" prop="bidTime" :show-overflow-tooltip="true"/> -->
|
||||||
<el-table-column label="决标总价(元)" align="center" prop="bidTotalPrice" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="报价总额(元)" align="center" prop="quoteAmount" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.bidTotalPrice/100).toFixed(2) }}</span>
|
<span>{{ (scope.row.quoteAmount/100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||||
|
|
@ -57,13 +56,13 @@
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.status==3"
|
icon="el-icon-edit" v-if="scope.row.bidStatus==2"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>报价</el-button>
|
>报价</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.status!=1"
|
icon="el-icon-edit" v-if="scope.row.bidStatus!=2"
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
>详情</el-button>
|
>详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -493,12 +493,17 @@ export default {
|
||||||
let flag = false;
|
let flag = false;
|
||||||
if(row.alternativeSuppliers&&row.alternativeSuppliers.length>0){
|
if(row.alternativeSuppliers&&row.alternativeSuppliers.length>0){
|
||||||
let index = row.alternativeSuppliers.findIndex(v=>v.supplierId==item.supplierId)
|
let index = row.alternativeSuppliers.findIndex(v=>v.supplierId==item.supplierId)
|
||||||
if(index==-1){
|
if(index==-1){
|
||||||
flag=false
|
if(item.status==1){
|
||||||
|
flag=false
|
||||||
|
}else{
|
||||||
|
flag=true
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
flag=true
|
flag=true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return flag;
|
return flag;
|
||||||
},
|
},
|
||||||
//首选选过的供应商,不能在备选里选
|
//首选选过的供应商,不能在备选里选
|
||||||
|
|
@ -507,9 +512,13 @@ export default {
|
||||||
let flag = false;
|
let flag = false;
|
||||||
if(row.supplierId&&row.supplierId!=""){
|
if(row.supplierId&&row.supplierId!=""){
|
||||||
if(item.supplierId==row.supplierId){
|
if(item.supplierId==row.supplierId){
|
||||||
flag=true
|
if(item.status==1){
|
||||||
|
flag=false
|
||||||
|
}else{
|
||||||
|
flag=true
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
flag=false
|
flag=true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
|
|
|
||||||
|
|
@ -801,6 +801,8 @@ export default {
|
||||||
},
|
},
|
||||||
getSupplierUserList(){
|
getSupplierUserList(){
|
||||||
let param = {
|
let param = {
|
||||||
|
pageNum:1,
|
||||||
|
pageSize:100,
|
||||||
deptId:225,
|
deptId:225,
|
||||||
queryTyoe:2
|
queryTyoe:2
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -215,8 +215,15 @@
|
||||||
label="用户账号"
|
label="用户账号"
|
||||||
align="center"
|
align="center"
|
||||||
key="userName"
|
key="userName"
|
||||||
prop="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"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ module.exports = {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
// target: `http://192.168.2.75:48380`,//旭
|
// 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.2.108:48380`,//测试
|
||||||
// target: `http://192.168.0.34:48380`,//测试
|
// target: `http://192.168.0.34:48380`,//测试
|
||||||
// target: `http://192.168.0.176:48380`,//
|
// target: `http://192.168.0.176:48380`,//
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue