Commit a7dc770d by 张权

迁移完成

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