dev_2022-05-11
yujialong 3 years ago
parent f4f63e54a6
commit be97ea823c
  1. 4
      src/setting.js
  2. 119
      src/utils/api.js
  3. 42
      src/views/course/AddCurriculum.vue
  4. 74
      src/views/customer/AddCustomer.vue
  5. 2
      src/views/customer/Order.vue
  6. 2
      src/views/join/index.vue
  7. 32
      src/views/order/AddOrder.vue
  8. 7
      src/views/parner/staff.vue

@ -9,9 +9,9 @@ let jumpPath = `${location.origin}/judgmentPoint`
let host = `${location.origin}:9000/` let host = `${location.origin}:9000/`
if (isDev) { if (isDev) {
jumpPath = "http://192.168.31.125:8087/"; // 本地调试-需要启动本地判分点系统 jumpPath = "http://192.168.31.125:8087/"; // 本地调试-需要启动本地判分点系统
host = 'http://39.108.250.202:9000/' // host = 'http://39.108.250.202:9000/'
// host = 'http://192.168.31.151:9000/'// 榕 // host = 'http://192.168.31.151:9000/'// 榕
// host = 'http://192.168.31.137:9000/'// 赓 host = 'http://192.168.31.137:9000/'// 赓
} else if (isPro) { } else if (isPro) {
jumpPath = "http://www.huorantech.cn/judgmentPoint/"; jumpPath = "http://www.huorantech.cn/judgmentPoint/";
} }

@ -2,14 +2,13 @@ import Setting from "@/setting";
const host = Setting.apiBaseURL const host = Setting.apiBaseURL
const uploadURL = Setting.uploadURL const uploadURL = Setting.uploadURL
const host1 = 'http://39.108.250.202:9000/'
export default { export default {
logins: `users/users/user/login`, //登录 logins: `users/users/user/login`, //登录
verification: `${host}users/users/user/captcha`,// 验证码图片 保留host verification: `${host}users/users/user/captcha`,// 验证码图片 保留host
bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`,// 绑定手机 bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`,// 绑定手机
sendPhoneOrEmailCode: `${host1}users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码 sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码
getUserRolesPermissionMenu: `users/user-role/getUserRolesPermissionMenu`, getUserRolesPermissionMenu: `users/user-role/getUserRolesPermissionMenu`,
staffTemplate: `http://www.huorantech.cn/template/%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5%E5%91%98%E5%B7%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 后台账号模板 staffTemplate: `http://www.huorantech.cn/template/%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5%E5%91%98%E5%B7%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 后台账号模板
@ -18,14 +17,14 @@ export default {
checkWorkNumOrAccount: `occupationlab/architecture/checkWorkNumOrAccount`, // 新增/编辑学生前:校验学号或者学生账号 checkWorkNumOrAccount: `occupationlab/architecture/checkWorkNumOrAccount`, // 新增/编辑学生前:校验学号或者学生账号
// 订单管理 // 订单管理
orderAdd: `${host1}nakadai/nakadai/order/add`,// 订单添加 orderAdd: `nakadai/nakadai/order/add`,// 订单添加
orderDelete: `${host1}nakadai/nakadai/order/delete`,// 删除定单 orderDelete: `nakadai/nakadai/order/delete`,// 删除定单
orderDetail: `${host1}nakadai/nakadai/order/get`,// 订单详情 orderDetail: `nakadai/nakadai/order/get`,// 订单详情
orderList: `${host1}nakadai/nakadai/order/list`,// 订单列表 orderList: `nakadai/nakadai/order/list`,// 订单列表
orderUpdate: `${host1}nakadai/nakadai/order/update`,// 订单更新 orderUpdate: `nakadai/nakadai/order/update`,// 订单更新
renew: `${host1}nakadai/nakadai/orderOther/renew`,// 续费信息管理-post renew: `nakadai/nakadai/orderOther/renew`,// 续费信息管理-post
ship: `${host1}nakadai/nakadai/orderOther/ship`,// 处理时的订单发货管理-post ship: `nakadai/nakadai/orderOther/ship`,// 处理时的订单发货管理-post
getOrderOtherTime: `${host1}nakadai/nakadai/orderOther/getOrderOtherTime`, getOrderOtherTime: `nakadai/nakadai/orderOther/getOrderOtherTime`,
queryAccountIsExist: `liuwanr/userInfo/queryServerAccountIsExist`, //查询账号是否存在 queryAccountIsExist: `liuwanr/userInfo/queryServerAccountIsExist`, //查询账号是否存在
@ -35,7 +34,7 @@ export default {
addCustomer: `nakadai/nakadai/customer/addCustomer`, addCustomer: `nakadai/nakadai/customer/addCustomer`,
queryCustomer: `nakadai/nakadai/customer/queryCustomer`, queryCustomer: `nakadai/nakadai/customer/queryCustomer`,
queryCustomerDetails: `nakadai/nakadai/customer/queryCustomerDetails`, queryCustomerDetails: `nakadai/nakadai/customer/queryCustomerDetails`,
saveOrUpdate: `${host1}data/data/role/saveOrUpdate`, saveOrUpdate: `data/data/role/saveOrUpdate`,
doAssign: `data/data/permission/doAssign`, doAssign: `data/data/permission/doAssign`,
updateCustomerByRoleId: `nakadai/nakadai/customer/updateCustomerByRoleId`, updateCustomerByRoleId: `nakadai/nakadai/customer/updateCustomerByRoleId`,
checkEmailOrPhone: `nakadai/nakadai/customer/checkEmailOrPhone`, // 新增客户前:校验手机号或者邮箱 checkEmailOrPhone: `nakadai/nakadai/customer/checkEmailOrPhone`, // 新增客户前:校验手机号或者邮箱
@ -147,14 +146,14 @@ export default {
courseProfessionalClass: `nakadai/nakadai/subject/courseProfessionalClass`, //课程专业类 courseProfessionalClass: `nakadai/nakadai/subject/courseProfessionalClass`, //课程专业类
courseProfessional: `nakadai/nakadai/subject/courseProfessional`, //课程专业 courseProfessional: `nakadai/nakadai/subject/courseProfessional`, //课程专业
//课程管理 //课程管理
curriculumList: `${host1}nakadai/nakadai/curriculum/curriculumList`, //课程列表 curriculumList: `nakadai/nakadai/curriculum/curriculumList`, //课程列表
createCurriculum: `${host1}nakadai/nakadai/curriculum/createCurriculum`, //创建课程 createCurriculum: `nakadai/nakadai/curriculum/createCurriculum`, //创建课程
curriculumDetail: `${host1}nakadai/nakadai/curriculum/curriculumDetail`, //课程详情 curriculumDetail: `nakadai/nakadai/curriculum/curriculumDetail`, //课程详情
modifyCourse: `${host1}nakadai/nakadai/curriculum/modifyCourse`, //编辑课程 modifyCourse: `nakadai/nakadai/curriculum/modifyCourse`, //编辑课程
delCourse: `${host1}nakadai/nakadai/curriculum/delCourse`, //单个、批量删除课程 delCourse: `nakadai/nakadai/curriculum/delCourse`, //单个、批量删除课程
isShelves: `${host1}nakadai/nakadai/curriculum/isShelves`, //上下架课程 isShelves: `nakadai/nakadai/curriculum/isShelves`, //上下架课程
getInternalProjectBySystemId: `occupationlab/projectManage/getInternalProjectBySystemId`, //根据系统id、项目权限获取系统内置项目 getInternalProjectBySystemId: `occupationlab/projectManage/getInternalProjectBySystemId`, //根据系统id、项目权限获取系统内置项目
checkConfig: `${host1}nakadai/nakadai/curriculum/checkConfig`, checkConfig: `nakadai/nakadai/curriculum/checkConfig`,
// 课程章节管理 // 课程章节管理
addChapter: `nakadai/curriculum/chapter/addChapter`, //添加章节 addChapter: `nakadai/curriculum/chapter/addChapter`, //添加章节
editChapter: `nakadai/curriculum/chapter/editChapter`, //修改章节 editChapter: `nakadai/curriculum/chapter/editChapter`, //修改章节
@ -195,31 +194,31 @@ export default {
downloadFiles: `liuwanr/aliyun/downloadFiles`, //下载文件 downloadFiles: `liuwanr/aliyun/downloadFiles`, //下载文件
// 数据管理 // 数据管理
getIdQueryTable: `${host1}data/data/table/getIdQueryTable`, getIdQueryTable: `data/data/table/getIdQueryTable`,
getTableByClassification: `${host1}data/data/table/getTableByClassification`, getTableByClassification: `data/data/table/getTableByClassification`,
getTableByCondition: `${host1}data/data/table/getTableByCondition`, getTableByCondition: `data/data/table/getTableByCondition`,
originalList: `${host1}data/data/table/originalList`, originalList: `data/data/table/originalList`,
originalListById: `${host1}data/data/table/originalListById`, originalListById: `data/data/table/originalListById`,
saveCategory: `${host1}data/data/table/saveCategory`, saveCategory: `data/data/table/saveCategory`,
saveTable: `${host1}data/data/table/saveTable`, saveTable: `data/data/table/saveTable`,
updateCategory: `${host1}data/data/table/updateCategory`, updateCategory: `data/data/table/updateCategory`,
deleteCategory: `${host1}data/data/table/deleteCategory`, deleteCategory: `data/data/table/deleteCategory`,
deleteTable: `${host1}data/data/table/deleteTable`, deleteTable: `data/data/table/deleteTable`,
previewData: `${host1}data/data/preview`, previewData: `data/data/preview`,
staticPreview: `${host1}data/data/staticPreview`, staticPreview: `data/data/staticPreview`,
editTableName: `${host1}data/data/table/editTableName`, editTableName: `data/data/table/editTableName`,
updateTableCommit: `${host1}data/data/updateTableCommit`, updateTableCommit: `data/data/updateTableCommit`,
getLevel: `${host1}data/category/getLevel`, getLevel: `data/category/getLevel`,
getAllTableInfoByCategoryId: `${host1}data/data/product/getAllTableInfoByCategoryId`, getAllTableInfoByCategoryId: `data/data/product/getAllTableInfoByCategoryId`,
// 产品管理 // 产品管理
deleteProduct: `${host1}data/data/product/delete`, deleteProduct: `data/data/product/delete`,
findById: `${host1}data/data/product/findById`, findById: `data/data/product/findById`,
listByEntity: `${host1}data/data/product/listByEntity`, listByEntity: `data/data/product/listByEntity`,
saveProduct: `${host1}data/data/product/save`, saveProduct: `data/data/product/save`,
updateProduct: `${host1}data/data/product/update`, updateProduct: `data/data/product/update`,
saveRecord: `${host1}data/data/dataRecord/saveRecord`, saveRecord: `data/data/dataRecord/saveRecord`,
getAllTableIdBycategoryId: `${host1}data/data/product/getAllTableIdBycategoryId`, getAllTableIdBycategoryId: `data/data/product/getAllTableIdBycategoryId`,
// 关键词 // 关键词
addKeyword: `data/keyword/addKeyword`, addKeyword: `data/keyword/addKeyword`,
@ -240,13 +239,13 @@ export default {
exportFailure: `${host}nakadai/backstageStaff/exportFailure`, exportFailure: `${host}nakadai/backstageStaff/exportFailure`,
// 角色管理 // 角色管理
batchRemove: `${host1}users/role/batchRemove`, //批量删除角色 batchRemove: `users/role/batchRemove`, //批量删除角色
checkRoleIsExist: `${host1}users/role/checkRoleIsExist`, //判断该角色是否存在 checkRoleIsExist: `users/role/checkRoleIsExist`, //判断该角色是否存在
delRoleByAccountId: `${host1}users/role/delRoleByAccountId`, //删除某用户下的某个角色 delRoleByAccountId: `users/role/delRoleByAccountId`, //删除某用户下的某个角色
roleList: `${host1}users/role/list`, //角色分页列表查询 roleList: `users/role/list`, //角色分页列表查询
obtainDetails: `${host1}users/role/obtainDetails`, //获取角色详情 obtainDetails: `users/role/obtainDetails`, //获取角色详情
saveOrUpdate: `${host1}users/role/saveOrUpdate`, //新增或更新角色 saveOrUpdate: `users/role/saveOrUpdate`, //新增或更新角色
queryAllMenus: `${host1}users/users/permission/queryAllMenus`, //查询所有菜单 queryAllMenus: `users/users/permission/queryAllMenus`, //查询所有菜单
// 日志管理 // 日志管理
logAdd: `nakadai/log/add`, logAdd: `nakadai/log/add`,
@ -259,16 +258,16 @@ export default {
logWithdrawal: `nakadai/log/logWithdrawal`, logWithdrawal: `nakadai/log/logWithdrawal`,
// 合伙人 // 合伙人
deleteParner: `${host1}nakadai/partnerClassification/delete`, deleteParner: `nakadai/partnerClassification/delete`,
saveParner: `${host1}nakadai/partnerClassification/save`, saveParner: `nakadai/partnerClassification/save`,
listParner: `${host1}nakadai/partnerClassification/treeList`, listParner: `nakadai/partnerClassification/treeList`,
updateParner: `${host1}nakadai/partnerClassification/update`, updateParner: `nakadai/partnerClassification/update`,
delPartnerAccount: `${host1}nakadai/partnerAccount/delPartnerAccount`, delPartnerAccount: `nakadai/partnerAccount/delPartnerAccount`,
modifyPartnerAccount: `${host1}nakadai/partnerAccount/modifyPartnerAccount`, modifyPartnerAccount: `nakadai/partnerAccount/modifyPartnerAccount`,
partnerAccountDetail: `${host1}nakadai/partnerAccount/partnerAccountDetail`, partnerAccountDetail: `nakadai/partnerAccount/partnerAccountDetail`,
partnerAccountList: `${host1}nakadai/partnerAccount/partnerAccountList`, partnerAccountList: `nakadai/partnerAccount/partnerAccountList`,
savePartnerAccount: `${host1}nakadai/partnerAccount/savePartnerAccount`, savePartnerAccount: `nakadai/partnerAccount/savePartnerAccount`,
generateInvitationCode: `${host1}nakadai/partnerAccount/generateInvitationCode`, generateInvitationCode: `nakadai/partnerAccount/generateInvitationCode`,
generationQrCode: `${host1}nakadai/partnerAccount/generationQrCode `, generationQrCode: `nakadai/partnerAccount/generationQrCode `,
}; };

@ -127,6 +127,32 @@
</div> </div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="小程序图标" prop="miniProgramPictureAddress">
<el-upload
class="avatar-uploader"
accept=".jpg,.png,.jpeg"
:on-remove="handleRemoveMini"
:on-error="uploadError"
:on-success="uploadSuccessMini"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:action="this.api.fileupload"
:headers="headers"
name="file"
>
<img v-if="form.miniProgramPictureAddress" :src="form.miniProgramPictureAddress" class="avatar">
<div class="uploader-default" v-else>
<i class="el-icon-plus"></i>
<p>上传封面</p>
</div>
<div slot="tip" class="el-upload__tip">
<p>只能上传jpg/png文件</p>
<p>课程封面图将按1:1显示最佳分辨率80*80</p>
</div>
</el-upload>
</el-form-item>
<el-form-item label="课程简介" prop="briefIntroduction"> <el-form-item label="课程简介" prop="briefIntroduction">
<el-input type="textarea" :autosize="{ minRows: 4 }" placeholder="请输入课程简介" <el-input type="textarea" :autosize="{ minRows: 4 }" placeholder="请输入课程简介"
v-model.trim="form.briefIntroduction"></el-input> v-model.trim="form.briefIntroduction"></el-input>
@ -302,6 +328,7 @@ export default {
professionalCategoryId: "", professionalCategoryId: "",
professionalId: "", professionalId: "",
coverUrl: "", coverUrl: "",
miniProgramPictureAddress: '',
expectedCourse: "", expectedCourse: "",
marketPrice: "", marketPrice: "",
briefIntroduction: "", briefIntroduction: "",
@ -453,6 +480,7 @@ export default {
} }
this.$nextTick(() => { this.$nextTick(() => {
this.form = data; this.form = data;
data.miniProgramPictureAddress || this.$set(this.form, 'miniProgramPictureAddress', '')
this.practiceData = data.practiceConfig; this.practiceData = data.practiceConfig;
this.assessmentData = data.assessmentConfig; this.assessmentData = data.assessmentConfig;
}); });
@ -525,13 +553,23 @@ export default {
return this.$confirm(`确定移除 ${file.name}`); return this.$confirm(`确定移除 ${file.name}`);
}, },
handleRemove(file, fileList) { // handleRemove(file, fileList) { //
let fileName = this.form.coverUrl.replace("https://liuwanr.oss-cn-shenzhen.aliyuncs.com/", ""); this.$del(`${this.api.fileDeletion}?keys=${this.form.coverUrl}`).then(res => {
this.$del(`${this.api.fileDeletion}?keys=${fileName}`).then(res => {
this.form.coverUrl = ""; this.form.coverUrl = "";
}).catch(err => { }).catch(err => {
}); });
}, },
uploadSuccessMini(res, file, fileList) { //
this.form.miniProgramPictureAddress = res.data.filesResult.fileUrl;
},
handleRemoveMini(file, fileList) { //
this.$del(`${this.api.fileDeletion}?keys=${this.form.miniProgramPictureAddress}`).then(res => {
this.form.miniProgramPictureAddress = "";
}).catch(err => {
});
},
handleConfig(type) { // handleConfig(type) { //
this.permissions = type; this.permissions = type;
this.configVisible = true; this.configVisible = true;

@ -2,7 +2,7 @@
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="mgb20">
<div class="flex-between"> <div class="flex-between">
<div class="per_title" v-preventReClick @click="goback()"> <div class="per_title" v-preventReClick @click="goback(0)">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school" v-text="isDetail ? '查看客户信息' : (customerId ? '编辑客户信息' : '新增客户信息')"></span> <span class="per_school" v-text="isDetail ? '查看客户信息' : (customerId ? '编辑客户信息' : '新增客户信息')"></span>
@ -77,7 +77,7 @@
</el-col> </el-col>
</el-form> </el-form>
<div v-if="!isDetail" style="margin-top: 20px;text-align: center"> <div v-if="!isDetail" style="margin-top: 20px;text-align: center">
<el-button type="primary" v-preventReClick @click="saveAdd('form')">确定</el-button> <el-button type="primary" v-preventReClick @click="saveAdd">确定</el-button>
<el-button v-preventReClick @click="$router.back()">取消</el-button> <el-button v-preventReClick @click="$router.back()">取消</el-button>
</div> </div>
</div> </div>
@ -477,10 +477,18 @@ export default {
NoAdd: true, NoAdd: true,
phoneRepeat: false, phoneRepeat: false,
emailRepeat: false, emailRepeat: false,
submiting: false // submiting: false, //
updateTime: 0
}; };
}, },
watch: { watch: {
// ,
form: {
handler(){
this.updateTime++
},
deep:true
},
'form2.keyword': function(val) { 'form2.keyword': function(val) {
clearTimeout(this.searchTimer) clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
@ -739,13 +747,20 @@ export default {
this.$router.push(`/bmOrder?businessManagerId=${row.businessManagerId}&customerId=${this.customerId}&customerName=${this.form.customerName}&userName=${row.userName}`) this.$router.push(`/bmOrder?businessManagerId=${row.businessManagerId}&customerId=${this.customerId}&customerName=${this.form.customerName}&userName=${row.userName}`)
}, },
tabChange(index) { // tab
tabChange(index, to) {
// tab
if (this.curTab === 'tab1' && !to) {
this.goback(index)
} else {
this.curTab = index this.curTab = index
this.$router.push(`addcustomer?id=${this.customerId}&type=${index}`) this.$router.push(`addcustomer?id=${this.customerId}&type=${index}`)
this.pageProduct = 1 this.pageProduct = 1
this.pageOrder = 1 this.pageOrder = 1
this.pageBm = 1 this.pageBm = 1
index === 'tab3' && this.handlePageOrder() index === 'tab3' && this.handlePageOrder()
this.updateTime = this.form.customerId ? 1 : 0
}
}, },
// //
getCityData(){ getCityData(){
@ -859,8 +874,8 @@ export default {
}); });
} }
}, },
saveAdd(formName){ saveAdd(tab){
this.$refs[formName].validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
if (this.submiting) return false if (this.submiting) return false
if (this.phoneRepeat) { if (this.phoneRepeat) {
@ -900,34 +915,22 @@ export default {
} }
if(this.customerId){ if(this.customerId){
this.$post(this.api.updateCustomer,data).then((res) => { this.$post(this.api.updateCustomer,data).then((res) => {
setTimeout(() => {
this.submiting = false
}, 1500)
this.$message.success('编辑成功') this.$message.success('编辑成功')
this.goback() tab ? this.tabChange(tab, 1) : this.backPage()
}).catch((res) => { }).catch((res) => {
this.submiting = false this.submiting = false
}) })
}else{ }else{
this.$post(this.api.addCustomer,data).then((res) => { this.$post(this.api.addCustomer,data).then((res) => {
let customerId = res.customerId setTimeout(() => {
this.submiting = false
}, 1500)
this.$store.commit('schoolIdData',{schoolId: this.form.schoolId}) this.$store.commit('schoolIdData',{schoolId: this.form.schoolId})
// this.$post(this.api.saveOrUpdate,{
// clientId: 0,
// id: '',
// roleName: '',
// remark: '',
// isPort: 2
// }).then(res => {
// let roleId = res.roleId
// let perData = {
// roleId,
// permissionId: ["1408370117262635009","1409351488911056897","1409351867862228993","1408370186435096578","1409352518310699009","1409352550615228418","1409352584240963585","1409352623344459778","1409352647054860289","1409352682471563266","1409352720786530305","1409352742290726913","1408370244584927233","1409352872662278146","1409352903574298626","1409352923509825538","1409352940068937730","1409353018443702273"],
// isPort: 2
// }
// this.$post(this.api.doAssign,perData).then(res => {}).catch(res => {})
// this.$post(`${this.api.updateCustomerByRoleId}?customerId=${customerId}&roleId=${roleId}`).then(res => {}).catch(res => {})
// }).catch(res => {})
this.$message.success('添加成功') this.$message.success('添加成功')
this.goback() tab ? this.tabChange(tab, 1) : this.backPage()
}).catch((res) => { }).catch((res) => {
this.submiting = false this.submiting = false
}) })
@ -954,9 +957,24 @@ export default {
}else{ }else{
window.open(`https://view.officeapps.live.com/op/view.aspx?src=${this.fileSrc}`) window.open(`https://view.officeapps.live.com/op/view.aspx?src=${this.fileSrc}`)
} }
}, },
goback(){ goback(i) {
const id = this.form.customerId
const updateTime = this.updateTime
//
if ((id && updateTime > 1) || (!id && updateTime)) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
this.saveAdd(i)
}).catch(() => {
i ? this.tabChange(i, 1) : this.backPage()
})
} else {
this.tabChange(i, 1)
}
},
backPage(){
this.$router.push(`customer?page=${this.$store.state.customerPage}`) this.$router.push(`customer?page=${this.$store.state.customerPage}`)
} }
} }

