Browse Source

1233

master
lichong 9 months ago
parent
commit
232ac4c77e
  1. 5
      api/app/model/dingdan.js
  2. 2
      api/app/service/dingdan.js
  3. 4
      front/src/renderer/src/views/dingdan.vue

5
api/app/model/dingdan.js

@ -16,6 +16,11 @@ module.exports = app => {
default: Date.now default: Date.now
}, },
// 客户编号 // 客户编号
shunxu: {
type: Number,
default: 0
},
// 客户编号
kehubianhao: { kehubianhao: {
type: String, type: String,
default: "" default: ""

2
api/app/service/dingdan.js

@ -59,7 +59,7 @@ class DingdanService extends Service {
let currentPage = paramsLocal.currentPage let currentPage = paramsLocal.currentPage
let paramsLocalInfo = _.omit(paramsLocal, ["pageSize", "currentPage", "url"]) let paramsLocalInfo = _.omit(paramsLocal, ["pageSize", "currentPage", "url"])
let paramsLocalInfoNotDel = { ...paramsLocalInfo, isExit: 1 } 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 whereOther = paramsLocalInfoNotDel["$where"]
let paramsLocalInfoAgg = _.omit(paramsLocalInfoNotDel, ["$where"]) let paramsLocalInfoAgg = _.omit(paramsLocalInfoNotDel, ["$where"])
if (whereOther === "this.zuigaocaigoujia > this.xiaoshoujine") { if (whereOther === "this.zuigaocaigoujia > this.xiaoshoujine") {

4
front/src/renderer/src/views/dingdan.vue

@ -158,7 +158,7 @@ export default {
let list = [] let list = []
for (let i = 0; i < sheetData.length; i++) { for (let i = 0; i < sheetData.length; i++) {
let element = sheetData[i]; let element = sheetData[i];
let item = {} let item = { shunxu: Date.now() + i }
for (let j = 0; j < that.tableHeader.length; j++) { for (let j = 0; j < that.tableHeader.length; j++) {
let headerItem = that.tableHeader[j]; let headerItem = that.tableHeader[j];
if (headerItem.prop === "kehupinming") { if (headerItem.prop === "kehupinming") {
@ -326,7 +326,7 @@ export default {
let params = { let params = {
subType: this.dialogFrom.type, subType: this.dialogFrom.type,
url: "/api/dingdanInfo", url: "/api/dingdanInfo",
list: [{ ...this.dialogFrom.formData }] list: [{ shunxu: Date.now(), ...this.dialogFrom.formData }]
} }
await this.updateSeach(params) await this.updateSeach(params)
await setTimeout(async () => { await setTimeout(async () => {

Loading…
Cancel
Save