Commit 21834119 by zhangzhen

细节优化

parent b2850a19
...@@ -50,6 +50,39 @@ const setParamsData = (data = {}) => { ...@@ -50,6 +50,39 @@ const setParamsData = (data = {}) => {
return paramsData return paramsData
} }
const setResultData = (data={}) => {
let obj = {}
for (let i in data) {
if (data[i] !== '') {
obj[i] = data[i]
}
}
let paramsData = {
"__version__": "2.0",
"__sys__": {},
"__blocks__": {
"result": {
"attr": {},
"meta": {
"columns": []
},
"rows": []
}
}
}
let keyList = Object.keys(obj);
keyList.forEach((item, index) => {
paramsData.__blocks__.result.meta.columns.push({
pos: index,
name: item
})
})
paramsData.__blocks__.result.rows.push(Object.values(obj));
return paramsData
}
// 登录 // 登录
export const login = (data) => { export const login = (data) => {
let url = `/service/S_XS_105` let url = `/service/S_XS_105`
...@@ -139,6 +172,12 @@ export const getUserByCompanyCode = (data) => { ...@@ -139,6 +172,12 @@ export const getUserByCompanyCode = (data) => {
return http.post(url, d) return http.post(url, d)
} }
export const getImgInfoList = (data) => {
let url = `/service/S_XC_IMG`;
let d = setParamsData(data)
return http.post(url, d)
}
//上传文件 //上传文件
......
...@@ -208,9 +208,7 @@ ...@@ -208,9 +208,7 @@
} }
}, },
onBack() { onBack() {
uni.redirectTo({ uni.navigateBack();
url:"/pages/product-order/list"
})
}, },
onOpenCalendar(){ onOpenCalendar(){
this.show2 = true; this.show2 = true;
...@@ -236,7 +234,7 @@ ...@@ -236,7 +234,7 @@
taskId: this.orderInfo.id, taskId: this.orderInfo.id,
registerDate: this.orderInfo.registerDate || moment().format("YYYY-MM-DD"), registerDate: this.orderInfo.registerDate || moment().format("YYYY-MM-DD"),
quantity: this.orderInfo.finishQuantity, quantity: this.orderInfo.finishQuantity,
matId: this.fileList && this.fileList.length? this.fileList.map(item=>item.id).join():'' docId: this.fileList && this.fileList.length? this.fileList.map(item=>item.id).join():''
}).then(res=>{ }).then(res=>{
if(res.data.__sys__.status===0){ if(res.data.__sys__.status===0){
uni.showToast({ uni.showToast({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment