Commit 5aaf7f20 by 前端

提交部分功能代码

1 parent 7da28ed7
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.create.business.approve."
// 获取企微审批模版
export function getWorkwechatTemplate(data) {
data.method = `${path}workwechat.template`
return request(data, RequestMethods.POST)
}
// 分页查询嘀加上架列表
export function getPage(data) {
data.method = `${path}page`
return request(data, RequestMethods.POST)
}
// 驳回嘀加上架
export function reject(data) {
data.method = `${path}reject`
return request(data, RequestMethods.POST)
}
......@@ -1068,22 +1068,22 @@ export const zyVoucherStatusOpt = [
// 嘀加上架 审批类型
export const approveTypeOpt = [
{ confId: "1", confValue: "嘀加上架与销售合同" },
{ confId: "2", confValue: "嘀加上架修改" }
{ confId: 1, confValue: "嘀加上架与销售合同" },
{ confId: 2, confValue: "嘀加上架修改" }
]
// 嘀加上架 系统状态
export const systemStatusOpt = [
{ confId: "1", confValue: "运营确认" },
{ confId: "2", confValue: "已转OA" },
{ confId: "3", confValue: "完成上架更新" },
{ confId: "4", confValue: "驳回" }
{ confId: 1, confValue: "运营确认" },
{ confId: 2, confValue: "已转OA" },
{ confId: 3, confValue: "完成上架更新" },
{ confId: 4, confValue: "驳回" }
]
// 嘀加上架 审批状态
export const approveStatusOpt = [
{ confId: "1", confValue: "审批中" },
{ confId: "2", confValue: "已通过" },
{ confId: "3", confValue: "已驳回" },
{ confId: "4", confValue: "已撤销" }
{ confId: 1, confValue: "审批中" },
{ confId: 2, confValue: "已通过" },
{ confId: 3, confValue: "已驳回" },
{ confId: 4, confValue: "已撤销" }
]
......@@ -18,16 +18,14 @@
</template>
<script>
import { transferAccountsRecordUpdateStatus } from '@api/transferAccountsManage'
import {
reject
} from "@api/shelfManage.js"
export default {
name: 'RejectDialog',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
// statusObj: {
// 1: '运营驳回',
// 2: '财务驳回'
// },
infoForm: {
remark: ''
},
......@@ -77,7 +75,6 @@ export default {
mounted() {
console.log('paramsObj', this.paramsObj)
// this.dialogConfig.title = this.statusObj[this.paramsObj.status]
},
methods: {
......@@ -86,11 +83,10 @@ export default {
this.$refs.formRef.$refs[this.rejectRef].validate(valid => {
if (valid) {
var params = {}
params.remark = this.infoForm.remark
params.orderCode = this.paramsObj.orderCode
params.status = 9
params.rejectedReason = this.infoForm.remark
params.id = this.paramsObj.id
transferAccountsRecordUpdateStatus(params).then(res => {
reject(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
......
......@@ -36,11 +36,9 @@
</span>
</d2-table-header>
<d2-table ref="packageIndexTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableParams"
:table-data="tableData"
:selectable-fn="selectableFn"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<div slot="auth-button"
slot-scope="scope">
......@@ -82,6 +80,9 @@ import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import { approveTypeOpt, systemStatusOpt, approveStatusOpt } from '@/common/constants.js'
import rejectDialog from './components/common/rejectDialog.vue'
import {
getPage
} from "@api/shelfManage.js"
export default {
name: 'ShelfManage',
components: {
......@@ -137,7 +138,7 @@ export default {
optionLabel: 'confValue',
optionsName: 'approveStatusOpt'
}],
getListApi: '',
getListApi: getPage,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
......@@ -276,8 +277,22 @@ export default {
})
},
getShelfManageList() { },
beforeSearchFn() { },
handleReset() { },
beforeSearchFn() {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
handleReset() {
this.searchForm = {
businessCode: '',
workWechatApproveCode: '',
approveType: '',
systemStatus: '',
approveStatus: ''
}
this.$refs.recordTable.refreshTable(false, true)
},
// 确认 - 编辑合同
handleEditContract(row) {
......@@ -309,8 +324,30 @@ export default {
rejectDialogClose(obj) {
this[obj.attrName] = !this[obj.attrName]
if (obj.flag) {
this.$refs.recordTable.refreshTable()
this.$refs.packageIndexTable.refreshTable()
}
},
// 嘀加上架与销售合同
handleAdd() {
this.close({ tagName: '/editShelf' })
this.$router.push({
name: 'editShelf',
params: {
operate: 'add'
}
})
},
// 嘀加上架修改
handleEdit() {
this.close({ tagName: '/editShelf' })
this.$router.push({
name: 'editShelf',
params: {
operate: 'edit'
}
})
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!