Commit a7dc770d by 张权

迁移完成

1 parent 9a996c2a
......@@ -23,8 +23,8 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$defaultStartDate = '2021-07-01'
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'mini-c6a2e5c9-3d9d-4f3c-a677-46824e5d0e87-rop' } })
Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'mini-c6a2e5c9-3d9d-4f3c-a677-46824e5d0e87-rop' } })
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'mini-efc25b5b-6eb1-4017-99b2-45cdacfcfa04-rop' } })
Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'mini-efc25b5b-6eb1-4017-99b2-45cdacfcfa04-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'd986590e-22b5-436a-b6b5-5e09138d98e2' } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'd986590e-22b5-436a-b6b5-5e09138d98e2' } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
......
......@@ -69,4 +69,13 @@ util.getExplorer = function() {
}
return browserType
}
util.debounce=(fn,timer)=> {
let timeout = null;
return function () {
clearTimeout(timeout);
timeout = setTimeout(() => {
fn.apply(this, arguments);
}, timer);
};
}
export default util
\ No newline at end of file
......@@ -100,6 +100,7 @@ import * as dayjs from 'dayjs'
import { limitPrice } from '@/common/constant'
import glsxCombiForm from '@/components/glsx-combi-form'
import qrCode from '../../components/qr-code/index.vue'
import utils from '../../util/util'
export default {
name: 'editEquity',
data() {
......@@ -417,9 +418,9 @@ export default {
optionList: [],
optionId: 'userOneid',
optionLabel: 'staffName',
changeAttr: (userOneid, targetItem)=>{
let target = targetItem.optionList.find(item =>{
return item.userOneid = userOneid
changeAttr: (userOneid,targetItem)=>{
const target = targetItem.optionList.find(item => {
return item.userOneid == userOneid
})
this.editForm.actualSalesPerson = target.staffName
},
......@@ -561,12 +562,11 @@ export default {
},
methods: {
getSalePeople(val){
getSalePeople: utils.debounce(function(val){
const params = {
staffName: val ? val.trim() : ''
// departmentId: ''
}
console.log(111)
this.$apis.ghBeforeSale.getSalesPersonApi(params).then(res => {
if(res.code==='0') {
const id = this.editFormDataOther.findIndex((item)=>{
......@@ -577,7 +577,7 @@ export default {
})
}
})
},
}),
setTableMarginLeft(subItem,subItemId){
let productW = document.querySelector('.select-product').offsetWidth
let id = -1
......@@ -634,7 +634,7 @@ export default {
},
getInfo() {
this.$apis.ghBeforeSale.getEquityApi({ contractNo: this.routeInfo.contractNo }).then(res => {
// console.log(res)
this.getSalePeople(res.actualSalesPerson)
this.editForm = {
...res
}
......@@ -716,7 +716,6 @@ export default {
packageAttr(recovery = false) {
var targetItem = this.packageList.find(item => item.packageCode == this.editForm.packageCode)
this.setInsuranceType(targetItem)
console.log(targetItem)
this.packageToPrice(recovery)
var tempObj = this.$common.utils.deepClone(this.editFormPro)
this.editRulePro = {}
......@@ -813,7 +812,6 @@ export default {
editFormData: this.$common.utils.deepClone(tempList)
})
})
console.log(this.editFormDataPro)
this.routeInfo.addOrEdit != '1' ? this.getInfo() : ''
},
getOptionsList(formName, hasAll = true, refreshSigle) {
......@@ -903,7 +901,6 @@ export default {
},
getParams() {
var params = this.$common.utils.deepClone(this.editForm)
console.log(params,66633)
// 格式化价格
if (this.editForm.vehicle.invoicePrice) {
params.vehicle.invoicePrice = (this.editForm.vehicle.invoicePrice * 100).toFixed(0)
......@@ -933,9 +930,7 @@ export default {
if (this.editForm.effectiveDate) {
params.effectiveDate = dayjs(this.editForm.effectiveDate).format('YYYY-MM-DD')
}
console.log(this.packageList, this.editForm)
var targetItem = this.packageList.find(item => item.packageCode == this.editForm.packageCode)
console.log(targetItem,8989)
params.attributeList = []
if (targetItem) {
targetItem.groupAttributeList.forEach(item => {
......@@ -1001,39 +996,40 @@ export default {
})
},
handleConfirm() {
if (this.submit) {
return true
}
this.submit = true
var list = ['Car', 'Brand', 'User', 'Pro', 'Other']
var flag = true
var errorObjList = []
for (var i = 0; i < list.length; i++) {
if (this.$refs['editFormRef' + list[i]]) {
var pRef = list[i] == 'Pro' ? this.$refs['editFormRef' + list[i]][0] : this.$refs['editFormRef' + list[i]]
pRef.$refs['editChildRef' + list[i]].validate((valid, errorObj) => {
!valid && errorObjList.push(errorObj)
flag && (flag = valid)
})
}
}
if (!flag) {
this.whereToGo(Object.keys(errorObjList[0])[0])
this.submit = false
return true
}
// if (this.submit) {
// return true
// }
// this.submit = true
// var list = ['Car', 'Brand', 'User', 'Pro', 'Other']
// var flag = true
// var errorObjList = []
// for (var i = 0; i < list.length; i++) {
// if (this.$refs['editFormRef' + list[i]]) {
// var pRef = list[i] == 'Pro' ? this.$refs['editFormRef' + list[i]][0] : this.$refs['editFormRef' + list[i]]
// pRef.$refs['editChildRef' + list[i]].validate((valid, errorObj) => {
// !valid && errorObjList.push(errorObj)
// flag && (flag = valid)
// })
// }
// }
// if (!flag) {
// this.whereToGo(Object.keys(errorObjList[0])[0])
// this.submit = false
// return true
// }
var params = this.getParams()
params.operationType = 1
if (['2', '3', '4'].includes(this.routeInfo.addOrEdit)) {
console.log(this.editForm,1122)
if (this.routeInfo.addOrEdit == '4' && this.editForm.orderStatus != 3) {
params.contractNo = ''
params.oldContractNo = this.routeInfo.contractNo
} else {
params.contractNo = this.routeInfo.contractNo
}
} else {
params.contractNo = ''
}
console.log(params)
this.$apis.ghBeforeSale.checkOrderApi({ vin: this.editForm.vehicle.vin, contractNo: this.routeInfo.contractNo || '' }).then(res => {
if (res.code == '0') {
this.updateEquity(params)
......
......@@ -554,7 +554,6 @@ export default {
contractNo: this.uploadForm.contractNo,
attachmentFile : event[1]
}
console.log(params)
this.$apis.ghBeforeSale.delImgApi(params).then(res => {
this.$message({
message: res.code == '0' ? '删除成功' : res.message,
......@@ -706,7 +705,6 @@ export default {
isSuper: this.userInfo.admin
}
const urlpara = encodeURIComponent(JSON.stringify(paraFormat))
console.log(paraFormat,888)
addOrEdit == 1 ? this.$router.push('/ghPreSale/editEquity/' + urlpara) : this.$router.push('/ghPreSale/editEquity/' + urlpara)
// addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity/' + addOrEdit + '/' + this.userInfo.admin + '/' + -1) : this.$router.push('/beforeSale/editEquity/' + addOrEdit + '/' + this.userInfo.admin + '/' + row.contractNo)
},
......@@ -797,7 +795,6 @@ export default {
this.packageList = res
this.uploadForm.contractNo = row.contractNo
this.$apis.ghBeforeSale.getAllOrderValueApi({ contractNo: row.contractNo }).then(subRes => {
console.log(subRes)
var idx = ''
this.packageList.forEach(item => {
idx = subRes.findIndex(i => i.attachmentCode == item.attachmentCode)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!