diff --git a/api/app/model/dingdan.js b/api/app/model/dingdan.js index f88946f..6d66ddb 100644 --- a/api/app/model/dingdan.js +++ b/api/app/model/dingdan.js @@ -16,6 +16,11 @@ module.exports = app => { default: Date.now }, // 客户编号 + shunxu: { + type: Number, + default: 0 + }, + // 客户编号 kehubianhao: { type: String, default: "" diff --git a/api/app/service/dingdan.js b/api/app/service/dingdan.js index a2dd480..ea122ba 100644 --- a/api/app/service/dingdan.js +++ b/api/app/service/dingdan.js @@ -59,7 +59,7 @@ class DingdanService extends Service { let currentPage = paramsLocal.currentPage let paramsLocalInfo = _.omit(paramsLocal, ["pageSize", "currentPage", "url"]) let paramsLocalInfoNotDel = { ...paramsLocalInfo, isExit: 1 } - let res = await modelLocal.find(paramsLocalInfoNotDel).sort({ update_at: -1 }).skip((currentPage - 1) * pageSize).limit(pageSize) + let res = await modelLocal.find(paramsLocalInfoNotDel).sort({ shunxu: 1 }).skip((currentPage - 1) * pageSize).limit(pageSize) let whereOther = paramsLocalInfoNotDel["$where"] let paramsLocalInfoAgg = _.omit(paramsLocalInfoNotDel, ["$where"]) if (whereOther === "this.zuigaocaigoujia > this.xiaoshoujine") { diff --git a/front/src/renderer/src/views/dingdan.vue b/front/src/renderer/src/views/dingdan.vue index 7c0e15e..011f7c1 100644 --- a/front/src/renderer/src/views/dingdan.vue +++ b/front/src/renderer/src/views/dingdan.vue @@ -158,7 +158,7 @@ export default { let list = [] for (let i = 0; i < sheetData.length; i++) { let element = sheetData[i]; - let item = {} + let item = { shunxu: Date.now() + i } for (let j = 0; j < that.tableHeader.length; j++) { let headerItem = that.tableHeader[j]; if (headerItem.prop === "kehupinming") { @@ -326,7 +326,7 @@ export default { let params = { subType: this.dialogFrom.type, url: "/api/dingdanInfo", - list: [{ ...this.dialogFrom.formData }] + list: [{ shunxu: Date.now(), ...this.dialogFrom.formData }] } await this.updateSeach(params) await setTimeout(async () => {