diff --git a/src/api/foodManage/purchaseManage.js b/src/api/foodManage/purchaseManage.js index 824664f5..3f9202b9 100644 --- a/src/api/foodManage/purchaseManage.js +++ b/src/api/foodManage/purchaseManage.js @@ -124,6 +124,16 @@ export function delPurchaseContractApi(data) { } }) } +// 终止 +export function nullifyPurchaseContractApi(data) { + return request({ + url: '/smart-canteen/ims_purchase_contract/nullify/'+data.contractIds, + method: 'post', + headers: { + //"merchant-id":"378915229716713472", + } + }) +} // -------------采购询价--------------- //获取采购询价分页列表 @@ -319,7 +329,7 @@ export function purchasePlanPageApi(data) { headers: { //"merchant-id":"378915229716713472", }, - data + params:data }) } //获取采购计划分页详情 diff --git a/src/api/healthCenter/index.js b/src/api/healthCenter/index.js index e4946d57..9be5acab 100644 --- a/src/api/healthCenter/index.js +++ b/src/api/healthCenter/index.js @@ -157,6 +157,17 @@ export function delHealthInfoApi(data) { data: data }) } + +export function getHealthReportPageApi(data) { + return request({ + url: '/smart-canteen/health_person_medical_report/list', + method: 'get', + headers: { + //"merchant-id":"378915229716713472", + }, + params:data + }) +} // 模板-列表 export function getModelListApi() { return request({ diff --git a/src/utils/printer/Common.js b/src/utils/printer/Common.js new file mode 100644 index 00000000..73b0f4a6 --- /dev/null +++ b/src/utils/printer/Common.js @@ -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 +} diff --git a/src/utils/printer/WebSDK.js b/src/utils/printer/WebSDK.js new file mode 100644 index 00000000..b3e0ea4a --- /dev/null +++ b/src/utils/printer/WebSDK.js @@ -0,0 +1 @@ +export var WebSDK=function(t){"use strict";class e{constructor(t){this.functionData={id:0,commandType:t,hasReadFunc:!1,functions:{}},this.func={},this.num=0,this.hasReadFunc=!1}getData(){return this.functionData.functions=this.func,this.functionData.hasReadFunc=this.hasReadFunc,this.func={},this.num=0,this.hasReadFunc=!1,JSON.stringify(this.functionData)}setId(t){return this.functionData.id=t,this}_addFunction(t,e,i=!1){return this.func["func"+this.num]={[t]:e},this.num++,this.hasReadFunc||=i,this}directPrintText(t){return this._addFunction("directPrintText",[t]),this}directPrintHex(t){return this._addFunction("directPrintHex",[t]),this}setEncoding(t="gbk"){return this._addFunction("setEncoding",[t]),this}}const i=Object.freeze({CODE_128:"128",CODE_128M:"128M",CODE_EAN128:"EAN128",CODE_25:"25",CODE_25C:"25C",CODE_39:"39",CODE_39C:"39C",CODE_93:"93",CODE_EAN13:"EAN13",CODE_EAN13_2:"EAN13+2",CODE_EAN13_5:"EAN13+5",CODE_EAN8:"EAN8",CODE_EAN8_2:"EAN8+2",CODE_EAN8_5:"EAN8+5",CODE_CODA:"CODA",CODE_POST:"POST",CODE_UPCA:"UPCA",CODE_UPCA_2:"UPCA+2",CODE_UPCA_5:"UPCA+5",CODE_UPCE:"UPCE",CODE_UPCE_2:"UPCE+2",CODE_UPCE_5:"UPCE+5",CODE_CPOST:"CPOST",CODE_MSI:"MSI",CODE_MSIC:"MSIC",CODE_PLESSEY:"PLESSEY",CODE_ITF14:"ITF14",CODE_EAN14:"EAN14",CODE_11:"11",CODE_TELEPEN:"TELEPEN",CODE_TELEPENN:"TELEPENN",CODE_PLANET:"PLANET",CODE_CODE49:"CODE49",CODE_DPI:"DPI",CODE_DPL:"DPL"}),n=Object.freeze({L:"L",M:"M",Q:"Q",H:"H"}),r=Object.freeze({ROTATION_0:0,ROTATION_90:90,ROTATION_180:180,ROTATION_270:270}),a=Object.freeze({LEFT:1,CENTER:2,RIGHT:3}),d=Object.freeze({NONE:0,LEFT:1,CENTER:2,RIGHT:3}),s=Object.freeze({FNT_8_12:"1",FNT_12_20:"2",FNT_16_24:"3",FNT_24_32:"4",FNT_32_48:"5",FNT_14_19:"6",FNT_14_25:"7",FNT_21_27:"8",FNT_SIMPLIFIED_CHINESE:"TSS24.BF2",FNT_TRADITIONAL_CHINESE:"TST24.BF2",FNT_KOREAN:"K"}),o=Object.freeze({AUTO:"A",MANUAL:"M"}),h=Object.freeze({M1:"M1",M2:"M2"}),c=Object.freeze({URL:0,BASE64:1,LOCAL_PATH:2}),u=Object.freeze({OVERWRITE:0,OR:1,XOR:2}),_=Object.freeze({BOTTOM:0,TOP:1});var E=Object.freeze({__proto__:null,BarcodeType:i,EccLevel:n,Rotation:r,Alignment:a,Readable:d,FontSize:s,QrCodeMode:o,QrCodeModel:h,ImageSource:c,ImageMode:u,Orientation:_});const C=Object.freeze({LEFT:0,CENTER:1,RIGHT:2}),O=Object.freeze({DEFAULT:0,FONTB:1,BOLD:8,REVERSE:16,UNDERLINE:128,UNDERLINE2:256}),T=Object.freeze({_1WIDTH:0,_2WIDTH:16,_3WIDTH:32,_4WIDTH:48,_5WIDTH:64,_6WIDTH:80,_7WIDTH:96,_8WIDTH:112}),P=Object.freeze({NORMAL:0,WIDTH_DOUBLE:1,HEIGHT_DOUBLE:2,WIDTH_HEIGHT_DOUBLE:3}),l=Object.freeze({UPCA:65,UPCE:66,EAN8:68,EAN13:67,JAN8:68,JAN13:67,ITF:70,Codabar:71,Code39:69,Code93:72,Code128:73}),A=Object.freeze({NONE:0,ABOVE:1,BELOW:2,BOTH:3}),F=Object.freeze({L:48,M:49,Q:50,H:51}),N=Object.freeze({ALL:0,HALF:1}),R=Object.freeze({_58:1,_80:2,_76:3}),I=Object.freeze({TOW:0,FIVE:1}),f=Object.freeze({UNKNOWN:-1,NORMAL:0,COVEROPEN:16,PAPEREMPTY:32,CASH_OPEN:0,CASH_CLOSE:1}),m=Object.freeze({PRINT:1,OFFLINE:2,ERR:3,PAPER:4}),D=Object.freeze({LEFT_TOP:0,LEFT_BOTTOM:1,RIGHT_BOTTOM:2,RIGHT_TOP:3}),g=Object.freeze({URL:0,BASE64:1,LOCAL_PATH:2}),w=Object.freeze({PC437:0,KATAKANA:1,PC850:2,PC860:3,PC863:4,PC865:5,WEST_EUROPE:6,GREEK:7,HEBREW1:8,EAST_EUROPE:9,IRAN:10,WPC1252:16,PC866:17,PC852:18,PC858:19,IranII:20,LATVIAN:21,ARABIC:22,PT1511251:23,PC747:24,WPC1257:25,VIETNAM:27,PC864:28,PC1001:29,UIGUR:30,HEBREW2:31,WPC1255_ISRAEL:32,WPC1256:33,PC861_ICELANDIC:56,PC863_CANADIAN:57,PC865_NORDIC:58,PC866_RUSSIAN:59,PC855_BULGARIAN:60,PC857_TURKEY:61,PC862_HEBREW:62,PC864_ARABIC:63,PC737_GREEK:64,PC851_GREEK:65,PC869_GREEK:66,PC928_GREEK:67,PC772_LITHUANIAN:68,PC774_LITHUANIAN:69,PC874_THAI:70,WPC1252_LATIN_1:71,WPC1250_LATIN_2:72,WPC1251_CYRILLIC:73,PC3840_IBM_RUSSIAN:74,PC3841_GOST:75,PC3843_POLISH:76,PC3844_CS2:77,PC3845_HUNGARIAN:78,PC3846_TURKISH:79,PC3847_BRAZIL_ABNT:80,PC3848_BRAZIL:81,PC1001_ARABIC:82,SIMPLIFIED_CHINESE:256,TRADITIONAL_CHINESE:257,KOREAN:258,JAPANESE:259});var L=Object.freeze({__proto__:null,Alignment:C,FontStyle:O,TextWidth:T,BitmapMode:P,BarcodeType:l,HRILocation:A,QrEcLevel:F,CutMode:N,DeviceType:R,CashDrawerPin:I,PrinterStatus:f,StatusType:m,PrintDirection:D,ImageSource:g,CodePage:w});const y=Object.freeze({Nomal:"N",Invert:"I"}),x=Object.freeze({ROTATION_0:"N",ROTATION_90:"R",ROTATION_180:"I",ROTATION_270:"B"}),S=Object.freeze({URL:0,BASE64:1,LOCAL_PATH:2}),H=Object.freeze({HEX:"H",ASCII:"A"});var B=Object.freeze({__proto__:null,Direction:y,Rotation:x,ImageSource:S,DataFormat:H});return t.EscPosCommand=class extends e{constructor(){super("ESC_POS")}setCodePage(t){return this._addFunction("setCodePage",[t]),this}setDefaultCodePage(t){return this._addFunction("setDefaultCodePage",[t]),this}setDoubleByteMode(t=!0){this._addFunction("setDoubleByteMode",[t])}checkPrinterStatus(){return this._addFunction("checkPrinterStatus",[2]),this}printText(t){const e={data:null,textSize:1,alignment:C.CENTER},{data:i,textSize:n,alignment:r}={...e,...t};return this._addFunction("printText",[i,n,r,0]),this}printBarCode(t){const e={data:null,type:l.Code128,width:3,height:162,alignment:C.CENTER,textPosition:A.NONE},{data:i,type:n,width:r,height:a,alignment:d,textPosition:s}={...e,...t};return this._addFunction("printBarCode",[i,n,r,a,d,s]),this}printQrCode(t){const e={alignment:C.CENTER,size:3,ecLevel:F.L},{data:i,alignment:n,size:r,ecLevel:a}={...e,...t};return this._addFunction("printQrCode",[i,n,r,a]),this}printAndFeed(t=0){return this._addFunction("printAndFeed",[t]),this}printImage(t){const e={type:g.URL,data:"",alignment:C.CENTER,mode:P.NORMAL},{type:i,data:n,alignment:r,mode:a}={...e,...t};return this._addFunction("printImage",[i,n,a,r]),this}printTable(t){return this._addFunction("printTable",[t.titles,t.columnWidths,t.rows]),this}setAlignment(t=0){return this._addFunction("setAlignment",[t]),this}cutPaper(t=1){return this._addFunction("cutPaper",[t]),this}feedAndCut(t=0){return this._addFunction("feedAndCut",[t]),this}cleanBuffer(){return this._addFunction("cleanBuffer",[]),this}},t.PosConst=L,t.TsplCommand=class extends e{constructor(){super("TSPL")}setUnit(t="MM"){return this._addFunction("setUnit",[t]),this}checkPrinterStatus(){return this._addFunction("checkPrinterStatus",[]),this}setPaperSize(t){return this._addFunction("setPaperSize",[t.width,t.height]),this}printBuffer(t=1){return this._addFunction("printBuffer",[t]),this}clearBuffer(){return this._addFunction("clearBuffer",[]),this}setGap(t){const{height:e,offset:i}={height:0,offset:0,...t};return this._addFunction("setGap",[e,i]),this}setSpeed(t=4){return this._addFunction("setSpeed",[t]),this}setDensity(t=8){return this._addFunction("setDensity",[t]),this}setDirection(t){const{orientation:e,isMirror:i}={orientation:1,isMirror:!1,...t};return this._addFunction("setDirection",[e,i]),this}setOffset(t=0){return this._addFunction("setOffset",[t]),this}setReference(t){const{x:e,y:i}={x:0,y:0,...t};return this._addFunction("setReference",[e,i]),this}setFeed(t){return this._addFunction("setFeed",[t]),this}setBackFeed(t){return this._addFunction("setBackFeed",t),this}setFormFeed(){return this._addFunction("setFormFeed",[]),this}setLimitFeed(t=254){return this._addFunction("setLimitFeed",[t]),this}setHome(){return this._addFunction("setHome",[]),this}setCodePage(t){return this._addFunction("setCodePage",[t]),this}setSound(t){const{level:e,interval:i}={level:5,interval:200,...t};return this._addFunction("setSound",[e,i]),this}setCut(){return this._addFunction("setCut",[]),this}setPeel(t=!0){return this._addFunction("setPeel",[t]),this}setTear(t=!0){return this._addFunction("setTear",[t]),this}setBline(t){const{height:e,offset:i}={height:0,offset:0,...t};return this._addFunction("setBline",[e,i]),this}drawText(t){const e={x:8,y:8,font:s.FNT_8_12,rotation:r.ROTATION_0,xRatio:1,yRatio:1,alignment:null,data:null},{x:i,y:n,font:a,rotation:d,xRatio:o,yRatio:h,alignment:c,data:u}={...e,...t};if(!u)throw new Error("Text data is required");return null==c?this._addFunction("drawText",[i,n,a,d,o,h,u]):this._addFunction("drawText",[i,n,a,d,o,h,c,u]),this}drawBox(t){const{x:e,y:i,width:n,height:r,thickness:a,radius:d}={x:8,y:8,width:100,height:100,thickness:4,radius:0,...t};return this._addFunction("drawBox",[e,i,n,r,a,d]),this}drawBar(t){const{x:e,y:i,width:n,height:r}={x:8,y:8,width:100,height:16,...t};return this._addFunction("drawBar",[e,i,n,r]),this}drawBarCode(t){const e={x:8,y:8,codeType:i.CODE_128,height:100,readable:d.LEFT,rotation:r.ROTATION_0,narrow:2,wide:2,alignment:null,data:null},{x:n,y:a,codeType:s,height:o,readable:h,rotation:c,narrow:u,wide:_,alignment:E,data:C}={...e,...t};if(!C)throw new Error("Barcode data is required");return null==E?this._addFunction("drawBarCode",[n,a,s,o,h,c,u,_,C]):this._addFunction("drawBarCode",[n,a,s,o,h,c,u,_,E,C]),this}drawQrCode(t){const e={x:8,y:8,ecLevel:n.L,cellWidth:5,mode:o.AUTO,rotation:r.ROTATION_0,model:h.M1,mask:7,data:null},{x:i,y:a,ecLevel:d,cellWidth:s,mode:c,rotation:u,model:_,mask:E,data:C}={...e,...t};return this._addFunction("drawQrCode",[i,a,d,s,c,u,_,E,C]),this}drawImage(t){const e={x:8,y:8,mode:u.OVERWRITE,width:100,type:c.URL,data:null},{x:i,y:n,mode:r,width:a,type:d,data:s}={...e,...t};return this._addFunction("drawImage",[i,n,r,a,d,s]),this}drawErase(t){const{x:e,y:i,width:n,height:r}={x:8,y:8,width:100,height:100,...t};return this._addFunction("drawErase",[e,i,n,r]),this}drawReverse(t){const{x:e,y:i,width:n,height:r}={x:8,y:8,width:100,height:100,...t};return this._addFunction("drawReverse",[e,i,n,r]),this}},t.TsplConst=E,t.ZplCommand=class extends e{constructor(){super("ZPL")}commandStart(){return this._addFunction("commandStart",[]),this}commandEnd(){return this._addFunction("commandEnd",[]),this}setCustomFont(t){const{fontName:e,alias:i,codePage:n}={fontName:"",alias:"",codePage:28,...t};return this._addFunction("setCustomFont",[e,i,n]),this}setPrintWidth(t=0){return this._addFunction("setPrintWidth",[t]),this}setPrintCount(t=1){return this._addFunction("setPrintCount",[t]),this}setPaperSize(t=8,e=8){return this._addFunction("setPaperSize",[t,e]),this}setDirection(t=y.Nomal){return this._addFunction("setDirection",[t]),this}setBlackMakOffset(t=0){return this._addFunction("setBlackMakOffset",[t]),this}setReference(t=0,e=0){return this._addFunction("setReference",[t,e]),this}setBarcodeDefault(t){const{modWidth:e,ratio:i,height:n}={modWidth:2,ratio:3,height:10,...t};return this._addFunction("setBarcodeDefault",[e,i,n]),this}drawText(t){const e={x:8,y:8,font:"A",rotation:x.ROTATION_0,sizeW:10,sizeH:10,data:null},{x:i,y:n,font:r,rotation:a,sizeW:d,sizeH:s,data:o}={...e,...t};return this._addFunction("drawText",[i,n,r,a,d,s,o]),this}drawReverse(t){const{x:e,y:i,width:n,height:r,radius:a}={x:8,y:8,width:100,height:100,radius:0,...t};return this._addFunction("drawReverse",[e,i,n,r,a]),this}drawBox(t){const{x:e,y:i,width:n,height:r,thickness:a,radius:d}={x:8,y:8,width:100,height:100,thickness:1,radius:0,...t};return this._addFunction("drawBox",[e,i,n,r,d,a]),this}drawQrCode(t){const{x:e,y:i,size:n,data:r}={x:8,y:8,size:2,data:null,...t};return this._addFunction("drawQrCode",[e,i,n,r]),this}drawCode39(t){const e={x:8,y:8,rotation:x.ROTATION_0,checksum:!1,height:80,hri:!0,aboveHri:!1,data:null},{x:i,y:n,rotation:r,checksum:a,height:d,hri:s,aboveHri:o,data:h}={...e,...t};return this._addFunction("drawCode39",[i,n,r,a,d,s,o,h]),this}drawCode93(t){const e={x:8,y:8,rotation:x.ROTATION_0,checksum:!1,height:80,hri:!0,aboveHri:!1,data:null},{x:i,y:n,rotation:r,checksum:a,height:d,hri:s,aboveHri:o,data:h}={...e,...t};return this._addFunction("drawCode93",[i,n,r,d,s,o,a,h]),this}drawCode128(t){const e={x:8,y:8,rotation:x.ROTATION_0,checksum:!1,height:80,hri:!0,aboveHri:!1,mode:"N",data:null},{x:i,y:n,rotation:r,checksum:a,height:d,hri:s,aboveHri:o,mode:h,data:c}={...e,...t};return this._addFunction("drawCode128",[i,n,r,d,s,o,a,h,c]),this}drawEan8(t){const e={x:8,y:8,rotation:x.ROTATION_0,height:80,hri:!0,aboveHri:!1,data:null},{x:i,y:n,rotation:r,height:a,hri:d,aboveHri:s,data:o}={...e,...t};return this._addFunction("drawEan8",[i,n,r,a,d,s,o]),this}drawEan13(t){const e={x:8,y:8,rotation:x.ROTATION_0,height:80,hri:!0,aboveHri:!1,data:null},{x:i,y:n,rotation:r,height:a,hri:d,aboveHri:s,data:o}={...e,...t};return this._addFunction("drawEan13",[i,n,r,a,d,s,o]),this}drawUpcE(t){const e={x:8,y:8,rotation:x.ROTATION_0,height:80,hri:!0,aboveHri:!1,checksum:!1,data:null},{x:i,y:n,rotation:r,height:a,hri:d,aboveHri:s,checksum:o,data:h}={...e,...t};return this._addFunction("drawUpcE",[i,n,r,a,d,s,o,h]),this}drawUpcA(t){const e={x:8,y:8,rotation:x.ROTATION_0,height:80,hri:!0,aboveHri:!1,checksum:!1,data:null},{x:i,y:n,rotation:r,height:a,hri:d,aboveHri:s,checksum:o,data:h}={...e,...t};return this._addFunction("drawUpcA",[i,n,r,a,d,s,o,h]),this}drawPdf417(t){const e={x:8,y:8,rotation:x.ROTATION_0,height:80,secureLevel:0,col:1,row:1,showIndicator:!1,data:null},{x:i,y:n,rotation:r,height:a,secureLevel:d,col:s,row:o,showIndicator:h,data:c}={...e,...t};return this._addFunction("drawPdf417",[i,n,r,a,d,s,o,h,c]),this}drawMicroPdf417(t){const e={x:8,y:8,rotation:x.ROTATION_0,height:80,mode:0,data:null},{x:i,y:n,rotation:r,height:a,mode:d,data:s}={...e,...t};return this._addFunction("drawMicroPdf417",[i,n,r,a,d,s]),this}drawImage(t){const e={x:8,y:8,width:100,type:S.URL,data:null},{x:i,y:n,width:r,type:a,data:d}={...e,...t};return this._addFunction("drawImage",[i,n,r,a,d]),this}calibrateRfidTag(){return this._addFunction("calibrateRfidTag",[]),this}setRfid(t){const{writePower:e,readPower:i,tagType:n,position:r,errLength:a,errRepeat:d}={writePower:12,readPower:13,tagType:8,position:25,errLength:50,errRepeat:1,...t};return this._addFunction("setRfid",[e,i,n,r,a,d]),this}writeToRfid(t){const e={format:H.HEX,start:2,size:0,memoryBlock:"E",data:null},{format:i,start:n,size:r,memoryBlock:a,data:d}={...e,...t};return d.length%2!=0&&(d+="0"),this._addFunction("writeToRfid",[i,n,r,a,d]),this}readFromRfid(t){const{format:e,start:i,size:n,memoryBlock:r}={format:"H",start:2,size:8,memoryBlock:"1",...t};return this._addFunction("readFromRfid",[e,i,n,r],!0),this}},t.ZplConst=B,Object.defineProperty(t,"__esModule",{value:!0}),t}({}); diff --git a/src/views/canteen/dish/material/components/MaterialDialog.vue b/src/views/canteen/dish/material/components/MaterialDialog.vue index 9631b985..d7a18a5e 100644 --- a/src/views/canteen/dish/material/components/MaterialDialog.vue +++ b/src/views/canteen/dish/material/components/MaterialDialog.vue @@ -301,6 +301,7 @@ export default { materialName: [{ required: true, message: '请输入原料名称', trigger: 'blur' }], areaId: [{ required: true, message: '请选择所属区域', trigger: 'change' }], materialTypeId: [{ required: true, message: '请选择原料类别', trigger: 'change' }], + unitId: [{ required: true, message: '请选择单位', trigger: 'change' }], salesMode: [{ required: true, message: '请选择计量类型', trigger: 'change' }], shelfLifeDays: [{ required: true, message: '请输入临期天数', trigger: 'change' }], nutritionTypeId: [{ required: true, message: '请选择营养信息类别', trigger: 'change' }], diff --git a/src/views/canteen/dish/menu/detail.vue b/src/views/canteen/dish/menu/detail.vue index e90e3d30..c50c6ef0 100644 --- a/src/views/canteen/dish/menu/detail.vue +++ b/src/views/canteen/dish/menu/detail.vue @@ -964,42 +964,44 @@ export default { confirmSubmit(){ this.$refs["baseInfo"].validate(valid => { if (valid) { - let param = this.baseInfo - if(this.baseInfo.recipeType==1){ - param.recipeDateList = this.dateRangeList; - } - if(this.baseInfo.recipeType==2){ - param.recipeDateList = [{ - anyone:"repeat", - detailList:this.detailList - }] - } - if(this.baseInfo.recipeType==3){ - param.recipeDateList = this.weekDateList - } - this.noDishes = true; - param.recipeDateList.forEach(item=>{ - item.detailList.forEach(subItem=>{ - if(subItem.dishesList.length>0){ - this.noDishes=false - subItem.dishesList.forEach(dishItem=>{ - dishItem.price = Number(dishItem.price) - dishItem.salePrice = Number(dishItem.salePrice) - }) - } + setTimeout(()=>{ + let param = this.baseInfo + if(this.baseInfo.recipeType==1){ + param.recipeDateList = this.dateRangeList; + } + if(this.baseInfo.recipeType==2){ + param.recipeDateList = [{ + anyone:"repeat", + detailList:this.detailList + }] + } + if(this.baseInfo.recipeType==3){ + param.recipeDateList = this.weekDateList + } + this.noDishes = true; + param.recipeDateList.forEach(item=>{ + item.detailList.forEach(subItem=>{ + if(subItem.dishesList.length>0){ + this.noDishes=false + subItem.dishesList.forEach(dishItem=>{ + dishItem.price = Number(dishItem.price) + dishItem.salePrice = Number(dishItem.salePrice) + }) + } + }) }) - }) - if(this.noDishes){ - this.$modal.msgError("请选中菜品!"); - }else{ - this.loading=true - addMenuRecipeApi(param).then((response) => { - this.loading=false - this.jumpList() - }).catch(() => { - this.loading=false - }); - } + if(this.noDishes){ + this.$modal.msgError("请选中菜品!"); + }else{ + this.loading=true + addMenuRecipeApi(param).then((response) => { + this.loading=false + this.jumpList() + }).catch(() => { + this.loading=false + }); + } + },500) } }); }, diff --git a/src/views/canteen/dish/menu/edit.vue b/src/views/canteen/dish/menu/edit.vue index 517e60c6..818cafd6 100644 --- a/src/views/canteen/dish/menu/edit.vue +++ b/src/views/canteen/dish/menu/edit.vue @@ -337,7 +337,7 @@ 确 定 取 消 - + @@ -796,7 +796,7 @@ export default { mealtimeName:"夜宵", } ] - }, + }, // 返回列表页 jumpList() { const obj = { path: "/canteen/dish/menuDetail" }; @@ -1168,66 +1168,67 @@ export default { confirmSubmit(){ this.$refs["baseInfo"].validate(valid => { if (valid) { - let param = this.baseInfo - if(this.baseInfo.recipeType==1){ - param.recipeDateList = [] - this.dateRangeList.forEach(item=>{ - let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0) - if(index>-1){ - param.recipeDateList.push(item) - }else{ - if(item.editStatus){ + setTimeout(()=>{ + let param = this.baseInfo + if(this.baseInfo.recipeType==1){ + param.recipeDateList = [] + this.dateRangeList.forEach(item=>{ + let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0) + if(index>-1){ param.recipeDateList.push(item) + }else{ + if(item.editStatus){ + param.recipeDateList.push(item) + } } - } - }) - } - if(this.baseInfo.recipeType==2){ - param.recipeDateList = [{ - anyone:"repeat", - detailList:this.detailList - }] - } - if(this.baseInfo.recipeType==3){ - param.recipeDateList = [] - this.weekDateList.forEach(item=>{ - let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0) - if(index>-1){ - param.recipeDateList.push(item) - }else{ - if(item.editStatus){ + }) + } + if(this.baseInfo.recipeType==2){ + param.recipeDateList = [{ + anyone:"repeat", + detailList:this.detailList + }] + } + if(this.baseInfo.recipeType==3){ + param.recipeDateList = [] + this.weekDateList.forEach(item=>{ + let index = item.detailList.findIndex(subItem=>subItem.dishesList.length>0) + if(index>-1){ param.recipeDateList.push(item) - } - } - + }else{ + if(item.editStatus){ + param.recipeDateList.push(item) + } + } + + }) + } + this.noDishes = true; + param.recipeDateList.forEach(item=>{ + item.detailList.forEach(subItem=>{ + if(subItem.dishesList.length>0){ + this.noDishes=false + subItem.dishesList.forEach(dishItem=>{ + dishItem.price = Number(dishItem.price) + dishItem.salePrice = Number(dishItem.salePrice) + }) + } + }) }) - } - this.noDishes = true; - param.recipeDateList.forEach(item=>{ - item.detailList.forEach(subItem=>{ - if(subItem.dishesList.length>0){ - this.noDishes=false - subItem.dishesList.forEach(dishItem=>{ - dishItem.price = Number(dishItem.price) - dishItem.salePrice = Number(dishItem.salePrice) - }) - } - }) - }) - console.log(param) - if(this.noDishes){ - this.$modal.msgError("请选中菜品!"); - }else{ - this.loading=true - editMenuRecipeApi(param).then((response) => { - this.loading=false - this.jumpList() - }).catch(() => { - this.loading=false; + console.log(param) + if(this.noDishes){ + this.$modal.msgError("请选中菜品!"); + }else{ + this.loading=true + editMenuRecipeApi(param).then((response) => { + this.loading=false + this.jumpList() + }).catch(() => { + this.loading=false; - }); - } - + }); + } + },500) } }); }, diff --git a/src/views/canteen/healthCenter/examinationReport/index.vue b/src/views/canteen/healthCenter/examinationReport/index.vue index 71550f5b..2bc4b2e1 100644 --- a/src/views/canteen/healthCenter/examinationReport/index.vue +++ b/src/views/canteen/healthCenter/examinationReport/index.vue @@ -42,8 +42,6 @@ - - - + @@ -302,7 +300,7 @@ diff --git a/src/views/foodManage/index.vue b/src/views/foodManage/index.vue index 28aeb7af..73fe15a0 100644 --- a/src/views/foodManage/index.vue +++ b/src/views/foodManage/index.vue @@ -432,7 +432,7 @@ export default { { type: "category", inverse: true, - offset: 60, + offset: 90, axisLabel: { show: true, align: "left", @@ -444,7 +444,7 @@ export default { var str = ""; var no = "NO."; num = index + 1; - value = value.length > 7 ? value.slice(0, 7) + '...' : value + value = value.length > 5 ? value.slice(0, 5) + '...' : value if (index === 0) { str = " {num1|" + num + "} {title1|" + value + "}"; } else if (index === 1) { @@ -537,7 +537,7 @@ export default { { type: "category", inverse: true, - offset: -10, + offset: -40, axisTick: "none", axisLine: "none", show: true, @@ -747,7 +747,7 @@ export default { { type: "category", inverse: true, - offset: 100, + offset: 90, axisLabel: { show: true, align: "left", @@ -759,7 +759,7 @@ export default { var str = ""; var no = "NO."; num = index + 1; - value = value.length > 7 ? value.slice(0, 7) + '...' : value + value = value.length > 5 ? value.slice(0, 5) + '...' : value if (index === 0) { str = " {num1|" + num + "} {title1|" + value + "}"; } else if (index === 1) { diff --git a/src/views/foodManage/pickManage/materialPicking/edit.vue b/src/views/foodManage/pickManage/materialPicking/edit.vue index d18aa774..7c4676ad 100644 --- a/src/views/foodManage/pickManage/materialPicking/edit.vue +++ b/src/views/foodManage/pickManage/materialPicking/edit.vue @@ -549,46 +549,50 @@ export default { confirmSave(){ this.$refs["baseInfo"].validate(valid => { if (valid) { - let param = Object.assign({},this.baseInfo); - param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime) - param.totalNum=0 - param.detailList = [] - this.noMaterial = false; - if(this.materialList.length>0){ - this.materialList.forEach(item=>{ - if(item.fetchNum==0){ - this.noMaterial = true - }else{ - let obj = Object.assign({}, item) - // obj.singlePrice = Number(obj.singlePrice)*100 - // obj.totalPrice = (Number(obj.singlePrice)*Number(obj.fetchNum)) - // param.orderAmount = param.orderAmount+obj.totalPrice; - param.totalNum = param.totalNum+Number(obj.fetchNum) - param.detailList.push(obj) - } - }) - } - if(this.noMaterial){ - this.$modal.msgError("请输入货品数量!"); - }else{ - this.noMaterial = true; - if(this.materialList.length>0){ - this.noMaterial = false; + setTimeout(()=>{ + let param = Object.assign({},this.baseInfo); + param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime) + param.totalNum=0 + param.detailList = [] + this.noMaterial = false; + if(this.materialList.length>0){ + this.materialList.forEach(item=>{ + if(item.fetchNum==0){ + this.noMaterial = true + }else{ + let obj = Object.assign({}, item) + // obj.singlePrice = Number(obj.singlePrice)*100 + // obj.totalPrice = (Number(obj.singlePrice)*Number(obj.fetchNum)) + // param.orderAmount = param.orderAmount+obj.totalPrice; + param.totalNum = param.totalNum+Number(obj.fetchNum) + param.detailList.push(obj) + } + }) } - console.log(param) if(this.noMaterial){ - this.$modal.msgError("请添加货品!"); + this.$modal.msgError("请输入货品数量!"); }else{ - this.loadingBtn=true; - addFetchMaterialApi(param).then((response) => { - this.$modal.msgSuccess("保存成功"); - this.loadingBtn=false - this.jumpList() - }).catch(() => { - this.loadingBtn=false - }); - } - } + this.noMaterial = true; + if(this.materialList.length>0){ + this.noMaterial = false; + } + console.log(param) + if(this.noMaterial){ + this.$modal.msgError("请添加货品!"); + }else{ + this.loadingBtn=true; + setTimeout(()=>{ + addFetchMaterialApi(param).then((response) => { + this.$modal.msgSuccess("保存成功"); + this.loadingBtn=false + this.jumpList() + }).catch(() => { + this.loadingBtn=false + }); + },500) + } + } + },500) } }); }, @@ -596,47 +600,48 @@ export default { confirmSubmit(){ this.$refs["baseInfo"].validate(valid => { if (valid) { - let param = Object.assign({},this.baseInfo); - param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime) - param.totalNum=0 - param.detailList = [] - this.noMaterial = false; - if(this.materialList.length>0){ - this.materialList.forEach(item=>{ - if(item.fetchNum==0){ - this.noMaterial = true - }else{ - let obj = Object.assign({}, item) - // obj.singlePrice = Number(obj.singlePrice)*100 - // obj.totalPrice = (Number(obj.singlePrice)*Number(obj.fetchNum)) - // param.orderAmount = param.orderAmount+obj.totalPrice; - param.totalNum = param.totalNum+Number(obj.fetchNum) - param.detailList.push(obj) - } - }) - } - if(this.noMaterial){ - this.$modal.msgError("请输入货品数量!"); - }else{ - this.noMaterial = true; - if(this.materialList.length>0){ - this.noMaterial = false; + setTimeout(()=>{ + let param = Object.assign({},this.baseInfo); + param.fetchMaterialTime = this.formatDateTime(this.baseInfo.fetchMaterialTime) + param.totalNum=0 + param.detailList = [] + this.noMaterial = false; + if(this.materialList.length>0){ + this.materialList.forEach(item=>{ + if(item.fetchNum==0){ + this.noMaterial = true + }else{ + let obj = Object.assign({}, item) + // obj.singlePrice = Number(obj.singlePrice)*100 + // obj.totalPrice = (Number(obj.singlePrice)*Number(obj.fetchNum)) + // param.orderAmount = param.orderAmount+obj.totalPrice; + param.totalNum = param.totalNum+Number(obj.fetchNum) + param.detailList.push(obj) + } + }) } - console.log(param) if(this.noMaterial){ - this.$modal.msgError("请添加货品!"); + this.$modal.msgError("请输入货品数量!"); }else{ - this.loadingBtn=true; - editFetchMaterialApi(param).then((response) => { - this.$modal.msgSuccess("提交成功"); - this.loadingBtn=false - this.jumpList() - }).catch(() => { - this.loadingBtn=false - }); + this.noMaterial = true; + if(this.materialList.length>0){ + this.noMaterial = false; + } + console.log(param) + if(this.noMaterial){ + this.$modal.msgError("请添加货品!"); + }else{ + this.loadingBtn=true; + editFetchMaterialApi(param).then((response) => { + this.$modal.msgSuccess("提交成功"); + this.loadingBtn=false + this.jumpList() + }).catch(() => { + this.loadingBtn=false + }); + } } - } - + },500) } }); }, @@ -680,11 +685,11 @@ export default { "stallId": this.baseInfo.stallId } if(this.dateRange&&this.dateRange.length>0){ - param.startDateTime=this.formatDateTime(this.dateRange[0]) - param.endDateTime=this.formatDateTime(this.dateRange[1]) + param.startTime=this.formatDateTime(this.dateRange[0]) + param.endTime=this.formatDateTime(this.dateRange[1]) }else{ - param.startDateTime=undefined; - param.endDateTime=undefined; + param.startTime=undefined; + param.endTime=undefined; } purchasePlanPageApi(param).then(response => { this.tableListData2 = response.rows; @@ -725,7 +730,7 @@ export default { if(Number(row.fetchNum)>Number(row.materialNum)){ row.fetchNum = row.materialNum } - },500) + },200) }, defaultDateRange() { const end = new Date(new Date().toLocaleDateString()); diff --git a/src/views/foodManage/purchaseManage/contractList/detail.vue b/src/views/foodManage/purchaseManage/contractList/detail.vue index b969a5cb..f838f610 100644 --- a/src/views/foodManage/purchaseManage/contractList/detail.vue +++ b/src/views/foodManage/purchaseManage/contractList/detail.vue @@ -100,7 +100,7 @@ diff --git a/src/views/foodManage/purchaseManage/contractList/edit.vue b/src/views/foodManage/purchaseManage/contractList/edit.vue index f8a821fd..e03a5b69 100644 --- a/src/views/foodManage/purchaseManage/contractList/edit.vue +++ b/src/views/foodManage/purchaseManage/contractList/edit.vue @@ -116,6 +116,7 @@
添加货品 + 导入采购订单 删除
@@ -226,6 +227,57 @@ 取 消
+ + + +
+ + + + + + 搜索 + 重置 + + + + + + + + + + + + + + + + + + + + +
+ +
@@ -234,6 +286,7 @@ import { imgUpLoadTwo } from '@/api/system/upload' import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall"; import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi } from "@/api/foodManage/purchaseManage"; import { getPurchaseContractInfoApi,addPurchaseContractApi,editPurchaseContractApi,delPurchaseContractApi } from "@/api/foodManage/purchaseManage"; +import { purchaseOrderPageApi,getPurchaseOrderInfoApi } from "@/api/foodManage/purchaseManage"; export default { name: "ContractEdit", dicts: [], @@ -296,7 +349,18 @@ export default { tableListData: [],//货品弹窗-货品表格数据 batchChosenMaterial:[],//货品弹窗-货品表格-选中的货品数组 noMaterial:false, - + //导入功能 + openImportDialog:false, + queryParams2: { // 货品弹窗-货品表格-查询参数 + pageNum: 1, + pageSize: 10, + orderGoodsCode:null + }, + loading2:false, + total2: 0, // 总条数 + tableListData2: [],//导入弹窗-表格数据 + importRow:{},//导入弹窗-表格数据-选中数据 + materialDetailsData: [],//导入弹窗-明细数据 }; }, created() { @@ -626,7 +690,84 @@ export default { } }); }, - + //导入 + importPurchaseOrder(){ + if(this.baseInfo.areaId!=undefined||this.baseInfo.deliveryWarehouseId!=undefined||this.baseInfo.supplierId!=undefined){ + this.openImportDialog=true + this.resetQuery2() + // setTimeout(()=>{ + // this.$refs.multipleTable2.clearSelection() + // },300) + }else{ + this.$modal.msgError("请先选择区域,供应商"); + } + }, + /** 搜索按钮操作 */ + handleQuery2() { + this.queryParams2.pageNum = 1; + this.getList2(); + }, + /** 重置按钮操作 */ + resetQuery2() { + this.queryParams2 = { + pageNum: 1, + pageSize: 10, + } + this.resetForm("queryForm2"); + this.handleQuery2(); + }, + /** 查询列表 */ + getList2() { + this.loading2 = true; + let param = { + "pageSize": this.queryParams2.pageSize, + "pageNum": this.queryParams2.pageNum, + "orderGoodsCode": this.queryParams2.orderGoodsCode, + "orderStatus":2, + // "isInspect":2, + "areaId": this.baseInfo.areaId, + // "warehouseId": this.baseInfo.deliveryWarehouseId, + "supplierId": this.baseInfo.supplierId, + } + purchaseOrderPageApi(param).then(response => { + this.tableListData2 = response.rows; + this.total2 = Number(response.total); + this.loading2 = false; + }); + }, + confirmImport(row){ + console.log(row) + this.importRow = row; + let param = { + orderGoodsId:this.importRow.orderGoodsId + } + getPurchaseOrderInfoApi(param).then((response) => { + this.materialDetailsData = response.data.orderGoodsDetailList||[]; + this.$modal.confirm('是否确认导入采购订单?').then(()=>{ + if(this.materialDetailsData.length>0){ + this.contractMaterialList = this.materialDetailsData; + this.contractMaterialList.forEach(item=>{ + this.$set(item,"singlePrice",Number(item.singlePrice/100)) + this.$set(item,"orderNum",item.orderNum) + // if(item.totalQualifiedNum&&item.totalQualifiedNum>0){ + // this.$set(item,"deliveryNum",Number(item.orderNum)-Number(item.totalQualifiedNum)) + // this.$set(item,"qualifiedNum",Number(item.orderNum)-Number(item.totalQualifiedNum)) + // }else{ + // this.$set(item,"deliveryNum",Number(item.orderNum)) + // this.$set(item,"qualifiedNum",Number(item.orderNum)) + // } + }) + // this.baseInfo.relateOrderGoodsId = this.importRow.orderGoodsCode; + this.$set(this.baseInfo,"remark","导入采购订单") + setTimeout(()=>{ + this.openImportDialog=false + },500) + }else{ + this.$modal.msgError("采购订单明细无货品!"); + } + }).catch(() => {}); + }); + }, //附件上传 fileUpLoad(param){ param.type = 'canteen' diff --git a/src/views/foodManage/purchaseManage/contractList/index.vue b/src/views/foodManage/purchaseManage/contractList/index.vue index 1f7fb46d..db69f275 100644 --- a/src/views/foodManage/purchaseManage/contractList/index.vue +++ b/src/views/foodManage/purchaseManage/contractList/index.vue @@ -125,10 +125,16 @@ >提交 --> 删除 + 终止 @@ -160,7 +166,7 @@ diff --git a/src/views/foodManage/stockManage/warehouseIn/edit.vue b/src/views/foodManage/stockManage/warehouseIn/edit.vue index da55c9e8..35f2111b 100644 --- a/src/views/foodManage/stockManage/warehouseIn/edit.vue +++ b/src/views/foodManage/stockManage/warehouseIn/edit.vue @@ -9,13 +9,13 @@ - + - + - + - + - + @@ -265,6 +265,7 @@ export default { contractType:undefined, areaId:undefined, canteenId:undefined, + intoDate:new Date() }, // 表单校验 baseRules: { @@ -409,16 +410,16 @@ export default { this.getSupplierData() }, /** 查询供应商下拉结构 */ - getWareHouseData() { + getWareHouseData() { drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => { this.wareHouseOptions = response.rows||[]; if(this.wareHouseOptions.length>0){ this.$set(this.baseInfo,"warehouseId",this.wareHouseOptions[0].warehouseId) } }); - }, + }, /** 查询供应商下拉结构 */ - getSupplierData() { + getSupplierData() { supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => { this.supplierOptions = response.rows||[]; }); @@ -448,7 +449,7 @@ export default { this.materialList.splice(index,1) } }) - setTimeout(()=>{ + setTimeout(()=>{ this.$refs.multipleTable.clearSelection() },300) }, @@ -486,6 +487,7 @@ export default { "pageSize": this.queryParams.pageSize, "pageNum": this.queryParams.pageNum, "areaId": this.baseInfo.areaId, + "warehouseId": this.baseInfo.warehouseId, "materialName": this.queryParams.materialName, "materialCode": this.queryParams.materialCode, "materialTypeIds": this.queryParams.materialTypeIds, @@ -498,7 +500,7 @@ export default { }, handleSelectionChange2(selection) { this.batchChosenMaterial = []; - selection.forEach(item=>{ + selection.forEach(item=>{ let obj = Object.assign({}, item) obj.unitPrice = item.unitPrice/100; this.$set(obj,"purNum",0) @@ -526,7 +528,7 @@ export default { this.loading = false this.openDialog=false },500) - } + } } }, //保存草稿 @@ -542,6 +544,7 @@ export default { this.noMaterial = false; if(this.materialList.length>0){ this.materialList.forEach(item=>{ + this.$set(item,"purNum",Number(item.purNum)) if(item.unitPrice==0 || item.purNum==0 || item.supplierId==null || !item.productDate|| !item.expireTime){ this.noMaterial = true }else{ @@ -602,6 +605,7 @@ export default { this.noMaterial = false; if(this.materialList.length>0){ this.materialList.forEach(item=>{ + this.$set(item,"purNum",Number(item.purNum)) if(item.unitPrice==0 || item.purNum==0 || item.supplierId==null || !item.productDate|| !item.expireTime){ this.noMaterial = true }else{ @@ -683,7 +687,8 @@ export default { "pageNum": this.queryParams2.pageNum, "orderGoodsCode": this.queryParams2.orderGoodsCode, "orderStatus":2, - "ifAllInto":2, + "isInspect":0, + "ifAllInto":2, "areaId": this.baseInfo.areaId, "warehouseId": this.baseInfo.warehouseId, "supplierId": this.baseInfo.deliverySupplierId, @@ -727,13 +732,13 @@ export default { }, patternValue(row){ row.purNum = row.purNum.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1') - if(row.intoNum&&row.intoNum>0){ + if(row.intoNum&&row.intoNum>0){ setTimeout(()=>{ if(Number(row.purNum)>(Number(row.totalQualifiedNum)-Number(row.intoNum))){ row.purNum = Number(row.totalQualifiedNum)-Number(row.intoNum) } },500) - }else{ + }else{ setTimeout(()=>{ if(Number(row.purNum)>Number(row.totalQualifiedNum)){ row.purNum = Number(row.totalQualifiedNum) diff --git a/src/views/foodManage/stockManage/warehouseOut/edit.vue b/src/views/foodManage/stockManage/warehouseOut/edit.vue index a6c802df..60ca41f1 100644 --- a/src/views/foodManage/stockManage/warehouseOut/edit.vue +++ b/src/views/foodManage/stockManage/warehouseOut/edit.vue @@ -69,11 +69,11 @@ - - - + @@ -135,11 +135,11 @@ 称重 --> - + @@ -265,7 +265,7 @@ export default { disabledDate(v) { return v.getTime() > (new Date().getTime() + 86400000);// - 86400000是否包括当天 } - }, + }, materialList:[],//货品信息-表格数据 batchIds:[],//货品信息-表格数据-多选 openDialog:false, diff --git a/src/views/foodManage/stockReport/expiredWarning/index.vue b/src/views/foodManage/stockReport/expiredWarning/index.vue index 2aa1d6e1..acd5db51 100644 --- a/src/views/foodManage/stockReport/expiredWarning/index.vue +++ b/src/views/foodManage/stockReport/expiredWarning/index.vue @@ -28,7 +28,7 @@ - + diff --git a/src/views/foodManage/supplierFunction/supplierQuotation/detail.vue b/src/views/foodManage/supplierFunction/supplierQuotation/detail.vue index 8142e383..df789204 100644 --- a/src/views/foodManage/supplierFunction/supplierQuotation/detail.vue +++ b/src/views/foodManage/supplierFunction/supplierQuotation/detail.vue @@ -36,7 +36,7 @@ - {{ baseInfo.bidTotalPrice }} + {{ (baseInfo.quoteAmount/100).toFixed(2) }} @@ -89,13 +89,13 @@