@ -30,7 +30,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="productName" label="产品内容" align="center"></el-table-column> <el-table-column prop="productName" label="产品内容" align="center"></el-table-column>
<el-table-column prop="totalAmount" label="订单金额(元)" align="center"> <el-table-column prop="orderAmount" label="订单金额(元)" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="订单日期" align="center"> <el-table-column prop="createTime" label="订单日期" align="center">
</el-table-column> </el-table-column>

@ -61,7 +61,7 @@ export default {
{ required: true, message: '请输入手机号', trigger: 'blur' } { required: true, message: '请输入手机号', trigger: 'blur' }
], ],
code: [ code: [
{ required: util.isMobile(), message: "请输入验证码", trigger: 'blur' } { required: true, message: "请输入验证码", trigger: 'blur' }
] ]
}, },
phoneDisabled: false, phoneDisabled: false,

@ -1058,7 +1058,6 @@ export default {
}, },
// //
backToOrder(val) { backToOrder(val) {
console.log(val)
this.showSelectClient = !this.showSelectClient; this.showSelectClient = !this.showSelectClient;
if (val.customerId) { if (val.customerId) {
this.form.customerName = val.customerName; this.form.customerName = val.customerName;
@ -1341,12 +1340,14 @@ export default {
// //
calculateDiscountCourse(val, row) { calculateDiscountCourse(val, row) {
const { finalPrice, marketValue } = row const { finalPrice, marketValue } = row
if (finalPrice) row.discountRate = marketValue == 0 ? '0%' : (finalPrice / marketValue * 100).toFixed(2) + "%"; // (-)÷ x100%
if (finalPrice) row.discountRate = marketValue == 0 ? '0%' : ((marketValue - finalPrice) / marketValue * 100).toFixed(2) + "%";
}, },
// //
calculateDiscount(val, row) { calculateDiscount(val, row) {
const { finalValue, marketValue } = row const { finalValue, marketValue } = row
if (finalValue) row.discountRate = marketValue == 0 ? '0%' : (finalValue / marketValue * 100).toFixed(2) + "%"; // (-)÷ x100%
if (finalValue) row.discountRate = marketValue == 0 ? '0%' : ((marketValue - finalValue) / marketValue * 100).toFixed(2) + "%";
}, },
// //
contractTimeChange(val) { contractTimeChange(val) {
@ -1367,19 +1368,27 @@ export default {
dealFinalValue(val, row) { dealFinalValue(val, row) {
const { periodOfUse, options, accountNum, finalPrice } = row const { periodOfUse, options, accountNum, finalPrice } = row
if (periodOfUse && accountNum && finalPrice) { if (periodOfUse && accountNum && finalPrice) {
row.finalValue = (finalPrice / accountNum / periodOfUse * (!options ? row.finalValue = (finalPrice / accountNum / periodOfUse).toFixed(2)
365 :
options === 1 ?
12 :
1)).toFixed(2)
this.calculateDiscount(val, row) this.calculateDiscount(val, row)
} }
}, },
// **// // **//
dealComputers(e, row) { dealComputers(e, row) {
const { finalValue, accountNum, periodOfUse, options } = row const { finalValue, accountNum, periodOfUse, finalPrice } = row
if (finalValue && accountNum) { if (periodOfUse) {
if (accountNum) {
// =**
if (finalValue) {
row.finalPrice = Math.round(finalValue * periodOfUse * accountNum) row.finalPrice = Math.round(finalValue * periodOfUse * accountNum)
} else if (!finalValue && finalPrice) {
// =//
row.finalValue = (finalPrice / periodOfUse / accountNum).toFixed(2)
this.calculateDiscount(e, row)
}
} else if (finalValue && finalValue) {
// =//
row.accountNum = Math.floor(finalPrice / periodOfUse / finalValue)
}
} }
this.dealSettlePrice(row) this.dealSettlePrice(row)
this.allAmount(e, row) this.allAmount(e, row)
@ -1388,6 +1397,7 @@ export default {
dealSettlePrice(row) { dealSettlePrice(row) {
const unit = row.options // 使 const unit = row.options // 使
const useUnit = row.periodOfUse // 使 const useUnit = row.periodOfUse // 使
if (this.form.orderType !== 2) {
let sPrice = '' let sPrice = ''
if (row.settlementMethod == 0) { if (row.settlementMethod == 0) {
// **/**(1) // **/**(1)
@ -1404,6 +1414,7 @@ export default {
sPrice = (row.finalPrice * row.businessProportion / 100).toFixed(2) sPrice = (row.finalPrice * row.businessProportion / 100).toFixed(2)
} }
row.settlementPrice = this.handleNaN(sPrice) row.settlementPrice = this.handleNaN(sPrice)
}
}, },
// 使 // 使
deadLine(e,row,options, isDate) { deadLine(e,row,options, isDate) {
@ -1439,6 +1450,7 @@ export default {
price * useUnit)).toFixed(2) price * useUnit)).toFixed(2)
this.dealComputers(e, row) this.dealComputers(e, row)
row.authority ? this.calculateDiscountCourse(e, row) : this.calculateDiscount(e, row)
// +1 // +1
if (isDate) { if (isDate) {
const cId = row.dataOrCourseId const cId = row.dataOrCourseId

@ -408,8 +408,6 @@ export default {
}, },
// //
add() { add() {
const { orgList } = this
if (orgList.length) {
const curNode = this.$refs.orgTree.getCurrentNode() const curNode = this.$refs.orgTree.getCurrentNode()
if (curNode && curNode.isTeam) { if (curNode && curNode.isTeam) {
util.warningMsg('请选择分类添加城市合伙人!') util.warningMsg('请选择分类添加城市合伙人!')
@ -421,7 +419,7 @@ export default {
this.expireTime = `${date.getFullYear()}-${util.preZero(date.getMonth() + 1)}-${util.preZero(date.getDate())} ${util.preZero(date.getHours())}:${util.preZero(date.getMinutes())}:${util.preZero(date.getMinutes())}` this.expireTime = `${date.getFullYear()}-${util.preZero(date.getMonth() + 1)}-${util.preZero(date.getDate())} ${util.preZero(date.getHours())}:${util.preZero(date.getMinutes())}:${util.preZero(date.getMinutes())}`
this.parnerVisible = true this.parnerVisible = true
const cur = this.$refs.orgTree.getCurrentKey() const cur = this.$refs.orgTree.getCurrentKey()
const link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : '/nakadai'}/#/join?accountId=${accountId}&id=${cur ? cur: this.orgList[0].id}` const link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : '/nakadai'}/#/join?accountId=${accountId}&id=${cur || ''}`
// //
this.link = link this.link = link
@ -432,9 +430,6 @@ export default {
}).catch(res => {}) }).catch(res => {})
}).catch(res => {}) }).catch(res => {})
} }
} else {
util.errorMsg('请添加分类!')
}
}, },
// //
copy(e) { copy(e) {

Loading…
Cancel
Save