Commit 5b27bd48 by zhangxw

Merge branch 'SAAS+V5.1.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into SAAS+V5.1.0
2 parents 873a74b9 bfd5a6d9
Showing 35 changed files with 1434 additions and 371 deletions
...@@ -57,3 +57,42 @@ export function isexistdata(data) { ...@@ -57,3 +57,42 @@ export function isexistdata(data) {
params: data params: data
}) })
} }
// 下载历史推送报表
export function downloadPushFile(data) {
return axios({
url: baseConfig.axios4.baseURL + "/reportExport/downloadPushFile",
method: RequestMethods.GET,
params: data
})
}
// 推送报表
export function pushMessageAndExcle(data) {
return axios({
url: baseConfig.axios4.baseURL + "/reportExport/pushMessageAndExcle",
method: RequestMethods.GET,
params: data
})
}
// 推送记录
export function queryPushRecord(data) {
return axios({
url: baseConfig.axios4.baseURL + "/reportExport/queryPushRecord",
method: RequestMethods.GET,
params: data
})
}
// 导入更新
export function importExcel(formData) {
// data.method = `${path}nbcb.acc.detail.excel.import`
// return request(data, "post", ["file"])
return axios({
url: baseConfig.axios4.baseURL + "/reportExport/importExcel",
method: RequestMethods.POST,
data: formData,
transformRequest: [(data) => data] // 关键:直接返回原始数据,不进行 stringify
})
}
...@@ -130,6 +130,12 @@ export function orderDeliveryUpdate(data) { ...@@ -130,6 +130,12 @@ export function orderDeliveryUpdate(data) {
return request(data, "post") return request(data, "post")
} }
// 发货签收单
export function deliveryPdf(data) {
data.method = "dj.api.smarcarlife.warehousedeliver.detail.pdf"
return request(data, "post")
}
// 发货单 - 发货签收单 // 发货单 - 发货签收单
// export function orderDeliverySign(data) { // export function orderDeliverySign(data) {
// data.method = "dj.api.smarcarlife.purchaseOrder.delivery.sign" // data.method = "dj.api.smarcarlife.purchaseOrder.delivery.sign"
......
...@@ -234,6 +234,12 @@ export function getResidentListApi(data) { ...@@ -234,6 +234,12 @@ export function getResidentListApi(data) {
return request(data, "post") return request(data, "post")
} }
// 分页查询园区店员工列表(可增加特殊门店列表)
export function getEmployee(data) {
data.method = `dj.api.employee.yq.page`
return request(data, "post")
}
// 导入员工修订工资 // 导入员工修订工资
export function importStaffSalaryApi(data) { export function importStaffSalaryApi(data) {
data.method = `${path2}staffMonthSalary.staffSalary.import` data.method = `${path2}staffMonthSalary.staffSalary.import`
...@@ -592,3 +598,8 @@ export function addBatchPermissions(data) { ...@@ -592,3 +598,8 @@ export function addBatchPermissions(data) {
data.method = `dj.api.smartcarlife.qdhc.staff.permissions.batch.authorization` data.method = `dj.api.smartcarlife.qdhc.staff.permissions.batch.authorization`
return request(data, "post") return request(data, "post")
} }
// 前店后厂-手机号用户权限列表(员工)
export function getPermissionsByPhone(data) {
data.method = `dj.api.smartcarlife.qdhc.staff.permissions`
return request(data, "post")
}
...@@ -33,11 +33,15 @@ export function deleteParentMerchant(data) { ...@@ -33,11 +33,15 @@ export function deleteParentMerchant(data) {
return request(data, "post") return request(data, "post")
} }
// 获取园区店列表 // // 获取园区店列表
export function getYqMerchantConfig(data) { export function getYqMerchantConfig(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.page` data.method = `dj.api.smarcarlife.yqMerchantConfig.page`
return request(data, "GET") return request(data, "GET")
} }
export function getYqMerchantinfoPage(data) {
data.method = `dj.api.smarcarlife.yqMerchantInfo.page`
return request(data, "GET")
}
// 获取园区店列表-获取园区店配置项 // 获取园区店列表-获取园区店配置项
export function GETYQMERCHANTCONFIGDETAIL(data) { export function GETYQMERCHANTCONFIGDETAIL(data) {
...@@ -120,12 +124,12 @@ export function searchServiceMerchant(data) { ...@@ -120,12 +124,12 @@ export function searchServiceMerchant(data) {
return request(data, "post") return request(data, "post")
} }
/**根据4s店商户号查找员工设备列表 */ /** 根据4s店商户号查找员工设备列表 */
export function getMerchantEmployeeList(data) { export function getMerchantEmployeeList(data) {
data.method = "dj.api.mindworkplate.badge.findPhoneListByShopMerchantNo" data.method = "dj.api.mindworkplate.badge.findPhoneListByShopMerchantNo"
return request(data, "post") return request(data, "post")
} }
/**获取阿里云token */ /** 获取阿里云token */
export function getAliOSSToken(data = {}) { export function getAliOSSToken(data = {}) {
data.method = "dj.api.mindworkplate.badge.getToken" data.method = "dj.api.mindworkplate.badge.getToken"
return request(data, "post") return request(data, "post")
...@@ -141,3 +145,33 @@ export function setDefaultPaymentChannel(data) { ...@@ -141,3 +145,33 @@ export function setDefaultPaymentChannel(data) {
data.method = "dj.api.serviceMerchant.setDefaultPaymentChannel" data.method = "dj.api.serviceMerchant.setDefaultPaymentChannel"
return request(data, "post") return request(data, "post")
} }
/** 园区店上架-详情 */
export function yqMerchantInfoDetail(data) {
data.method = "dj.api.smartcarlife.yqMerchantInfo.detail"
return request(data, "post")
}
/** 园区店上架-责任人 */
export function glskStaffPage(data) {
data.method = "dj.api.smarcarlife.yqMerchantInfo.glsk.staff.page"
return request(data, "post")
}
/** 园区店上架-主体 */
export function serviceMerchantPage(data) {
data.method = "dj.api.smarcarlife.yqMerchantInfo.service.merchant.page"
return request(data, "post")
}
/** 园区店上架-上架信息提交 */
export function yqMerchantInfoCommit(data) {
data.method = "dj.api.smartcarlife.yqMerchantInfo.commit"
return request(data, "post")
}
/** 园区店上架-上架历史记录 */
export function yqMerchantInfoHistory(data) {
data.method = "dj.api.smartcarlife.yqMerchantInfo.history"
return request(data, "post")
}
...@@ -866,7 +866,8 @@ export const downloadReportManage_reportType = [ ...@@ -866,7 +866,8 @@ export const downloadReportManage_reportType = [
{ {
confId: "technicianConstructionOrder", confId: "technicianConstructionOrder",
confValue: "轻改技师施工单月度汇总表" confValue: "轻改技师施工单月度汇总表"
} },
{ confId: "yqMerchantGrossProfitReport", confValue: "园区店毛利报表" }
] ]
// 下载报表 业务类型 // 下载报表 业务类型
...@@ -1481,3 +1482,43 @@ export const scheduling_inviteStatus = [ ...@@ -1481,3 +1482,43 @@ export const scheduling_inviteStatus = [
{ confId: 6, confValue: "已撤销" }, { confId: 6, confValue: "已撤销" },
{ confId: 7, confValue: "已支付" } { confId: 7, confValue: "已支付" }
] ]
// 园区店管理-上架-费用类别计算方式
export const severSelectOptions = [
{
expenseCategoryCalculateType: 1,
label: "按收入比例"
},
{
expenseCategoryCalculateType: 2,
label: "按毛利比例"
},
{
expenseCategoryCalculateType: 3,
label: "按固定金额"
},
{
expenseCategoryCalculateType: 4,
label: "按固定金额*购买数量"
},
{
expenseCategoryCalculateType: 5,
label: "按园区店总金额比例"
},
{
expenseCategoryCalculateType: 6,
label: "按园区店毛利(不扣除产品成本)比例"
},
{
expenseCategoryCalculateType: 7,
label: "按园区店毛利比例"
},
{
expenseCategoryCalculateType: 8,
label: "按(收入-自定义其他费用)比例"
},
{
expenseCategoryCalculateType: 9,
label: "按(收入-其他费用)比例"
}
]
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
:option-config="item.optionConfig" :option-config="item.optionConfig"
:base-data="baseData" :base-data="baseData"
@handleTableHeadChange="handleTableHeadChange" /> @handleTableHeadChange="handleTableHeadChange" />
<img v-if="item.headerImgObj" :src="require('@/assets/icon-edit2.png')" style="cursor: pointer;margin-left: 5px;width: 16px;height: 16px; vertical-align: middle;" @click="handleHeaderBatch(item)" />
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<slot v-if="item.addHtml" <slot v-if="item.addHtml"
...@@ -343,6 +344,12 @@ export default { ...@@ -343,6 +344,12 @@ export default {
}, },
methods: { methods: {
// 表头加图标
handleHeaderBatch(currentItem) {
if (currentItem.headerImgObj.fn) {
currentItem.headerImgObj.fn(currentItem)
}
},
// 排序 // 排序
sortChange({ column, prop, order }) { sortChange({ column, prop, order }) {
this.sortColum = order ? prop : "" this.sortColum = order ? prop : ""
......
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
.el-dialog__footer { .el-dialog__footer {
border-top: 1px solid #e5e5e5 !important; border-top: 1px solid #e5e5e5 !important;
.el-button { .el-button {
width: 70px; width: 80px;
} }
} }
} }
......
...@@ -305,6 +305,32 @@ export const routerName = { ...@@ -305,6 +305,32 @@ export const routerName = {
parentId: "90608", parentId: "90608",
label: "场景入口", label: "场景入口",
handle: "handleSceneEntry" handle: "handleSceneEntry"
},
{
authId: "9060805",
parentId: "90608",
label: "上架",
handle: "handleLaunch",
addRoutePath: [
{
authId: "906080501",
name: "上架",
parentId: "90608"
}
]
},
{
authId: "9060806",
parentId: "90608",
label: "上架记录",
handle: "handleLaunchRecord",
addRoutePath: [
{
authId: "906080601",
name: "上架记录",
parentId: "90608"
}
]
} }
], ],
component: _import("systemConfig/yqStoreManage/yqStoreManage") component: _import("systemConfig/yqStoreManage/yqStoreManage")
...@@ -321,6 +347,30 @@ export const routerName = { ...@@ -321,6 +347,30 @@ export const routerName = {
}, },
component: _import("systemConfig/yqStoreConfig") component: _import("systemConfig/yqStoreConfig")
}, },
906080501: {
path: "/editLaunch",
name: "editLaunch",
meta: {
title: "上架",
authId: "906080501",
parentId: "90608",
cache: false,
activePath: "/editLaunch"
},
component: _import("systemConfig/yqStoreManage/editLaunch")
},
906080601: {
path: "/launchRecord",
name: "launchRecord",
meta: {
title: "上架记录",
authId: "906080601",
parentId: "90608",
cache: false,
activePath: "/launchRecord"
},
component: _import("systemConfig/yqStoreManage/launchRecord")
},
90610: { 90610: {
path: "/accountList_new", path: "/accountList_new",
...@@ -1339,6 +1389,18 @@ export const routerName = { ...@@ -1339,6 +1389,18 @@ export const routerName = {
parentId: "90630", parentId: "90630",
label: "自定义周期", label: "自定义周期",
handle: "handleCustomize" handle: "handleCustomize"
},
{
authId: "9063004",
parentId: "90630",
label: "导入更新",
handle: "handleImport"
},
{
authId: "9063005",
parentId: "90630",
label: "推送",
handle: "handlePush"
} }
], ],
component: _import("systemConfig/downloadReportManage/index") component: _import("systemConfig/downloadReportManage/index")
......
...@@ -928,6 +928,7 @@ export default { ...@@ -928,6 +928,7 @@ export default {
// 上传文件,转码为base64 // 上传文件,转码为base64
importFile(e) { importFile(e) {
console.log('e', e)
const size = e.target.files[0].size / 1024 / 1024 const size = e.target.files[0].size / 1024 / 1024
if (size < 10) { if (size < 10) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name) this.$set(this.fileForm, 'fileName', e.target.files[0].name)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="edit-order-dialog" v-if="dialogShow"> <div class="edit-order-dialog" v-if="dialogShow">
<div class="table-class"> <div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" @refreshTable="refreshTable" :table-data="tableList" :table-total="detailInfo.tableTotal"> <d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" @refreshTable="refreshTable" :table-data="tableList" :table-total="detailInfo.tableTotal">
<div slot="nowPurNum" slot-scope="scope"> <div slot="nowPurNum" slot-scope="scope" style="margin: 0 8px;">
<el-select v-model="nowPurNumList[scope.index]" placeholder="请选择" clearable> <el-select v-model="nowPurNumList[scope.index]" placeholder="请选择" clearable>
<el-option v-for="item in staffList" :key="item.uuid" :label="item.staffName" :value="item.uuid"> <el-option v-for="item in staffList" :key="item.uuid" :label="item.staffName" :value="item.uuid">
</el-option> </el-option>
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
</el-tooltip> </el-tooltip>
<div v-else>-</div> <div v-else>-</div>
</template> </template>
<template slot="deliveryRemark" slot-scope="scope"> <div slot="deliveryRemark" slot-scope="scope" style="margin: 0 8px;">
<el-input v-model="scope.scope.deliveryRemark" maxlength="50" placeholder="请输入"></el-input> <el-input v-model="scope.scope.deliveryRemark" maxlength="50" placeholder="请输入"></el-input>
</template> </div>
</d2-table> </d2-table>
</div> </div>
<div class="footer"> <div class="footer">
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
</div> </div>
</baseDialog> </baseDialog>
<card-dialog v-if="cardVisible" :card-visible="cardVisible" :order-info="orderInfo" :selected-list="selectedCardList" @handleClose="handleCardDialog" @handleConfirm="handleCardConfirm"></card-dialog> <card-dialog v-if="cardVisible" :card-visible="cardVisible" :order-info="orderInfo" :selected-list="selectedCardList" @handleClose="handleCardDialog" @handleConfirm="handleCardConfirm"></card-dialog>
<glsk-form-dialog v-if="batchVisible" :selectVisible="batchVisible" :dialogConfig="batchDialogConfig" label-width="200px" :formRules="batchRules" :editData="batchForm" :editFormData="batchEditFormData" :baseData="{ staffList: staffList }" @handleClose="batchDialogVisible" @handleConfirm="handleBatchConfirm"></glsk-form-dialog>
</div> </div>
</template> </template>
...@@ -91,6 +92,26 @@ export default { ...@@ -91,6 +92,26 @@ export default {
width: '1300px' width: '1300px'
} }
}, },
// 发货分配弹窗
batchDialogConfig: {
title: '批量设置发货方',
okText: '确定'
},
batchVisible: false,
batchForm: {
consignor: ''
},
batchRules: {
consignor: [{ required: true, message: '请选择发货方', trigger: 'change' }]
},
batchEditFormData: [{
name: 'consignor',
label: '发货方',
type: 'select',
optionId: 'uuid',
optionLabel: 'staffName',
optionsName: 'staffList'
}],
isSubmit: false, isSubmit: false,
dialogData: {}, dialogData: {},
deliveryCardList: [], deliveryCardList: [],
...@@ -169,7 +190,13 @@ export default { ...@@ -169,7 +190,13 @@ export default {
label: '发货方', label: '发货方',
prop: '', prop: '',
width: 150, width: 150,
addHtml: 'nowPurNum' addHtml: 'nowPurNum',
headerImgObj: {
imgUrl: 'icon-edit2.png',
fn: () => {
this.batchDialogVisible()
}
}
}, },
{ {
label: '发货备注', label: '发货备注',
...@@ -196,6 +223,20 @@ export default { ...@@ -196,6 +223,20 @@ export default {
this.getStaffList() this.getStaffList()
}, },
methods: { methods: {
batchDialogVisible() {
this.batchVisible = !this.batchVisible
this.batchForm.consignor = ''
},
handleBatchConfirm() {
this.tableList.forEach((item, idx) => {
this.nowPurNumList[idx] = this.batchForm.consignor
})
// this.nowPurNumList.forEach((item, idx) => {
// this.nowPurNumList[idx] = this.batchForm.consignor
// })
this.batchDialogVisible()
},
getStaffList() { getStaffList() {
getShipperList({}).then(res => { getShipperList({}).then(res => {
this.staffList = res this.staffList = res
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> --> </div> -->
<div class="table-class"> <div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" :table-data="tableList"> <d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" :has-page="hasPage" :table-data="tableList">
<div slot="nowPurNum" slot-scope="scope"> <div slot="nowPurNum" slot-scope="scope" style="margin: 0 8px;">
<!-- 未退货才可以 --> <!-- 未退货才可以 -->
<div v-if=" <div v-if="
(tableList[scope.index].purchaseNumber == 0 || (tableList[scope.index].purchaseNumber == 0 ||
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
}} }}
</div> </div>
</div> </div>
<div slot="cardNum" slot-scope="scope"> <div slot="cardNum" slot-scope="scope" style="margin: 0 8px;">
<div v-if="tableList[scope.index].entityCardFlag != 'Y' || (tableList[scope.index].shipperUuid && tableList[scope.index].shipperUuid != userInfo.detail.uuid)"> <div v-if="tableList[scope.index].entityCardFlag != 'Y' || (tableList[scope.index].shipperUuid && tableList[scope.index].shipperUuid != userInfo.detail.uuid)">
- -
</div> </div>
...@@ -311,6 +311,7 @@ export default { ...@@ -311,6 +311,7 @@ export default {
{ {
label: "已发货数量", label: "已发货数量",
prop: "purchaseNumber", prop: "purchaseNumber",
width: 120,
formatter: (cellValue) => { formatter: (cellValue) => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType) return baseConfig.membraneTypeList.includes(cellValue.goodsType)
? `${cellValue.purchaseNumber || 0}卷` ? `${cellValue.purchaseNumber || 0}卷`
...@@ -320,11 +321,13 @@ export default { ...@@ -320,11 +321,13 @@ export default {
{ {
label: "本次发货数量", label: "本次发货数量",
prop: "", prop: "",
width: 124,
addHtml: "nowPurNum" addHtml: "nowPurNum"
}, },
{ {
label: "发货卡号", label: "发货卡号",
prop: "", prop: "",
width: 122,
addHtml: "cardNum" addHtml: "cardNum"
} }
] ]
......
<!-- 发货单详情弹窗 --> <!-- 发货单详情弹窗 -->
<template> <template>
<div> <div>
<d2-dialog title="详细信息" :is-visible="detailVisible" class="stockMonthDailog" width="70%" :no-cancel="true" btn-ok-label="关闭" @closeDialog="handleClose" @confirmDialog="handleClose"> <d2-dialog title="详细信息" :is-visible="detailVisible" class="stockMonthDailog" width="1400px" :no-cancel="true" btn-ok-label="关闭" @closeDialog="handleClose" @confirmDialog="handleClose">
<div class="detail-info"> <div class="detail-info">
<div> <div>
发货单号: 发货单号:
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
</div> </div>
</div> </div>
<div slot="reference"> <div slot="reference">
<!-- <img style="width: 14px;height: 13px;" src="./images/merchant_icon.png"> -->
<span style="color: #2A58AD;">(…{{ scope.scope.filmRollList.length }})</span> <span style="color: #2A58AD;">(…{{ scope.scope.filmRollList.length }})</span>
</div> </div>
</el-popover> </el-popover>
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
<span class="phone">电话:<span class="label">{{ detailInfo[0].contactPhone }}</span></span> <span class="phone">电话:<span class="label">{{ detailInfo[0].contactPhone }}</span></span>
<span class="address">收货地址:<span class="label">{{ detailInfo[0].contactAddress }}</span></span> <span class="address">收货地址:<span class="label">{{ detailInfo[0].contactAddress }}</span></span>
</div> </div>
<div class="address-info" v-if="detailInfo[0]"> <!-- <div class="address-info" v-if="detailInfo[0]">
<span class="address">备注:<span class="label">{{ detailInfo[0].purchaseOrderRemark }}</span></span> <span class="address">备注:<span class="label">{{ detailInfo[0].purchaseOrderRemark }}</span></span>
</div> </div> -->
<div v-for="(itemList, index) in detailInfo" :key="index"> <div v-for="(itemList, index) in detailInfo" :key="index">
<div class="detail-info"> <div class="detail-info">
<div style="width: 319px;"> <div style="width: 319px;">
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</div> </div>
<div> <div>
<el-button v-if="itemList.putStatus == 0" type="text" @click="handleEdit(itemList)">编辑</el-button> <el-button v-if="itemList.putStatus == 0" type="text" @click="handleEdit(itemList)">编辑</el-button>
<el-button type="text" @click="handleExport(itemList)">发货签收单</el-button> <el-button type="text" @click="handleSign(itemList)">发货签收单</el-button>
</div> </div>
</div> </div>
<d2-table ref="recordTable" :table-data="itemList.deliveryDetailList" :table-params="tableParams" :has-page="false"> <d2-table ref="recordTable" :table-data="itemList.deliveryDetailList" :table-params="tableParams" :has-page="false">
...@@ -135,6 +135,13 @@ export default { ...@@ -135,6 +135,13 @@ export default {
} }
}, },
{ {
label: '备注',
prop: '',
formatter: cellValue => {
return ((cellValue.deliveryRemark || '') + (cellValue.purchaseOrderRemark || '')) || '-'
}
},
{
label: '发货卡号', label: '发货卡号',
prop: 'deliveryCardList', prop: 'deliveryCardList',
addHtml: 'deliveryCard' addHtml: 'deliveryCard'
...@@ -250,8 +257,11 @@ export default { ...@@ -250,8 +257,11 @@ export default {
}, },
handleEdit(targetItem) { handleEdit(targetItem) {
this.editData = {} this.editData = {
this.editData.id = targetItem.id id: targetItem.id,
deliveryNumber: targetItem.deliveryNumber,
deliveryCompany: targetItem.deliveryCompany
}
this.editDialogVisible() this.editDialogVisible()
}, },
...@@ -266,6 +276,15 @@ export default { ...@@ -266,6 +276,15 @@ export default {
this.loading = false this.loading = false
}) })
}, },
handleSign(row) {
const params = {
id: row.orderDeliveryId
}
deliveryPdf(params).then((res) => {
console.log(res)
this.$open(res)
})
},
handleClose() { handleClose() {
// this.$emit('dialogClose') // this.$emit('dialogClose')
......
<template> <template>
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" <baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" @closeDialog="handleDetailClose">
@closeDialog="handleDetailClose">
<div class="detail-content" v-if="dialogShow"> <div class="detail-content" v-if="dialogShow">
<div class="addressTitle"> <div class="addressTitle">
<img src="../images/addressIcon.webp" alt="" class="icon"> <img src="../images/addressIcon.webp" alt="" class="icon">
...@@ -18,8 +17,7 @@ ...@@ -18,8 +17,7 @@
<span class="address">结束发货说明:<span class="label">{{ detailInfo.terminateDeliveryInstruction }}</span></span> <span class="address">结束发货说明:<span class="label">{{ detailInfo.terminateDeliveryInstruction }}</span></span>
</div> </div>
<div class="table-class"> <div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" @refreshTable="refreshTable" <d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" @refreshTable="refreshTable" :table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
:table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
<template slot="upgradeGoodsName" slot-scope="scope"> <template slot="upgradeGoodsName" slot-scope="scope">
<div> <div>
<img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt=""> <img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt="">
...@@ -65,16 +63,14 @@ ...@@ -65,16 +63,14 @@
<div class="record-div"> <div class="record-div">
<div class="record-div-d" v-for="(item, index) in detailInfo.auditDetaiList" :key="index"> <div class="record-div-d" v-for="(item, index) in detailInfo.auditDetaiList" :key="index">
<span class="dot"></span> <span class="dot"></span>
<span class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</span><span <span class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</span><span class="span-txt-two">
class="span-txt-two">
<span :class="item.status ? examineStatusClass[item.status] : ''"> <span :class="item.status ? examineStatusClass[item.status] : ''">
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span> {{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span>
</span> </span>
<span class="span-txt-two">审核人:{{ item.reviewedBy }}</span> <span class="span-txt-two">审核人:{{ item.reviewedBy }}</span>
<span class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</span> <span class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</span>
<span v-if="item.remark" class="span-txt-two">备注: <span v-if="item.remark" class="span-txt-two">备注:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" <el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="right">
placement="right">
<el-button type="text"> <el-button type="text">
{{ item.remark ? (item.remark.length > 15 ? (item.remark.slice(0, 15) + '...') : item.remark) : '' }} {{ item.remark ? (item.remark.length > 15 ? (item.remark.slice(0, 15) + '...') : item.remark) : '' }}
</el-button> </el-button>
...@@ -243,7 +239,7 @@ export default { ...@@ -243,7 +239,7 @@ export default {
dynamicParams() { dynamicParams() {
console.log(this.paramsObj.purchaseType) console.log(this.paramsObj.purchaseType)
if (this.paramsObj.purchaseType == 1) { // if (this.paramsObj.purchaseType == 1) {
this.tableParams.tableColumns.push( this.tableParams.tableColumns.push(
{ {
label: '已发货数量', label: '已发货数量',
...@@ -262,22 +258,22 @@ export default { ...@@ -262,22 +258,22 @@ export default {
} }
} }
) )
} else { // } else {
this.tableParams.tableColumns.push( // this.tableParams.tableColumns.push(
{ // {
label: '入库仓库', // label: '入库仓库',
prop: 'putYqMerchantName', // prop: 'putYqMerchantName',
width: 100, // width: 100,
line: 1 // line: 1
}, // },
{ // {
label: '入库门店', // label: '入库门店',
prop: 'putMerchantName', // prop: 'putMerchantName',
width: 100, // width: 100,
line: 1 // line: 1
} // }
) // )
} // }
if (this.paramsObj.factoryType) { if (this.paramsObj.factoryType) {
this.tableParams.tableColumns = this.tableParams.tableColumns.filter(item => item.prop != 'goodsTotalPrice') this.tableParams.tableColumns = this.tableParams.tableColumns.filter(item => item.prop != 'goodsTotalPrice')
} }
...@@ -358,7 +354,7 @@ export default { ...@@ -358,7 +354,7 @@ export default {
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
>span { > span {
margin-right: 20px; margin-right: 20px;
margin-bottom: 10px; margin-bottom: 10px;
} }
...@@ -378,7 +374,7 @@ export default { ...@@ -378,7 +374,7 @@ export default {
.title { .title {
font-weight: 500; font-weight: 500;
color: #3A3A3A; color: #3a3a3a;
margin-bottom: 8px; margin-bottom: 8px;
} }
} }
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</div> </div>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<!-- 查看 --> <!-- 查看 -->
<span style="margin-right: 10px;" v-if="scope.scope.deliveryStatus != 1"> <span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9090701']" /> <auth-button :data="scope.scope" :show-btn-ids="['9090701']" />
</span> </span>
<!-- 确认发货 --> <!-- 确认发货 -->
...@@ -398,6 +398,24 @@ export default { ...@@ -398,6 +398,24 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.tableSearchForm = deepClone(this.searchForm) this.tableSearchForm = deepClone(this.searchForm)
var selectedData = this.$refs?.purchaseAndDeliveryTable?.mutiSelectArr[this.tableParams.mutiSelectName] || []
const list = this.$refs.purchaseAndDeliveryTable.data || []
let deleteIds = []
this.selectedList.forEach(item => {
if (!list?.map(k => k.id).includes(item.id) && !selectedData?.map(k => k.id).includes(item.id)) {
selectedData.push(item)
}
if (list?.map(k => k.id).includes(item.id) && !selectedData?.map(k => k.id).includes(item.id)) {
deleteIds.push(item.id)
}
})
deleteIds.forEach(item => {
const idx = selectedData.findIndex(k => k.id == item)
if (idx !== -1) {
selectedData.splice(idx, 1)
}
})
this.selectedList = deepClone(selectedData)
resolve() resolve()
}) })
}, },
...@@ -427,7 +445,7 @@ export default { ...@@ -427,7 +445,7 @@ export default {
// delete params[key] // delete params[key]
// } // }
// } // }
params.method = 'dj.api.smarcarlife.warehousedeliver.export.async ' params.method = 'dj.api.smarcarlife.warehousedeliver.export.async'
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
{ {
...@@ -441,7 +459,10 @@ export default { ...@@ -441,7 +459,10 @@ export default {
}, },
editClose(isRefresh) { editClose(isRefresh) {
this.handleEditClose() this.handleEditClose()
isRefresh && this.$refs.purchaseAndDeliveryTable.refreshTable() if (isRefresh) {
this.clearMutiSelect = true
this.$refs.purchaseAndDeliveryTable.refreshTable(isRefresh)
}
}, },
handleEditClose() { handleEditClose() {
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
...@@ -481,11 +502,17 @@ export default { ...@@ -481,11 +502,17 @@ export default {
setTableFinishFun(data) { setTableFinishFun(data) {
this.$nextTick(() => { this.$nextTick(() => {
this.tableData = data this.tableData = data
if (this.clearMutiSelect) {
this.selectedList = []
this.clearMutiSelect = false
this.$refs.purchaseAndDeliveryTable.$refs[this.tableParams.mutiSelectName + "MutiTable"].clearSelection()
}
this.recoverySelection(data)
}) })
}, },
handleSelectionTable(val) { handleSelectionTable(val) {
this.selectedList = val // this.selectedList = val
console.log(this.selectedList, 'selectedList') // console.log(this.selectedList, 'selectedList')
}, },
// 确认发货 // 确认发货
handleDelivery(row) { handleDelivery(row) {
...@@ -502,8 +529,37 @@ export default { ...@@ -502,8 +529,37 @@ export default {
this.editVisible = true this.editVisible = true
}) })
}, },
recoverySelection(list) {
if (this.selectedList.length) {
this.selectedList.forEach(row => {
const obj = this.$refs.purchaseAndDeliveryTable.data.find(item => item.id == row.id)
obj && this.$refs.purchaseAndDeliveryTable.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(obj, true)
})
}
},
getMutiDate() {
console.log(this.$refs.purchaseAndDeliveryTable)
var selectedData = this.$refs.purchaseAndDeliveryTable.mutiSelectArr[this.tableParams.mutiSelectName]
let deleteIds = []
this.selectedList.forEach(item => {
if (!this.$refs.purchaseAndDeliveryTable.data.map(k => k.id).includes(item.id) && !selectedData.map(k => k.id).includes(item.id)) {
selectedData.push(item)
}
if (selectedData?.map(k => k.id).includes(item.id) && !selectedData?.map(k => k.id).includes(item.id)) {
deleteIds.push(item.id)
}
})
deleteIds.forEach(item => {
const idx = selectedData.findIndex(k => k.id == item)
if (idx !== -1) {
selectedData.splice(idx, 1)
}
})
return selectedData
},
// 批量发货 // 批量发货
handleBatchDelivery() { handleBatchDelivery() {
this.selectedList = this.getMutiDate()
if (this.selectedList.length == 0) { if (this.selectedList.length == 0) {
this.notice.errorTips('请选择要发货的订单') this.notice.errorTips('请选择要发货的订单')
return return
......
...@@ -18,9 +18,12 @@ ...@@ -18,9 +18,12 @@
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn"> <d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn">
<el-tooltip slot="orderCode" slot-scope="scope" effect="dark" placement="top" :content="scope.columnsObj.formatter(scope.scope)"> <div slot="orderCode" slot-scope="scope">
<el-tooltip v-if="scope.scope.orderCode.split(',').length > 1" effect="dark" placement="top" :content="scope.columnsObj.formatter(scope.scope)">
<span class="one-line-ellipsis">{{ scope.columnsObj.formatter(scope.scope) }}</span> <span class="one-line-ellipsis">{{ scope.columnsObj.formatter(scope.scope) }}</span>
</el-tooltip> </el-tooltip>
<div v-else>{{ scope.columnsObj.formatter(scope.scope) }}</div>
</div>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<!-- 查看 --> <!-- 查看 -->
<span style="margin-right: 10px"> <span style="margin-right: 10px">
...@@ -31,7 +34,7 @@ ...@@ -31,7 +34,7 @@
<auth-button :data="scope.scope" :show-btn-ids="['9090504']" /> <auth-button :data="scope.scope" :show-btn-ids="['9090504']" />
</span> </span>
<!-- 撤销 --> <!-- 撤销 -->
<span v-if="scope.scope.putStatus == 0" style="margin-right: 10px"> <span v-if="[0, 1].includes(scope.scope.putStatus)" style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9090503']" /> <auth-button :data="scope.scope" :show-btn-ids="['9090503']" />
</span> </span>
<!-- 发货签收单 --> <!-- 发货签收单 -->
...@@ -52,7 +55,7 @@ ...@@ -52,7 +55,7 @@
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { purchaseOrderDeliveryPage, purchaseOrderDeliveryWithdraw, orderDeliveryUpdate } from '@/api/purchaseShopping.js' import { purchaseOrderDeliveryPage, purchaseOrderDeliveryWithdraw, orderDeliveryUpdate, deliveryPdf } from '@/api/purchaseShopping.js'
import deliveryDetailDialog from './components/deliveryDetailDialog' import deliveryDetailDialog from './components/deliveryDetailDialog'
import { invouceType } from '@/common/constants.js' import { invouceType } from '@/common/constants.js'
export default { export default {
...@@ -308,8 +311,11 @@ export default { ...@@ -308,8 +311,11 @@ export default {
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
}, },
handleEdit(row) { handleEdit(row) {
this.editData = {} this.editData = {
this.editData.id = row.id id: row.id,
deliveryNumber: row.deliveryNumber,
deliveryCompany: row.deliveryCompany
}
this.editDialogVisible() this.editDialogVisible()
}, },
handleEditConfirm() { handleEditConfirm() {
...@@ -326,7 +332,7 @@ export default { ...@@ -326,7 +332,7 @@ export default {
const params = { const params = {
id: row.id id: row.id
} }
exportTable(params).then((res) => { deliveryPdf(params).then((res) => {
console.log(res) console.log(res)
this.$open(res) this.$open(res)
}) })
......
...@@ -75,6 +75,9 @@ ...@@ -75,6 +75,9 @@
<el-input type="textarea" placeholder="请输入驳回原因" maxlength="50" :rows="3" show-word-limit v-model.trim="rejectData.rejectCause" class="dis-in-block reject-input" /> <el-input type="textarea" placeholder="请输入驳回原因" maxlength="50" :rows="3" show-word-limit v-model.trim="rejectData.rejectCause" class="dis-in-block reject-input" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<p style="margin-left: 150px; color: #999999;">
说明:驳回后,整个采购订单进行驳回,无法再重新进行发货操作。
</p>
</div> </div>
<!-- <div class="footer"> <!-- <div class="footer">
<el-button @click="handleRejectClose">取消</el-button> <el-button @click="handleRejectClose">取消</el-button>
...@@ -92,8 +95,8 @@ ...@@ -92,8 +95,8 @@
<el-input type="textarea" placeholder="请输入备注信息" maxlength="200" :rows="3" show-word-limit v-model.trim="terminateDelivery.terminateDeliveryInstruction" class="dis-in-block reject-input" /> <el-input type="textarea" placeholder="请输入备注信息" maxlength="200" :rows="3" show-word-limit v-model.trim="terminateDelivery.terminateDeliveryInstruction" class="dis-in-block reject-input" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<p style="margin-left: 150px"> <p style="margin-left: 150px; color: #999999;">
说明:结束发货后,订单发货完结,无法再重新进行发货操作。是否确定结束发货 说明:结束发货后,整个采购订单发货完结,无法再重新进行发货操作。
</p> </p>
</div> </div>
<!-- <div class="footer"> <!-- <div class="footer">
...@@ -155,7 +158,7 @@ export default { ...@@ -155,7 +158,7 @@ export default {
// ] // ]
}, },
config: { config: {
title: "驳回提示", title: "驳回",
width: "750px" width: "750px"
} }
}, },
...@@ -366,7 +369,11 @@ export default { ...@@ -366,7 +369,11 @@ export default {
}, },
{ {
label: "已发货数量", label: "已发货数量",
prop: "purchaseNumber" width: 100,
prop: "purchaseNumber",
formatter: (cellValue) => {
return cellValue.purchaseNumber
}
}, },
{ {
label: "采购总价", label: "采购总价",
...@@ -492,7 +499,16 @@ export default { ...@@ -492,7 +499,16 @@ export default {
}, },
{ {
label: "分配状态", label: "分配状态",
prop: "distributionStatus" prop: "distributionStatus",
formatter: (cellValue) => {
return cellValue.distributionStatus != null ? this.baseData.distributionStatusOptions.find(item => item.id == cellValue.distributionStatus)?.label : '--'
},
className: (cellValue) => {
return {
0: "ashSpot",
1: "greenSpot"
}[cellValue.distributionStatus]
}
}, },
{ {
label: "发货方", label: "发货方",
...@@ -583,6 +599,24 @@ export default { ...@@ -583,6 +599,24 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
var selectedData = this.$refs?.purchaseAndDeliveryTable?.mutiSelectArr[this.tableParams.mutiSelectName] || []
const list = this.$refs.purchaseAndDeliveryTable.data || []
let deleteIds = []
this.selectedList.forEach(item => {
if (!list?.map(k => k.id).includes(item.id) && !selectedData?.map(k => k.id).includes(item.id)) {
selectedData.push(item)
}
if (list?.map(k => k.id).includes(item.id) && !selectedData?.map(k => k.id).includes(item.id)) {
deleteIds.push(item.id)
}
})
deleteIds.forEach(item => {
const idx = selectedData.findIndex(k => k.id == item)
if (idx !== -1) {
selectedData.splice(idx, 1)
}
})
this.selectedList = deepClone(selectedData)
this.filterSearchTime() this.filterSearchTime()
resolve() resolve()
}) })
...@@ -647,7 +681,10 @@ export default { ...@@ -647,7 +681,10 @@ export default {
}, },
editClose(isRefresh) { editClose(isRefresh) {
this.handleDetailClose() this.handleDetailClose()
isRefresh && this.$refs.purchaseAndDeliveryTable.refreshTable() if (isRefresh) {
this.clearMutiSelect = true
this.$refs.purchaseAndDeliveryTable.refreshTable(isRefresh)
}
}, },
handleDetailClose() { handleDetailClose() {
this.editVisible = !this.editVisible this.editVisible = !this.editVisible
...@@ -678,6 +715,7 @@ export default { ...@@ -678,6 +715,7 @@ export default {
}, },
// 批量分配 // 批量分配
handleBatchAllocat() { handleBatchAllocat() {
this.selectedList = this.getMutiDate()
if (this.selectedList.length == 0) { if (this.selectedList.length == 0) {
this.notice.errorTips('请选择要发货的订单') this.notice.errorTips('请选择要发货的订单')
return true return true
...@@ -696,12 +734,15 @@ export default { ...@@ -696,12 +734,15 @@ export default {
}, },
allocateClose(isRefresh) { allocateClose(isRefresh) {
this.handleAllocateClose() this.handleAllocateClose()
isRefresh && this.$refs.purchaseAndDeliveryTable.refreshTable() if (isRefresh) {
this.clearMutiSelect = true
this.$refs.purchaseAndDeliveryTable.refreshTable(isRefresh)
}
}, },
handleAllocateClose() { handleAllocateClose() {
this.allocateVisible = !this.allocateVisible this.allocateVisible = !this.allocateVisible
}, },
// recoverySelection(list) { recoverySelection(list) {
// var exitIds = this.selectedList.map((item) => item.id) // var exitIds = this.selectedList.map((item) => item.id)
// console.log(exitIds) // console.log(exitIds)
// list.forEach((item) => { // list.forEach((item) => {
...@@ -712,11 +753,44 @@ export default { ...@@ -712,11 +753,44 @@ export default {
// true // true
// ) // )
// }) // })
// }, if (this.selectedList.length) {
this.selectedList.forEach(row => {
const obj = this.$refs.purchaseAndDeliveryTable.data.find(item => item.id == row.id)
obj && this.$refs.purchaseAndDeliveryTable.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(obj, true)
})
}
},
getMutiDate() {
console.log(this.$refs.purchaseAndDeliveryTable)
var selectedData = this.$refs.purchaseAndDeliveryTable.mutiSelectArr[this.tableParams.mutiSelectName]
let deleteIds = []
this.selectedList.forEach(item => {
if (!this.$refs.purchaseAndDeliveryTable.data.map(k => k.id).includes(item.id) && !selectedData.map(k => k.id).includes(item.id)) {
selectedData.push(item)
}
if (selectedData?.map(k => k.id).includes(item.id) && !selectedData?.map(k => k.id).includes(item.id)) {
deleteIds.push(item.id)
}
})
deleteIds.forEach(item => {
const idx = selectedData.findIndex(k => k.id == item)
if (idx !== -1) {
selectedData.splice(idx, 1)
}
})
return selectedData
},
setTableFinishFun(data) { setTableFinishFun(data) {
this.$nextTick(() => { this.$nextTick(() => {
this.tableData = data this.tableData = data
// this.recoverySelection(data) if (this.clearMutiSelect) {
this.selectedList = []
this.clearMutiSelect = false
this.$refs.purchaseAndDeliveryTable.$refs[this.tableParams.mutiSelectName + "MutiTable"].clearSelection()
}
this.recoverySelection(data)
}) })
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
...@@ -724,7 +798,7 @@ export default { ...@@ -724,7 +798,7 @@ export default {
}, },
handleSelectionTable(val) { handleSelectionTable(val) {
this.selectedList = val // this.selectedList = val
// console.log(val) // console.log(val)
// var list = val // var list = val
// const currentSelectIds = val.map(item => item.id) // const currentSelectIds = val.map(item => item.id)
...@@ -742,7 +816,7 @@ export default { ...@@ -742,7 +816,7 @@ export default {
// } // }
// }) // })
// this.selectedList = list // this.selectedList = list
console.log(this.selectedList, 'selectedList') // console.log(this.selectedList, 'selectedList')
}, },
// 确认发货 // 确认发货
handleDelivery(row) { handleDelivery(row) {
...@@ -757,6 +831,7 @@ export default { ...@@ -757,6 +831,7 @@ export default {
// 批量发货 // 批量发货
handleBatchDelivery() { handleBatchDelivery() {
// console.log(this.$refs.purchaseAndDeliveryTable.mutiSelectArr.deliveryList) // console.log(this.$refs.purchaseAndDeliveryTable.mutiSelectArr.deliveryList)
this.selectedList = this.getMutiDate()
if (this.selectedList.length == 0) { if (this.selectedList.length == 0) {
this.notice.errorTips('请选择要发货的订单') this.notice.errorTips('请选择要发货的订单')
return return
......
<!-- 权限管理 --> <!-- 权限管理 -->
<template> <template>
<d2-dialog title="权限管理" :is-visible="isShow" class="accountDailog" @closeDialog="handleClose" width="850px" <d2-dialog title="权限管理" :is-visible="isShow" class="accountDailog" @closeDialog="handleClose" width="600px"
@confirmDialog="handleAddConfirm"> @confirmDialog="handleAddConfirm">
<div class="content"> <div class="content">
<el-form ref="form" :model="form" :rules="rules" label-suffix=":" label-width="140px"> <el-form ref="form" :model="form" :rules="rules" label-suffix=":" label-width="140px">
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
<el-select multiple collapse-tags v-model="form.staffIds" value-key="id" filterable remote reserve-keyword <el-select multiple collapse-tags v-model="form.staffIds" value-key="id" filterable remote reserve-keyword
placeholder="请选择员工(多选)" style="width: 350px" :remote-method="remoteMethod" @change="changeOpt" placeholder="请选择员工(多选)" style="width: 350px" :remote-method="remoteMethod" @change="changeOpt"
:loading="loading"> :loading="loading">
<el-option v-for="(item, index) in options" :key="item.id" :label="item.staffName" :value="item"> <el-option class="option" v-for="(item, index) in options" :key="item.id" :label="item.staffName"
:value="item">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
</template> </template>
<script> <script>
import { getResidentListApi, getPermissionsList, addBatchPermissions } from "@api/resident" import { getResidentListApi, getPermissionsList, addBatchPermissions, getEmployee } from "@api/resident"
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { merchantClassifyList } from '@/common/constants' import { merchantClassifyList } from '@/common/constants'
export default { export default {
...@@ -33,35 +34,35 @@ export default { ...@@ -33,35 +34,35 @@ export default {
return { return {
merchantClassifyList, merchantClassifyList,
optionsSelectList: [ optionsSelectList: [
{ // {
name: "预约客户", // name: "预约客户",
code: 'YUYUEKEHU' // code: 'YUYUEKEHU'
}, // },
{ // {
// 创建施工单 CHUANGJIANSHIGONGDAN // // 创建施工单 CHUANGJIANSHIGONGDAN
name: "创建施工单", // name: "创建施工单",
code: "CHUANGJIANSHIGONGDAN" // code: "CHUANGJIANSHIGONGDAN"
}, // },
// 施工确认 SHIGONGQUEREN // // 施工确认 SHIGONGQUEREN
{ // {
name: "施工确认", // name: "施工确认",
code: "SHIGONGQUEREN" // code: "SHIGONGQUEREN"
}, // },
// 物料出库 WULIAOCHUKU // // 物料出库 WULIAOCHUKU
{ // {
name: "物料出库", // name: "物料出库",
code: "WULIAOCHUKU" // code: "WULIAOCHUKU"
}, // },
// 完成施工 WANCHENGSHIGONG // // 完成施工 WANCHENGSHIGONG
{ // {
name: "完成施工", // name: "完成施工",
code: "WANCHENGSHIGONG" // code: "WANCHENGSHIGONG"
}, // },
// 审核施工单 SHENHESHIGONGDAN // // 审核施工单 SHENHESHIGONGDAN
{ // {
name: "审核施工单", // name: "审核施工单",
code: "SHENHESHIGONGDAN" // code: "SHENHESHIGONGDAN"
} // }
], ],
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
...@@ -117,14 +118,14 @@ export default { ...@@ -117,14 +118,14 @@ export default {
getPermissionsList({ getPermissionsList({
}).then(res => { }).then(res => {
console.log(res, 'getPermissionsList') console.log(res, 'getPermissionsList')
this.optionsSelectList = res.list this.optionsSelectList = res
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
}) })
}, },
getResidentList() { getResidentList() {
getResidentListApi({ getEmployee({
pageSize: 10, pageSize: 20,
currentPage: 1 currentPage: 1
}).then(res => { }).then(res => {
console.log(res) console.log(res)
...@@ -141,14 +142,14 @@ export default { ...@@ -141,14 +142,14 @@ export default {
this.form.checkList.forEach(item => { this.form.checkList.forEach(item => {
acc.push({ acc.push({
staffPhone: cur.staffPhone, staffPhone: cur.staffPhone,
permissionId: JSON.parse(item).code permissionId: JSON.parse(item).id
}) })
}) })
return acc return acc
}, []) }, [])
var params = { var params = {
private: 1, type: 1,
list relations: list
} }
addBatchPermissions(params).then(res => { addBatchPermissions(params).then(res => {
this.notice.okTips('新增成功') this.notice.okTips('新增成功')
...@@ -175,8 +176,8 @@ export default { ...@@ -175,8 +176,8 @@ export default {
this.loading = true this.loading = true
setTimeout(() => { setTimeout(() => {
this.loading = false this.loading = false
var params = { currentPage: 1, pageSize: 100, staffName: queryString, } var params = { currentPage: 1, pageSize: 100, staffName: queryString }
getResidentListApi(params).then(res => { getEmployee(params).then(res => {
const list = this.form.staffIds || [] const list = this.form.staffIds || []
const options = [...list, ...res.list || []] const options = [...list, ...res.list || []]
// // 对数据对象去重过滤 // // 对数据对象去重过滤
...@@ -275,4 +276,8 @@ export default { ...@@ -275,4 +276,8 @@ export default {
font-size: 12px; font-size: 12px;
color: #666666; color: #666666;
} }
.option {
width: 26%;
}
</style> </style>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<span> <span>
<el-checkbox-group v-model="checkList"> <el-checkbox-group v-model="checkList">
<el-checkbox v-for="(item, index) in optionsSelectList" :label="JSON.stringify(item)" :key="index" <el-checkbox v-for="(item, index) in optionsSelectList" :label="JSON.stringify(item)" :key="index"
:value="item" @change="(checked) => handleSingleChange(checked, item)">{{ item.name }}</el-checkbox> :value="item">{{ item.name }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</span> </span>
</div> </div>
...@@ -456,6 +456,7 @@ ...@@ -456,6 +456,7 @@
</template> </template>
<script> <script>
import { limitPrice } from "@/common/format" import { limitPrice } from "@/common/format"
import dayjs from "dayjs" import dayjs from "dayjs"
import allocateStoreDialog from "./allocateStoreDialog.vue" import allocateStoreDialog from "./allocateStoreDialog.vue"
...@@ -472,7 +473,10 @@ import { ...@@ -472,7 +473,10 @@ import {
merchantListByYqMerchantApi, merchantListByYqMerchantApi,
addStaffDailyReportConfigApi, addStaffDailyReportConfigApi,
updateStaffDailyReportConfigApi, updateStaffDailyReportConfigApi,
deleteStaffDailyReportConfigApi deleteStaffDailyReportConfigApi,
addBatchPermissions,
getPermissionsList,
getPermissionsByPhone
} from "@api/resident" } from "@api/resident"
import { isEmpty, filterStr } from "../util.js" import { isEmpty, filterStr } from "../util.js"
export default { export default {
...@@ -492,36 +496,35 @@ export default { ...@@ -492,36 +496,35 @@ export default {
isEmpty, isEmpty,
staffSceneLabelList: staffSceneLabelList, staffSceneLabelList: staffSceneLabelList,
optionsSelectList: [ optionsSelectList: [
{ // {
name: "预约客户", // name: "预约客户",
code: 'YUYUEKEHU' // code: 'YUYUEKEHU'
}, // },
{ // {
// 创建施工单 CHUANGJIANSHIGONGDAN // // 创建施工单 CHUANGJIANSHIGONGDAN
name: "创建施工单", // name: "创建施工单",
code: "CHUANGJIANSHIGONGDAN" // code: "CHUANGJIANSHIGONGDAN"
}, // },
// 施工确认 SHIGONGQUEREN // // 施工确认 SHIGONGQUEREN
{ // {
name: "施工确认", // name: "施工确认",
code: "SHIGONGQUEREN" // code: "SHIGONGQUEREN"
}, // },
// 物料出库 WULIAOCHUKU // // 物料出库 WULIAOCHUKU
{ // {
name: "物料出库", // name: "物料出库",
code: "WULIAOCHUKU" // code: "WULIAOCHUKU"
}, // },
// 完成施工 WANCHENGSHIGONG // // 完成施工 WANCHENGSHIGONG
{ // {
name: "完成施工", // name: "完成施工",
code: "WANCHENGSHIGONG" // code: "WANCHENGSHIGONG"
}, // },
// 审核施工单 SHENHESHIGONGDAN // // 审核施工单 SHENHESHIGONGDAN
{ // {
name: "审核施工单", // name: "审核施工单",
code: "SHENHESHIGONGDAN" // code: "SHENHESHIGONGDAN"
} // }
], ],
info: {}, info: {},
checkList: [], checkList: [],
...@@ -735,33 +738,92 @@ export default { ...@@ -735,33 +738,92 @@ export default {
this.jobTypeList = this.externalLevelList this.jobTypeList = this.externalLevelList
this.tempjobTypeList = this.tempExternalLevelList this.tempjobTypeList = this.tempExternalLevelList
} }
// this.getPermissionsList() this.getPermissionsList()
this.getPermissionsByPhone()
}, },
methods: { methods: {
getPermissionsByPhone() {
console.log(this.queryData.staffPhone, 'this.queryData.staffPhone')
getPermissionsByPhone({
phone: this.queryData.staffPhone
}).then(res => {
console.log(res, 'getPermissionsByPhone')
this.checkList = res.map(item => {
const checkded = {
id: item.id,
code: item.code,
name: item.name
}
return JSON.stringify(checkded);
})
}).catch((err) => {
console.log(err)
})
},
handleSingleChange(checked, item) { handleSingleChange(checked, item) {
if (checked) { // console.log(item, checked, 'handleSingleChange')
console.log('勾选了:', item) const params = {
this.onItemSelected(item) type: 2
} else { }
console.log('取消勾选了:', item) let relations = this.checkList.reduce((acc, cur) => {
this.onItemDeselected(item) acc.push({
} staffPhone: this.queryData.staffPhone,
permissionId: JSON.parse(cur).id
})
return acc
}, [])
if (this.checkList.length == 0) {
relations = [{
staffPhone: this.queryData.staffPhone,
permissionId: ''
}]
params.type = 0
}
params.relations = relations
// let relations = [{
// staffPhone: this.queryData.staffPhone,
// permissionId: item.id
// }]
console.log(params, 'relations')
// if (checked) {
// params.type = 2
// console.log('勾选了:', item)
// // this.onItemSelected(item)
// } else {
// params.type = 0
// console.log('取消勾选了:', item)
// // this.onItemDeselected(item)
// }
// const params = {
// relations
// }
addBatchPermissions(params).then(res => {
// this.notice.okTips('新增成功')
// this.handleClose()
})
}, },
onItemSelected(item) { // onItemSelected(item) {
// 处理勾选逻辑 // // 处理勾选逻辑
console.log('处理勾选:', item) // console.log('处理勾选:', item)
}, // },
onItemDeselected(item) { // onItemDeselected(item) {
// 处理取消勾选逻辑 // // 处理取消勾选逻辑
console.log('处理取消勾选:', item) // console.log('处理取消勾选:', item)
}, // },
getPermissionsList() { getPermissionsList() {
getPermissionsList({ getPermissionsList({
}).then(res => { }).then(res => {
console.log(res, 'getPermissionsList') console.log(res, 'getPermissionsList')
this.optionsSelectList = res.list this.optionsSelectList = res.map(item => {
return {
id: item.id,
code: item.code,
name: item.name
}
}
)
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
}) })
...@@ -1145,7 +1207,7 @@ export default { ...@@ -1145,7 +1207,7 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$refs["staffInfoForm"]?.validate((valid) => { this.$refs["staffInfoForm"]?.validate((valid) => {
if (valid) { if (valid) {
let params = { const params = {
staffPhone: this.detail.staffPhone, staffPhone: this.detail.staffPhone,
entryTime: new Date(this.detail.entryTime), entryTime: new Date(this.detail.entryTime),
hireType: this.detail.hireType || this.detail.hireType, hireType: this.detail.hireType || this.detail.hireType,
...@@ -1183,6 +1245,7 @@ export default { ...@@ -1183,6 +1245,7 @@ export default {
: this.detail.performanceSalary || 0 : this.detail.performanceSalary || 0
: this.detail.performSalary || 0 : this.detail.performSalary || 0
} }
this.handleSingleChange()
editStaffApi(params).then((res) => { editStaffApi(params).then((res) => {
if (res) { if (res) {
// 修改扣款配置项数据 // 修改扣款配置项数据
......
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
<template> <template>
<div> <div>
<d2-container> <d2-container>
<div class="header" slot="header" style="padding: 10px 20px"> <div
class="header"
slot="header"
style="padding: 10px 20px"
>
<d2-search <d2-search
ref="showSearch" ref="showSearch"
class="show-search" class="show-search"
...@@ -10,10 +14,17 @@ ...@@ -10,10 +14,17 @@
:form-data="showFormData" :form-data="showFormData"
/> />
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary"> <el-button
:id="tableParams.btnId"
size="small"
type="primary"
>
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button
size="small"
@click="handleReset"
> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
...@@ -23,7 +34,10 @@ ...@@ -23,7 +34,10 @@
<auth-button category="Button" <auth-button category="Button"
:show-btn-ids="['9080501']" /> :show-btn-ids="['9080501']" />
</span> --> </span> -->
<auth-button category="Button" :show-btn-ids="['9080502']" /> <auth-button
category="Button"
:show-btn-ids="['9080502']"
/>
</d2-table-header> </d2-table-header>
<d2-table <d2-table
ref="recordTable" ref="recordTable"
...@@ -66,7 +80,7 @@ export default { ...@@ -66,7 +80,7 @@ export default {
components: { components: {
allocationDetailDialog allocationDetailDialog
}, },
data() { data () {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
searchForm: { searchForm: {
...@@ -227,7 +241,7 @@ export default { ...@@ -227,7 +241,7 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) })
}, },
mounted() { mounted () {
// this.getBaseData() // this.getBaseData()
// 获取全部类目 // 获取全部类目
getProductTypeBySceneId({ sceneType: "" }).then((res) => { getProductTypeBySceneId({ sceneType: "" }).then((res) => {
...@@ -259,7 +273,7 @@ export default { ...@@ -259,7 +273,7 @@ export default {
// this.getOptionsList() // this.getOptionsList()
// }, // },
beforeSearchFn() { beforeSearchFn () {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.allocateTime) { if (this.searchFormSearch.allocateTime) {
...@@ -278,7 +292,7 @@ export default { ...@@ -278,7 +292,7 @@ export default {
}) })
}, },
getOptionsList() { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if ( if (
...@@ -302,7 +316,7 @@ export default { ...@@ -302,7 +316,7 @@ export default {
}, },
// 获取仓库门店 // 获取仓库门店
getServicemerchantrefList(merchantId, type) { getServicemerchantrefList (merchantId, type) {
getServicemerchantrefList({ getServicemerchantrefList({
yqMerchantId: merchantId yqMerchantId: merchantId
}).then((res) => { }).then((res) => {
...@@ -335,7 +349,7 @@ export default { ...@@ -335,7 +349,7 @@ export default {
// handleSearch() { // handleSearch() {
// this.$refs.recordTable.refreshTable() // this.$refs.recordTable.refreshTable()
// }, // },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
allocateTime: "", allocateTime: "",
allocateCode: "", allocateCode: "",
...@@ -350,7 +364,8 @@ export default { ...@@ -350,7 +364,8 @@ export default {
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
}, },
handleExport() { async handleExport () {
await this.beforeSearchFn()
var params = this.searchFormSearch var params = this.searchFormSearch
params.method = "dj.smartcarlife.api.stock.allocate.export.async" params.method = "dj.smartcarlife.api.stock.allocate.export.async"
const list = [ const list = [
...@@ -366,16 +381,16 @@ export default { ...@@ -366,16 +381,16 @@ export default {
}, },
// 查看 // 查看
look(row) { look (row) {
this.recordInfo = row this.recordInfo = row
this.allocationDetailVisible = true this.allocationDetailVisible = true
}, },
gotoAdd() { gotoAdd () {
this.$router.push({ name: "addAllocation" }) this.$router.push({ name: "addAllocation" })
}, },
dialogClose(flag) { dialogClose (flag) {
this.allocationDetailVisible = !this.allocationDetailVisible this.allocationDetailVisible = !this.allocationDetailVisible
} }
} }
......
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
<template> <template>
<div> <div>
<d2-container> <d2-container>
<div class="header" slot="header" style="padding: 10px 20px"> <div
class="header"
slot="header"
style="padding: 10px 20px"
>
<d2-search <d2-search
ref="showSearch" ref="showSearch"
class="show-search" class="show-search"
...@@ -10,10 +14,17 @@ ...@@ -10,10 +14,17 @@
:form-data="showFormData" :form-data="showFormData"
/> />
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary"> <el-button
:id="tableParams.btnId"
size="small"
type="primary"
>
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button
size="small"
@click="handleReset"
> 重置 </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
...@@ -23,7 +34,10 @@ ...@@ -23,7 +34,10 @@
<auth-button category="Button" <auth-button category="Button"
:show-btn-ids="['9080401']" /> :show-btn-ids="['9080401']" />
</span> --> </span> -->
<auth-button category="Button" :show-btn-ids="['9080402']" /> <auth-button
category="Button"
:show-btn-ids="['9080402']"
/>
</d2-table-header> </d2-table-header>
<d2-table <d2-table
ref="recordTable" ref="recordTable"
...@@ -32,7 +46,11 @@ ...@@ -32,7 +46,11 @@
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
> >
<div slot="img" slot-scope="scope" v-if="scope.scope.voucherPic"> <div
slot="img"
slot-scope="scope"
v-if="scope.scope.voucherPic"
>
<img <img
class="pro-img" class="pro-img"
:src="scope.scope.voucherPic" :src="scope.scope.voucherPic"
...@@ -55,8 +73,15 @@ ...@@ -55,8 +73,15 @@
@dialogClose="dialogClose" @dialogClose="dialogClose"
/> />
<!-- 预览图片 --> <!-- 预览图片 -->
<el-dialog :visible="imgVisible" :before-close="handleCloseImg"> <el-dialog
<img width="100%" :src="previewImgUrl" alt="图片" /> :visible="imgVisible"
:before-close="handleCloseImg"
>
<img
width="100%"
:src="previewImgUrl"
alt="图片"
/>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -76,7 +101,7 @@ export default { ...@@ -76,7 +101,7 @@ export default {
components: { components: {
inventoryDetailDialog inventoryDetailDialog
}, },
data() { data () {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
searchForm: { searchForm: {
...@@ -197,7 +222,7 @@ export default { ...@@ -197,7 +222,7 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) })
}, },
mounted() { mounted () {
// this.getBaseData() // this.getBaseData()
// 获取全部类目 // 获取全部类目
getProductTypeBySceneId({ sceneType: "" }).then((res) => { getProductTypeBySceneId({ sceneType: "" }).then((res) => {
...@@ -223,7 +248,7 @@ export default { ...@@ -223,7 +248,7 @@ export default {
// this.getOptionsList() // this.getOptionsList()
// }, // },
beforeSearchFn() { beforeSearchFn () {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.checkTime) { if (this.searchFormSearch.checkTime) {
...@@ -240,7 +265,7 @@ export default { ...@@ -240,7 +265,7 @@ export default {
}) })
}, },
getOptionsList() { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if ( if (
...@@ -264,7 +289,7 @@ export default { ...@@ -264,7 +289,7 @@ export default {
}, },
// 获取仓库门店 // 获取仓库门店
getServicemerchantrefList(merchantId) { getServicemerchantrefList (merchantId) {
getServicemerchantrefList({ getServicemerchantrefList({
yqMerchantId: merchantId yqMerchantId: merchantId
}).then((res) => { }).then((res) => {
...@@ -283,7 +308,7 @@ export default { ...@@ -283,7 +308,7 @@ export default {
// handleSearch() { // handleSearch() {
// this.$refs.recordTable.refreshTable() // this.$refs.recordTable.refreshTable()
// }, // },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
checkTime: "", checkTime: "",
checkCode: "", checkCode: "",
...@@ -295,12 +320,13 @@ export default { ...@@ -295,12 +320,13 @@ export default {
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
}, },
gotoAdd() { gotoAdd () {
// this.close({ tagName: '/orderList' }) // this.close({ tagName: '/orderList' })
this.$router.push({ name: "addInventory" }) this.$router.push({ name: "addInventory" })
}, },
handleExport() { async handleExport () {
await this.beforeSearchFn()
var params = this.searchFormSearch var params = this.searchFormSearch
params.method = "dj.smartcarlife.api.stock.check.export.async" params.method = "dj.smartcarlife.api.stock.check.export.async"
const list = [ const list = [
...@@ -316,23 +342,23 @@ export default { ...@@ -316,23 +342,23 @@ export default {
}, },
// 查看 // 查看
look(row) { look (row) {
this.recordInfo = row this.recordInfo = row
this.inventoryDetailVisible = true this.inventoryDetailVisible = true
}, },
dialogClose(flag) { dialogClose (flag) {
this.inventoryDetailVisible = !this.inventoryDetailVisible this.inventoryDetailVisible = !this.inventoryDetailVisible
}, },
handleEnlargeImg(url) { handleEnlargeImg (url) {
if (url) { if (url) {
this.previewImgUrl = url this.previewImgUrl = url
this.imgVisible = !this.imgVisible this.imgVisible = !this.imgVisible
} }
}, },
handleCloseImg() { handleCloseImg () {
this.imgVisible = !this.imgVisible this.imgVisible = !this.imgVisible
} }
} }
......
...@@ -2,63 +2,83 @@ ...@@ -2,63 +2,83 @@
<template> <template>
<div> <div>
<d2-container> <d2-container>
<div class="header" <div
class="header"
slot="header" slot="header"
style="padding: 10px 20px;"> style="padding: 10px 20px;"
<d2-search ref="showSearch" >
<d2-search
ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData"> :form-data="showFormData"
>
<template slot="filmRollNo"> <template slot="filmRollNo">
<el-input :style="{ width: '100%'}" <el-input
:style="{ width: '100%'}"
placeholder="请输入膜卷号" placeholder="请输入膜卷号"
v-model.trim="searchForm['filmRollNo']" v-model.trim="searchForm['filmRollNo']"
:clearable="true" :clearable="true"
:maxlength="50" :maxlength="50"
@input="filmRollNoInput" /> @input="filmRollNoInput"
/>
</template> </template>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" <el-button
@click="handleSearch"
size="small" size="small"
type="primary"> type="primary"
>
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button
@click="handleReset"> size="small"
@click="handleReset"
>
重置 重置
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<span slot="left" <span
class="leftSpan">合计:出库数量<span slot="left"
class="count-txt">{{ statisticsData.totalReduceStockNum }}</span>,出库金额<span class="leftSpan"
class="count-txt">¥{{ statisticsData.totalReduceStockMoney }}</span></span> >合计:出库数量<span class="count-txt">{{ statisticsData.totalReduceStockNum }}</span>,出库金额<span class="count-txt">¥{{ statisticsData.totalReduceStockMoney }}</span></span>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" <d2-table
ref="recordTable"
:get-list-api="getListApi" :get-list-api="getListApi"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn"
<template slot="auth-button" >
slot-scope="scope"> <template
slot="auth-button"
slot-scope="scope"
>
<!-- 关联技师 --> <!-- 关联技师 -->
<span style="margin-right: 10px;" <span
v-if="scope.scope.subOrderStatus != 2"> style="margin-right: 10px;"
<auth-button :data="scope.scope" v-if="scope.scope.subOrderStatus != 2"
:show-btn-ids="['9080302']" /> >
<auth-button
:data="scope.scope"
:show-btn-ids="['9080302']"
/>
</span> </span>
</template> </template>
</d2-table> </d2-table>
</div> </div>
<!-- 关联技师 --> <!-- 关联技师 -->
<correlationDialog :visible.sync="corrVisible" <correlationDialog
:visible.sync="corrVisible"
v-if="corrVisible" v-if="corrVisible"
:params-obj="recordInfo" :params-obj="recordInfo"
@dialogClose="closeCorrDialog" /> @dialogClose="closeCorrDialog"
/>
</d2-container> </d2-container>
</div> </div>
</template> </template>
...@@ -77,7 +97,7 @@ export default { ...@@ -77,7 +97,7 @@ export default {
components: { components: {
correlationDialog correlationDialog
}, },
data() { data () {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList, membraneTypeList: baseConfig.membraneTypeList,
...@@ -337,7 +357,7 @@ export default { ...@@ -337,7 +357,7 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) })
}, },
mounted() { mounted () {
// this.getBaseData() // this.getBaseData()
// 获取全部类目 // 获取全部类目
getProductTypeBySceneId({ sceneType: '' }).then(res => { getProductTypeBySceneId({ sceneType: '' }).then(res => {
...@@ -367,21 +387,21 @@ export default { ...@@ -367,21 +387,21 @@ export default {
// }, // },
// 输入膜卷号 // 输入膜卷号
filmRollNoInput(e) { filmRollNoInput (e) {
if (!/^[a-zA-Z0-9]*$/.test(e)) { if (!/^[a-zA-Z0-9]*$/.test(e)) {
this.searchForm.filmRollNo = e.replace(/[^a-zA-Z0-9]/g, '') this.searchForm.filmRollNo = e.replace(/[^a-zA-Z0-9]/g, '')
} }
}, },
// 出库记录列表统计 // 出库记录列表统计
stockReduceRecordCount() { stockReduceRecordCount () {
stockReduceRecordCount(this.searchFormSearch).then(res => { stockReduceRecordCount(this.searchFormSearch).then(res => {
this.statisticsData = res this.statisticsData = res
}) })
}, },
// 获取仓库门店 // 获取仓库门店
getServicemerchantrefList(merchantId) { getServicemerchantrefList (merchantId) {
getServicemerchantrefList({ getServicemerchantrefList({
yqMerchantId: merchantId yqMerchantId: merchantId
}).then(res => { }).then(res => {
...@@ -395,7 +415,7 @@ export default { ...@@ -395,7 +415,7 @@ export default {
}) })
}, },
beforeSearchFn() { beforeSearchFn () {
return new Promise(resolve => { return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.reduceDate) { if (this.searchFormSearch.reduceDate) {
...@@ -407,7 +427,7 @@ export default { ...@@ -407,7 +427,7 @@ export default {
}) })
}, },
getOptionsList() { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') { if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
...@@ -421,11 +441,11 @@ export default { ...@@ -421,11 +441,11 @@ export default {
}) })
}, },
handleSearch() { handleSearch () {
this.$refs.recordTable.refreshTable(true, true) this.$refs.recordTable.refreshTable(true, true)
this.stockReduceRecordCount() this.stockReduceRecordCount()
}, },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
reduceDate: '', reduceDate: '',
eventType: '', eventType: '',
...@@ -442,7 +462,8 @@ export default { ...@@ -442,7 +462,8 @@ export default {
this.stockReduceRecordCount() this.stockReduceRecordCount()
}, },
handleExport() { async handleExport () {
await this.beforeSearchFn()
var params = this.searchFormSearch var params = this.searchFormSearch
params.method = 'dj.api.smartcarlife.MerchantGoodsStockReduceRecord.export.async' params.method = 'dj.api.smartcarlife.MerchantGoodsStockReduceRecord.export.async'
const list = [ const list = [
...@@ -458,7 +479,7 @@ export default { ...@@ -458,7 +479,7 @@ export default {
}, },
// 查询领料技师 // 查询领料技师
getRoleTechnicianList() { getRoleTechnicianList () {
const params = {} const params = {}
// params.yqMerchantId = this.userInfo.merchant.merchantId // params.yqMerchantId = this.userInfo.merchant.merchantId
getRoleTechnician(params).then(res => { getRoleTechnician(params).then(res => {
...@@ -468,12 +489,12 @@ export default { ...@@ -468,12 +489,12 @@ export default {
}, },
// 关联技师 // 关联技师
correlationTechnician(row) { correlationTechnician (row) {
this.recordInfo = row this.recordInfo = row
this.corrVisible = !this.corrVisible this.corrVisible = !this.corrVisible
}, },
closeCorrDialog(obj) { closeCorrDialog (obj) {
console.log('obj', obj) console.log('obj', obj)
this.corrVisible = !this.corrVisible this.corrVisible = !this.corrVisible
if (obj.flag) { if (obj.flag) {
......
...@@ -332,7 +332,8 @@ export default { ...@@ -332,7 +332,8 @@ export default {
}, },
handleExport () { async handleExport () {
await this.beforeSearchFn()
var params = this.searchFormSearch var params = this.searchFormSearch
params.method = "dj.smartcarlife.api.stock.refund.export" params.method = "dj.smartcarlife.api.stock.refund.export"
const list = [ const list = [
......
...@@ -2,57 +2,77 @@ ...@@ -2,57 +2,77 @@
<template> <template>
<div> <div>
<d2-container> <d2-container>
<div class="header" <div
class="header"
slot="header" slot="header"
style="padding: 10px 20px;"> style="padding: 10px 20px;"
<d2-search ref="showSearch" >
<d2-search
ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData" /> :form-data="showFormData"
/>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" <el-button
@click="handleSearch"
size="small" size="small"
type="primary"> type="primary"
>
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button
@click="handleReset"> size="small"
@click="handleReset"
>
重置 重置
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<span slot="left" <span
class="leftSpan">合计:当前库存<span class="count-txt">{{ statisticsData }}</span></span> slot="left"
class="leftSpan"
>合计:当前库存<span class="count-txt">{{ statisticsData }}</span></span>
<div> <div>
<auth-button category="Button" /> <auth-button category="Button" />
</div> </div>
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" <d2-table
ref="recordTable"
:get-list-api="getListApi" :get-list-api="getListApi"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn"
<auth-button slot="auth-button" >
<auth-button
slot="auth-button"
slot-scope="scope" slot-scope="scope"
:data="scope.scope" /> :data="scope.scope"
/>
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
<!-- 查看 --> <!-- 查看 -->
<stock-month-dialog :stock-month-visible="stockMonthVisible" <stock-month-dialog
:stock-month-visible="stockMonthVisible"
:record-info="recordInfo" :record-info="recordInfo"
v-if="stockMonthVisible" v-if="stockMonthVisible"
@dialogClose="dialogClose" /> @dialogClose="dialogClose"
<stockDetailDialog :visible.sync="stockDetailDialogVisible" />
<stockDetailDialog
:visible.sync="stockDetailDialogVisible"
:record-info="recordInfo" :record-info="recordInfo"
v-if="stockDetailDialogVisible"> v-if="stockDetailDialogVisible"
>
</stockDetailDialog> </stockDetailDialog>
<statementOfAccountDialog :visible.sync="statementOfAccountDialogVisible" <statementOfAccountDialog
:visible.sync="statementOfAccountDialogVisible"
v-if="statementOfAccountDialogVisible" v-if="statementOfAccountDialogVisible"
:yq-merchant-list="baseData.yqMerchantList" :yq-merchant-list="baseData.yqMerchantList"
@handleRelateProConfirm="handleRelateProConfirm"> @handleRelateProConfirm="handleRelateProConfirm"
>
</statementOfAccountDialog> </statementOfAccountDialog>
</div> </div>
</template> </template>
...@@ -73,7 +93,7 @@ export default { ...@@ -73,7 +93,7 @@ export default {
stockDetailDialog, stockDetailDialog,
statementOfAccountDialog statementOfAccountDialog
}, },
data() { data () {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList, membraneTypeList: baseConfig.membraneTypeList,
...@@ -141,11 +161,11 @@ export default { ...@@ -141,11 +161,11 @@ export default {
label: '商品名称', label: '商品名称',
prop: 'upgradeGoodsName', prop: 'upgradeGoodsName',
width: '160px' width: '160px'
},{ }, {
label: '规格', label: '规格',
prop: 'specificationData', prop: 'specificationData',
width: '160px' width: '160px'
},{ }, {
label: '商品编码', label: '商品编码',
prop: 'productCode', prop: 'productCode',
width: '250px' width: '250px'
...@@ -202,7 +222,7 @@ export default { ...@@ -202,7 +222,7 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) })
}, },
mounted() { mounted () {
// this.getBaseData() // this.getBaseData()
// 获取全部类目 // 获取全部类目
getProductTypeBySceneId({ sceneType: '' }).then(res => { getProductTypeBySceneId({ sceneType: '' }).then(res => {
...@@ -231,18 +251,18 @@ export default { ...@@ -231,18 +251,18 @@ export default {
// }, // },
// 库存记录统计 // 库存记录统计
stockMonthReportCount() { stockMonthReportCount () {
stockMonthReportCount(this.searchFormSearch).then(res => { stockMonthReportCount(this.searchFormSearch).then(res => {
this.statisticsData = res this.statisticsData = res
}) })
}, },
// 库存对账单 // 库存对账单
handleStatementOfAccount() { handleStatementOfAccount () {
this.statementOfAccountDialogVisible = true this.statementOfAccountDialogVisible = true
}, },
beforeSearchFn() { beforeSearchFn () {
return new Promise(resolve => { return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.dataMonth = Util.dateFormate(new Date(), "YYYY-MM") this.searchFormSearch.dataMonth = Util.dateFormate(new Date(), "YYYY-MM")
...@@ -251,7 +271,7 @@ export default { ...@@ -251,7 +271,7 @@ export default {
}) })
}, },
getOptionsList() { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') { if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
...@@ -265,11 +285,11 @@ export default { ...@@ -265,11 +285,11 @@ export default {
}) })
}, },
handleSearch() { handleSearch () {
this.$refs.recordTable.refreshTable(true, true) this.$refs.recordTable.refreshTable(true, true)
this.stockMonthReportCount() this.stockMonthReportCount()
}, },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
upgradeGoodsName: '', upgradeGoodsName: '',
yqMerchantId: '', yqMerchantId: '',
...@@ -281,7 +301,7 @@ export default { ...@@ -281,7 +301,7 @@ export default {
}, },
// 库存对账单导出 // 库存对账单导出
handleRelateProConfirm(data) { handleRelateProConfirm (data) {
var params = data var params = data
params.method = 'dj.api.smartcarlife.merchantShopGoodsStock.statement.exportAsync' params.method = 'dj.api.smartcarlife.merchantShopGoodsStock.statement.exportAsync'
console.log(params) console.log(params)
...@@ -299,7 +319,7 @@ export default { ...@@ -299,7 +319,7 @@ export default {
this.statementOfAccountDialogVisible = false this.statementOfAccountDialogVisible = false
}, },
handleExport() { handleExport () {
var params = this.searchFormSearch var params = this.searchFormSearch
params.method = 'dj.api.smartcarlife.MerchantGoodsStockMonthReport.export.async' params.method = 'dj.api.smartcarlife.MerchantGoodsStockMonthReport.export.async'
const list = [ const list = [
...@@ -315,16 +335,16 @@ export default { ...@@ -315,16 +335,16 @@ export default {
}, },
// 查看 // 查看
look(row) { look (row) {
this.recordInfo = row this.recordInfo = row
this.stockMonthVisible = true this.stockMonthVisible = true
}, },
handleDetail(row) { handleDetail (row) {
this.recordInfo = row this.recordInfo = row
console.log(row, 'row') console.log(row, 'row')
this.stockDetailDialogVisible = true this.stockDetailDialogVisible = true
}, },
dialogClose(flag) { dialogClose (flag) {
this.stockMonthVisible = !this.stockMonthVisible this.stockMonthVisible = !this.stockMonthVisible
// if (flag) { // if (flag) {
// this.$refs.recordTable.refreshTable() // this.$refs.recordTable.refreshTable()
......
...@@ -2,50 +2,64 @@ ...@@ -2,50 +2,64 @@
<template> <template>
<div> <div>
<d2-container> <d2-container>
<div class="header" <div
class="header"
slot="header" slot="header"
style="padding: 10px 20px;"> style="padding: 10px 20px;"
<d2-search ref="showSearch" >
<d2-search
ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData"> :form-data="showFormData"
>
<template slot="filmRollNo"> <template slot="filmRollNo">
<el-input :style="{ width: '100%'}" <el-input
:style="{ width: '100%'}"
placeholder="请输入膜卷号" placeholder="请输入膜卷号"
v-model.trim="searchForm['filmRollNo']" v-model.trim="searchForm['filmRollNo']"
:clearable="true" :clearable="true"
:maxlength="50" :maxlength="50"
@input="filmRollNoInput" /> @input="filmRollNoInput"
/>
</template> </template>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" <el-button
@click="handleSearch"
size="small" size="small"
type="primary"> type="primary"
>
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button
@click="handleReset"> size="small"
@click="handleReset"
>
重置 重置
</el-button> </el-button>
</div> </div>
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<span slot="left" <span
class="leftSpan">合计:入库数量<span slot="left"
class="count-txt">{{ statisticsData.totalIncreaseStockNum }}</span>,入库金额<span class="leftSpan"
class="count-txt">¥{{ statisticsData.totalIncreaseStockMoney }}</span></span> >合计:入库数量<span class="count-txt">{{ statisticsData.totalIncreaseStockNum }}</span>,入库金额<span class="count-txt">¥{{ statisticsData.totalIncreaseStockMoney }}</span></span>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" <d2-table
ref="recordTable"
:get-list-api="getListApi" :get-list-api="getListApi"
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn"
<auth-button slot="auth-button" >
<auth-button
slot="auth-button"
slot-scope="scope" slot-scope="scope"
:data="scope.scope" /> :data="scope.scope"
/>
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
...@@ -64,7 +78,7 @@ export default { ...@@ -64,7 +78,7 @@ export default {
components: { components: {
}, },
data() { data () {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList, membraneTypeList: baseConfig.membraneTypeList,
...@@ -299,7 +313,7 @@ export default { ...@@ -299,7 +313,7 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) })
}, },
mounted() { mounted () {
// this.getBaseData() // this.getBaseData()
// 获取全部类目 // 获取全部类目
getProductTypeBySceneId({ sceneType: '' }).then(res => { getProductTypeBySceneId({ sceneType: '' }).then(res => {
...@@ -328,14 +342,14 @@ export default { ...@@ -328,14 +342,14 @@ export default {
// }, // },
// 输入膜卷号 // 输入膜卷号
filmRollNoInput(e) { filmRollNoInput (e) {
if (!/^[a-zA-Z0-9]*$/.test(e)) { if (!/^[a-zA-Z0-9]*$/.test(e)) {
this.searchForm.filmRollNo = e.replace(/[^a-zA-Z0-9]/g, '') this.searchForm.filmRollNo = e.replace(/[^a-zA-Z0-9]/g, '')
} }
}, },
// 获取仓库门店 // 获取仓库门店
getServicemerchantrefList(merchantId) { getServicemerchantrefList (merchantId) {
getServicemerchantrefList({ getServicemerchantrefList({
yqMerchantId: merchantId yqMerchantId: merchantId
}).then(res => { }).then(res => {
...@@ -350,25 +364,25 @@ export default { ...@@ -350,25 +364,25 @@ export default {
}, },
// 入库管理列表统计 // 入库管理列表统计
goodsWarehousingInfoCount() { goodsWarehousingInfoCount () {
goodsWarehousingInfoCount(this.searchFormSearch).then(res => { goodsWarehousingInfoCount(this.searchFormSearch).then(res => {
this.statisticsData = res this.statisticsData = res
}) })
}, },
beforeSearchFn() { beforeSearchFn () {
return new Promise(resolve => { return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.increaseTime) { if (this.searchFormSearch.increaseTime) {
this.searchFormSearch.startDate = Util.dateFormate(this.searchFormSearch.increaseTime[0], 'YYYY-MM-DD') this.searchFormSearch.startDate = Util.dateFormate(this.searchFormSearch.increaseTime[0], 'YYYY-MM-DD')
this.searchFormSearch.endDate = Util.dateFormate(this.searchFormSearch.increaseTime[1], 'YYYY-MM-DD') this.searchFormSearch.endDate = Util.dateFormate(this.searchFormSearch.increaseTime[1], 'YYYY-MM-DD')
delete this.searchFormSearch.increaseTime
} }
delete this.searchFormSearch.increaseTime
resolve() resolve()
}) })
}, },
getOptionsList() { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') { if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
...@@ -382,11 +396,11 @@ export default { ...@@ -382,11 +396,11 @@ export default {
}) })
}, },
handleSearch() { handleSearch () {
this.$refs.recordTable.refreshTable(true, true) this.$refs.recordTable.refreshTable(true, true)
this.goodsWarehousingInfoCount() this.goodsWarehousingInfoCount()
}, },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
increaseTime: '', increaseTime: '',
increaseStockType: '', increaseStockType: '',
...@@ -403,7 +417,8 @@ export default { ...@@ -403,7 +417,8 @@ export default {
this.goodsWarehousingInfoCount() this.goodsWarehousingInfoCount()
}, },
handleExport() { async handleExport () {
await this.beforeSearchFn()
var params = this.searchFormSearch var params = this.searchFormSearch
params.method = 'dj.api.life.GoodsWarehousingInfo.exportExcel.async' params.method = 'dj.api.life.GoodsWarehousingInfo.exportExcel.async'
const list = [ const list = [
......
<template>
<div>
<baseDialog :is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
class="detail-content-warn">
<div class="form_div">
<d2-table ref="recordTable"
:has-page="false"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<div slot="downloadContent"
slot-scope="scope">
<el-button type="text"
@click="handleDownload(scope.scope)">下载</el-button>
</div>
</d2-table>
</div>
</baseDialog>
</div>
</template>
<script>
import {
queryPushRecord,
downloadPushFile
} from "@api/downloadReportManage"
import { Util, deepClone, downLoadFile } from "@/common/util"
import {
actionOpt
} from "@/common/constants.js"
export default {
name: "PushRecordDialog",
components: {},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: {}
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("dialogClose", { flag: val })
}
}
},
mounted() {
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "推送记录",
width: "1080px"
}
},
options: [],
loading: true,
searchForm: {},
searchFormSearch: {},
getListApi: queryPushRecord,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: false,
tableColumns: [
{
label: "推送人",
prop: "pusher"
},
{
label: '推送时间',
prop: 'pushtime'
},
{
label: "推送内容",
addHtml: "downloadContent"
}
]
},
actionOpt: deepClone(actionOpt)
}
},
methods: {
beforeSearchFn() {
return new Promise((resolve) => {
this.searchForm.key = this.paramsObj.key
this.searchFormSearch = deepClone(this.searchForm)
resolve()
})
},
handleDownload(row) {
var params = {
key: row.key
}
downloadPushFile(params).then((res) => {
downLoadFile(res.list[0].url)
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-content-warn {
.div-title {
width: 1040px;
height: 30px;
border-bottom: 1px solid #e5e5e5;
font-size: 16px;
font-weight: 600;
color: #333333;
margin: 10px 0 20px 0;
}
.form_div {
color: #333333;
.el-form-item__content {
display: inline-block;
width: calc(100% - 150px);
line-height: 24px;
}
.el-form-item__label {
padding: 0;
line-height: 24px;
}
.el-form-item {
width: 100%;
margin-bottom: 20px;
}
.edit-sub-block {
// padding: 0 10px;
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.onLineItem {
::v-deep .el-form-item__content {
max-width: 80%;
}
}
}
}
.imgCon {
text-align: center;
margin-bottom: 50px;
}
.imgSize {
width: 1040px;
}
.default-width {
width: 350px;
}
.div-optShow {
margin-bottom: 20px;
width: 1040px;
border-radius: 4px;
opacity: 1;
border: 1px solid #e5e5e5;
background: #fafafa;
.div-optShow-title {
color: #333333;
font-size: 16px;
font-weight: 600;
margin: 16px 0 8px 20px;
}
.div-optShow-content {
margin: 0 20px 20px 20px;
color: #333333;
font-size: 14px;
.contentSpan {
padding: 0 5px;
line-height: 30px;
color: #eb4e4e;
}
}
}
}
</style>
...@@ -33,6 +33,12 @@ ...@@ -33,6 +33,12 @@
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<div slot="pushNumHtml"
slot-scope="scope">
<template v-if="scope.scope.push_num == '-'">{{ scope.scope.push_num }}</template>
<template v-else><el-button type="text"
@click="handlePushRecord(scope.scope)">{{ scope.scope.push_num }}</el-button></template>
</div>
<div slot="auth-button" <div slot="auth-button"
slot-scope="scope" slot-scope="scope"
v-if="scope.scope.status != -1"> v-if="scope.scope.status != -1">
...@@ -53,6 +59,18 @@ ...@@ -53,6 +59,18 @@
<auth-button :data="scope.scope" <auth-button :data="scope.scope"
:show-btn-ids="['9063003']" /> :show-btn-ids="['9063003']" />
</span> </span>
<!-- 导入更新 -->
<span style="margin-right: 10px;"
v-if="scope.scope.report_type.includes('园区店毛利报表')">
<auth-button :data="scope.scope"
:show-btn-ids="['9063004']" />
</span>
<!-- 推送 -->
<span style="margin-right: 10px;"
v-if="scope.scope.report_type.includes('园区店毛利报表')">
<auth-button :data="scope.scope"
:show-btn-ids="['9063005']" />
</span>
</div> </div>
<div v-else> <div v-else>
<span class="list-span">正在生成中</span> <span class="list-span">正在生成中</span>
...@@ -65,6 +83,76 @@ ...@@ -65,6 +83,76 @@
v-if="dateVisible" v-if="dateVisible"
:params-obj="recordInfo" :params-obj="recordInfo"
@dialogClose="closeDateDialog" /> @dialogClose="closeDateDialog" />
<!-- 推送记录 -->
<pushRecordDialog :visible.sync="pushVisible"
v-if="pushVisible"
:params-obj="recordInfo"
@dialogClose="closePushDialog" />
<!-- 导入更新 -->
<d2-dialog title="上架导入"
:is-visible="fileVisible"
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport">
<slot>
<el-form :model="fileForm"
ref="fileRuleForm"
:rules="fileRules"
label-width="120px">
<el-form-item label="导入文件:"
prop="fileName">
<el-col :span="16">
<el-input readonly
v-model="fileForm.fileName" />
</el-col>
<el-col :span="4"
class="m-l-md">
<el-button class="import-btn">
导入文件
<input type="file"
id="fileUpload"
class="import-input"
accept=".xlsx,.xls"
@change="importFile($event)">
</el-button>
</el-col>
</el-form-item>
</el-form>
</slot>
</d2-dialog>
<el-dialog title="提示"
:visible.sync="dialogVisible"
:show-close="false"
:close-on-click-modal="false"
width="30%">
<div class="dialog-content"
v-if="updateStatus == ''">
<div>
<img src="./images/loadingGIF.gif">
</div>
<div class="dialog-tips-big">正在处理中</div>
<div class="dialog-tips-small">
说明:系统正在加急导入中,请耐心等待;导入过程中,请不要退出当前操作,否则将导致本次提交无效。
</div>
</div>
<div class="dialog-content"
v-else-if="updateStatus == true && failNum == 0">
<div class="dialog-tips-big">处理成功,可返回列表查看</div>
</div>
<div class="dialog-content"
v-else-if="updateStatus == true && failNum > 0">
<div class="dialog-tips-big">
{{ errMsg }}
</div>
</div>
<span slot="footer"
class="dialog-footer">
<!-- <el-button @click="dialogVisible = false">取 消</el-button> -->
<el-button type="primary"
@click="gotoList"
v-if="updateStatus == true">确定</el-button>
</span>
</el-dialog>
</d2-container> </d2-container>
</div> </div>
</template> </template>
...@@ -78,13 +166,17 @@ import { ...@@ -78,13 +166,17 @@ import {
import { import {
queryAllExcel, queryAllExcel,
reportExport_download, reportExport_download,
rebuild rebuild,
pushMessageAndExcle,
importExcel
} from "@api/downloadReportManage" } from "@api/downloadReportManage"
import dateChooseDialog from "./components/dateChooseDialog" import dateChooseDialog from "./components/dateChooseDialog"
import pushRecordDialog from "./components/pushRecordDialog"
export default { export default {
name: "DownloadReportList", name: "DownloadReportList",
components: { components: {
dateChooseDialog dateChooseDialog,
pushRecordDialog
}, },
data() { data() {
return { return {
...@@ -139,30 +231,22 @@ export default { ...@@ -139,30 +231,22 @@ export default {
{ {
label: "报表类型", label: "报表类型",
prop: "report_type" prop: "report_type"
// formatter: (cellValue) => {
// return downloadReportManage_reportType.find(el => el.confId == cellValue.report_type)?.confValue
// }
}, },
{ {
label: "业务类型", label: "业务类型",
prop: "business_type" prop: "business_type"
// formatter: (cellValue) => {
// return downloadReportManage_businessType.find(el => el.confId == cellValue.business_type)?.confValue
// }
}, },
{ {
label: "统计周期", label: "统计周期",
prop: "statperiod" prop: "statperiod"
// formatter: (cellValue) => {
// return sceneForInStore.find(el => el.confId == o)?.confValue
// }
}, },
{ {
label: "创建时间", label: "创建时间",
prop: "created_date" prop: "created_date"
// formatter: (cellValue) => { },
// return sceneForInStore.find(el => el.confId == o)?.confValue {
// } label: "推送次数",
addHtml: "pushNumHtml"
} }
] ]
}, },
...@@ -175,7 +259,19 @@ export default { ...@@ -175,7 +259,19 @@ export default {
) )
}, },
dateVisible: false, dateVisible: false,
recordInfo: {} recordInfo: {},
fileVisible: false,
fileForm: {},
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
dialogVisible: false,
updateStatus: "",
updatePercentage: 0,
succNum: 0,
failNum: 0,
errMsg: '',
pushVisible: false
} }
}, },
computed: { computed: {
...@@ -293,11 +389,112 @@ export default { ...@@ -293,11 +389,112 @@ export default {
closeDateDialog() { closeDateDialog() {
this.dateVisible = !this.dateVisible this.dateVisible = !this.dateVisible
// this.$refs.recordTable.refreshTable(false, true) // this.$refs.recordTable.refreshTable(false, true)
},
// 上传文件,转码为base64
importFile(e) {
const size = e.target.files[0].size / 1024 / 1024
if (size < 10) {
this.$set(this.fileForm, "fileName", e.target.files[0].name)
// // 转码base64
const reader = new FileReader()
reader.readAsDataURL(e.target.files[0])
reader.onload = (event) => {
// const imgFile = event.target.result
// const arrBase64 = imgFile.split(",")
this.$set(
this.fileForm,
"fileInfo",
e.target.files[0]
)
document.getElementById("fileUpload").value = ""
}
} else {
this.notice.errorTips("上传文件不可超过10M")
}
},
handleImport(row) {
this.recordInfo = row
this.fileForm = {
fileName: ''
}
this.fileVisible = !this.fileVisible
},
handleConfirmImport() {
this.$refs.fileRuleForm.validate(valid => {
if (valid) {
this.dialogVisible = true
// this.updateStatus = true
// this.succNum = 2
// const params = {
// key: this.recordInfo.key,
// file: this.fileForm.fileInfo
// }
const formData = new FormData()
formData.append("file", this.fileForm.fileInfo)
formData.append("key", this.recordInfo.key)
// 调试:打印内容
for (const [key, value] of formData.entries()) {
console.log(key, value)
}
importExcel(formData).then((res) => {
console.log(res, 'res')
this.updateStatus = true
if (res.errId == '-7') {
this.failNum = 1
this.errMsg = res.message
}
})
}
})
},
gotoList() {
this.fileVisible = !this.fileVisible
this.dialogVisible = !this.dialogVisible
this.$refs.recordTable.refreshTable()
},
// 推送
handlePush(row) {
this.$confirm(
"系统将自动按照推送当前报表至相关的负责人及群聊中,是否确认推送?",
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
closeOnClickModal: false
}
)
.then(() => {
var params = {
accountName: this.userInfo.loginAccount.loginAccout,
key: row.key
}
pushMessageAndExcle(params).then((res) => {
this.notice.okTips()
this.$refs.recordTable.refreshTable()
})
})
.catch((err) => {
console.log(err)
})
},
handlePushRecord(row) {
this.recordInfo = row
this.pushVisible = !this.pushVisible
},
closePushDialog() {
this.pushVisible = !this.pushVisible
} }
} }
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
.count-txt { .count-txt {
font-weight: 700; font-weight: 700;
color: #2a58ad; color: #2a58ad;
...@@ -315,4 +512,46 @@ export default { ...@@ -315,4 +512,46 @@ export default {
font-size: 14px; font-size: 14px;
color: #999999; color: #999999;
} }
.m-l-md {
margin-left: 20px;
}
.import-btn {
position: relative;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.dialog-content {
text-align: center;
.dialog-tips-big {
font-size: 16px;
color: #333333;
margin-bottom: 20px;
}
.dialog-tips-small {
font-size: 12px;
color: #666666;
}
.iconSize {
width: 20px;
height: 20px;
}
}
</style>
<style lang="scss">
.downloadReportManage {
.el-table__header-wrapper .el-checkbox {
display: none;
}
.el-table__body-wrapper .el-checkbox {
display: none;
}
}
</style> </style>
<template> <template>
<d2-dialog title="收款二维码" :is-visible="qRcodeVisible" class="qRcodeDailog" width="750px" btn-ok-label="全部下载" <d2-dialog title="收款二维码"
@closeDialog="handleClose" @confirmDialog="handleAddConfirm"> :is-visible="qRcodeVisible"
class="qRcodeDailog"
width="750px"
btn-ok-label="全部下载"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<div class="channelBox"> <div class="channelBox">
<span>支付渠道: </span> <span>支付渠道: </span>
<el-select v-model="paymentChannelId" placeholder="请选择" class="elSelect"> <el-select v-model="paymentChannelId"
<el-option v-for="item in paymentChannelList" :key="item.paymentChannelId" :label="item.paymentChannelName" placeholder="请选择"
class="elSelect">
<el-option v-for="item in paymentChannelList"
:key="item.paymentChannelId"
:label="item.paymentChannelName"
:value="item.paymentChannelId"> :value="item.paymentChannelId">
</el-option> </el-option>
</el-select> </el-select>
<el-button type="primary" @click="savaAll">保存并重新生成</el-button> <el-button type="primary"
@click="savaAll">保存并重新生成</el-button>
</div> </div>
<div class="qrcon"> <div class="qrcon">
<div class="wxcon"> <div class="wxcon">
<div class="codeDiv" id="wxview"> <div class="codeDiv"
<img style="width:100%;height:100%" src="./images/code3.png"> id="wxview">
<img style="width:100%;height:100%"
src="./images/code3.png">
<!-- v-if="qrCodeURL" <div class="imgDiv"> --> <!-- v-if="qrCodeURL" <div class="imgDiv"> -->
<img v-if="qrCodeURL" class="qrImg" crossorigin="anonymous" :src="qrCodeURL"> <img v-if="qrCodeURL"
class="qrImg"
crossorigin="anonymous"
:src="qrCodeURL">
<!-- crossorigin="anonymous" --> <!-- crossorigin="anonymous" -->
<div v-if="!qrCodeURL" class="el-icon-loading loadingIcon" /> <div v-if="!qrCodeURL"
class="el-icon-loading loadingIcon" />
<!-- </div> --> <!-- </div> -->
<div class="merchantNameDiv">{{ info.yqMerchantName }}</div> <div class="merchantNameDiv">{{ info.yqMerchantName }}</div>
</div> </div>
<el-button style="marginTop:20px" type="primary " <el-button style="marginTop:20px"
type="primary "
@click="takeScreenshot('wxview', `${info.yqMerchantName}微信支付收款码`)">下载</el-button> @click="takeScreenshot('wxview', `${info.yqMerchantName}微信支付收款码`)">下载</el-button>
</div> </div>
<div class="alicon"> <div class="alicon">
<div class="codeDiv" id="aliview"> <div class="codeDiv"
<img style="width:100%;height:100%" src="./images/alipay.png"> id="aliview">
<img style="width:100%;height:100%"
src="./images/alipay.png">
<!-- <img v-if="aliqrCodeURL" <!-- <img v-if="aliqrCodeURL"
class="qrImg imgs" class="qrImg imgs"
:src="aliqrCodeURL" :src="aliqrCodeURL"
crossorigin="anonymous"> --> crossorigin="anonymous"> -->
<div id="qrcodeDiv" class="qrImg" /> <div id="qrcodeDiv"
class="qrImg" />
<!-- --> <!-- -->
<!-- :src="aliqrCodeURL"> --> <!-- :src="aliqrCodeURL"> -->
<div v-if="!aliqrCodeURL" class="el-icon-loading loadingIcon" /> <div v-if="!aliqrCodeURL"
class="el-icon-loading loadingIcon" />
<!-- </div> --> <!-- </div> -->
<div class="merchantNameDiv">{{ info.yqMerchantName }}</div> <div class="merchantNameDiv">{{ info.yqMerchantName }}</div>
</div> </div>
<el-button style="marginTop:20px" type="primary " <el-button style="marginTop:20px"
type="primary "
@click="takeScreenshot('aliview', `${info.yqMerchantName}支付宝支付收款码`)">下载 @click="takeScreenshot('aliview', `${info.yqMerchantName}支付宝支付收款码`)">下载
</el-button> </el-button>
</div> </div>
...@@ -105,7 +127,7 @@ export default { ...@@ -105,7 +127,7 @@ export default {
savaAll() { savaAll() {
setDefaultPaymentChannel({ setDefaultPaymentChannel({
paymentChannelId: this.paymentChannelId, paymentChannelId: this.paymentChannelId,
merchantId: this.info.yqMerchantId merchantId: this.info.merchantId
}) })
this.createQrcodeImage() this.createQrcodeImage()
this.alipayQrcode() this.alipayQrcode()
...@@ -153,7 +175,7 @@ export default { ...@@ -153,7 +175,7 @@ export default {
// oParams.appId = this.paymentChannelId == '8881A96B22B84A348263EE4F314A2A23' ? 'wx06d1198e751435d1' : 'wx3d2ee7f8bda398cc' // oParams.appId = this.paymentChannelId == '8881A96B22B84A348263EE4F314A2A23' ? 'wx06d1198e751435d1' : 'wx3d2ee7f8bda398cc'
oParams.qrcodeType = 'QR_WXA_UNLIMIT' oParams.qrcodeType = 'QR_WXA_UNLIMIT'
oParams.path = 'packagesPayment/pages/QRPayment/QRPayment' oParams.path = 'packagesPayment/pages/QRPayment/QRPayment'
oParams.scene = `merchantId=${this.info.yqMerchantId}&merchantName=${this.info.yqMerchantName}&paymentChannelId=${this.paymentChannelId}` oParams.scene = `merchantId=${this.info.merchantId}&merchantName=${this.info.yqMerchantName}&paymentChannelId=${this.paymentChannelId}`
createWeappQrcode(oParams).then(res => { createWeappQrcode(oParams).then(res => {
this.qrCodeURL = res this.qrCodeURL = res
...@@ -210,7 +232,7 @@ export default { ...@@ -210,7 +232,7 @@ export default {
alipayQrcode() { alipayQrcode() {
// const that = this // const that = this
// pay 支付渠道 // pay 支付渠道
const shareUrl = `${baseConfig.alipayPath}?M=${this.info.yqMerchantId}&MN=${this.info.yqMerchantName}&P=${this.paymentChannelId}` const shareUrl = `${baseConfig.alipayPath}?M=${this.info.merchantId}&MN=${this.info.yqMerchantName}&P=${this.paymentChannelId}`
console.log(baseConfig.alipayPath) console.log(baseConfig.alipayPath)
console.log(shareUrl) console.log(shareUrl)
setTimeout(() => { setTimeout(() => {
...@@ -243,7 +265,7 @@ export default { ...@@ -243,7 +265,7 @@ export default {
// const params = { // const params = {
// path: baseConfig.alipayPath, // path: baseConfig.alipayPath,
// yqMerchantId: this.info.yqMerchantId, // yqMerchantId: this.info.merchantId ,
// yqMerchantName: this.info.yqMerchantName // yqMerchantName: this.info.yqMerchantName
// } // }
......
...@@ -7,8 +7,12 @@ ...@@ -7,8 +7,12 @@
@closeDialog="handleClose" @closeDialog="handleClose"
@confirmDialog="handleAddConfirm"> @confirmDialog="handleAddConfirm">
<div class="scene-box"> <div class="scene-box">
<div class="scene-item" v-for="(item, index) in sceneList" :key="index"> <div class="scene-item"
<img class="scene-image" :src="`https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/scene_type_${item.sceneType}.png`" alt=""> v-for="(item, index) in sceneList"
:key="index">
<img class="scene-image"
:src="`https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/scene_type_${item.sceneType}.png`"
alt="">
<div class="item-text"> <div class="item-text">
<div class="text-name">{{ item.sceneName }}</div> <div class="text-name">{{ item.sceneName }}</div>
<div class="text-tips">{{ item.sceneDesc }}</div> <div class="text-tips">{{ item.sceneDesc }}</div>
...@@ -76,7 +80,7 @@ export default { ...@@ -76,7 +80,7 @@ export default {
mounted() { mounted() {
// 获取当前园区店开通的场景入口 // 获取当前园区店开通的场景入口
getYqMerchantSceneConfigAPI({ yqMerchantId: this.info.yqMerchantId }).then(res => { getYqMerchantSceneConfigAPI({ yqMerchantId: this.info.merchantId }).then(res => {
res?.forEach(val => { res?.forEach(val => {
this.sceneList.map(v => { this.sceneList.map(v => {
if (v.sceneType === val.scene && val.sceneOpenFlag === 0) { if (v.sceneType === val.scene && val.sceneOpenFlag === 0) {
...@@ -94,7 +98,7 @@ export default { ...@@ -94,7 +98,7 @@ export default {
const arr = [] const arr = []
this.sceneList.forEach(v => { this.sceneList.forEach(v => {
arr.push({ arr.push({
merchantId: this.info.yqMerchantId, merchantId: this.info.merchantId,
sceneOpenFlag: v.isOpen === 'Y' ? 0 : 1, sceneOpenFlag: v.isOpen === 'Y' ? 0 : 1,
scene: v.sceneType scene: v.sceneType
}) })
...@@ -112,40 +116,40 @@ export default { ...@@ -112,40 +116,40 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.scene-box{ .scene-box {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 15px; gap: 15px;
.scene-item{ .scene-item {
display: flex; display: flex;
align-items: center; align-items: center;
width: 343px; width: 343px;
background: #F4F5FA; background: #f4f5fa;
border-radius: 12px; border-radius: 12px;
padding: 16px; padding: 16px;
box-sizing: border-box; box-sizing: border-box;
.scene-image{ .scene-image {
width: 64px; width: 64px;
height: 64px; height: 64px;
margin-right: 12px; margin-right: 12px;
} }
.item-text{ .item-text {
.text-name{ .text-name {
font-size: 16px; font-size: 16px;
color: #333333; color: #333333;
font-weight: 500; font-weight: 500;
} }
.text-tips{ .text-tips {
margin-top: 5px; margin-top: 5px;
font-size: 12px; font-size: 12px;
color: #9B9B9E; color: #9b9b9e;
font-weight: 400; font-weight: 400;
} }
} }
.switch-box{ .switch-box {
flex-grow: 1; flex-grow: 1;
text-align: right; text-align: right;
.switch-text{ .switch-text {
margin-top: 5px; margin-top: 5px;
font-size: 12px; font-size: 12px;
color: #2a58ad; color: #2a58ad;
...@@ -162,7 +166,6 @@ export default { ...@@ -162,7 +166,6 @@ export default {
::v-deep .el-switch__label--right { ::v-deep .el-switch__label--right {
z-index: 1; z-index: 1;
right: 20px; right: 20px;
} }
/*关闭时文字位置设置*/ /*关闭时文字位置设置*/
::v-deep .el-switch__label--left { ::v-deep .el-switch__label--left {
...@@ -171,16 +174,16 @@ export default { ...@@ -171,16 +174,16 @@ export default {
} }
::v-deep .el-switch__label--left.is-active { ::v-deep .el-switch__label--left.is-active {
display: block; display: block;
span{ span {
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
} }
} }
::v-deep .el-switch__label--right.is-active { ::v-deep .el-switch__label--right.is-active {
display: block; display: block;
span{ span {
font-size: 12px; font-size: 12px;
color: #FFFFFF; color: #ffffff;
} }
} }
</style> </style>
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
@confirmDialog="handleAddConfirm"> @confirmDialog="handleAddConfirm">
<!-- btnOkLabel="下载二维码" --> <!-- btnOkLabel="下载二维码" -->
<div class="dialogContainer"> <div class="dialogContainer">
<p class="merchantName">{{ merchantInfo.yqMerchantName }}</p> <p class="merchantName">{{ merchantInfo.merchantName }}</p>
<p class="merchantId">{{ merchantInfo.yqMerchantId }}</p> <p class="merchantId">{{ merchantInfo.merchantId }}</p>
<el-form :model="formData" <el-form :model="formData"
:rules="rules" :rules="rules"
ref="elForm"> ref="elForm">
...@@ -148,7 +148,7 @@ export default { ...@@ -148,7 +148,7 @@ export default {
methods: { methods: {
yqMerchantConfigDetail() { yqMerchantConfigDetail() {
// let parmas = this.merchantInfo.merchantId // let parmas = this.merchantInfo.merchantId
yqMerchantConfigDetail({ yqMerchantId: this.merchantInfo.yqMerchantId }).then((result) => { yqMerchantConfigDetail({ yqMerchantId: this.merchantInfo.merchantId }).then((result) => {
console.log(result) console.log(result)
const { workWechatQrcode, qrcodeType } = result const { workWechatQrcode, qrcodeType } = result
this.imgUrl = workWechatQrcode this.imgUrl = workWechatQrcode
...@@ -167,7 +167,7 @@ export default { ...@@ -167,7 +167,7 @@ export default {
// return // return
if (valid) { if (valid) {
const params = { const params = {
yqMerchantId: this.merchantInfo.yqMerchantId, yqMerchantId: this.merchantInfo.merchantId,
...this.formData ...this.formData
} }
const result = await serviceMerchantRelateQrcode(params) const result = await serviceMerchantRelateQrcode(params)
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<template> <template>
<d2-container class="service-manage"> <d2-container class="service-manage">
<div class="header" slot="header"> <div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData" /> <d2-search ref="showSearch" class="show-search" label-width="100px" :search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary"> <el-button :id="tableParams.btnId" size="small" type="primary">
查询 查询
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { getYqMerchantConfig } from '@api/serviceManage' import { getYqMerchantinfoPage } from '@api/serviceManage'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { BaseData, manageTypeList } from '@/common/constants.js' import { BaseData, manageTypeList } from '@/common/constants.js'
import qrcodeDialog from './qRcodeDialog' import qrcodeDialog from './qRcodeDialog'
...@@ -47,12 +48,13 @@ export default { ...@@ -47,12 +48,13 @@ export default {
merchantNameKeyWord: '', merchantNameKeyWord: '',
merchantIdKeyWord: '', merchantIdKeyWord: '',
yqMerchantName: '', yqMerchantName: '',
accountName: '' accountName: '',
yqCode: ''
}, },
showFormData: [ showFormData: [
{ {
label: '园区店号', label: '园区店号',
name: 'yqMerchantId', name: 'merchantId',
type: 'input', type: 'input',
placeholder: '请输入园区店号', placeholder: '请输入园区店号',
isClear: true, isClear: true,
...@@ -71,7 +73,7 @@ export default { ...@@ -71,7 +73,7 @@ export default {
// }, // },
{ {
label: '园区店名', label: '园区店名',
name: 'yqMerchantName', name: 'merchantName',
type: 'input', type: 'input',
placeholder: '请输入园区店名', placeholder: '请输入园区店名',
isClear: true, isClear: true,
...@@ -84,10 +86,18 @@ export default { ...@@ -84,10 +86,18 @@ export default {
placeholder: '请输入登录账户', placeholder: '请输入登录账户',
isClear: true, isClear: true,
keyFn: this.keyDowmGetList keyFn: this.keyDowmGetList
},
{
label: '园区店编码',
name: 'yqCode',
type: 'input',
isClear: true,
maxlength: '50',
keyFn: this.keyDowmGetList
} }
], ],
maxLength: 10, maxLength: 10,
getListApi: getYqMerchantConfig, getListApi: getYqMerchantinfoPage,
// 表格参数 // 表格参数
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
...@@ -96,16 +106,16 @@ export default { ...@@ -96,16 +106,16 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '园区店名称', label: '园区店名称',
prop: 'yqMerchantName' prop: 'merchantName'
},
{
label: '园区店编码',
prop: 'yqCode'
},
{
label: '园区店号',
prop: 'merchantId'
}, },
// {
// label: '类型',
// prop: 'merchantType',
// formatter: (cellValue) => {
// // return this.baseData.merchantTypeList.find(item => item.confId === cellValue.merchantType) ? this.baseData.merchantTypeList.find(item => item.confId === cellValue.merchantType).confLabel : ''
// return this.baseData.merchantTypeOpts[cellValue.merchantType]
// }
// },
{ {
label: '模式', label: '模式',
prop: '', prop: '',
...@@ -125,10 +135,7 @@ export default { ...@@ -125,10 +135,7 @@ export default {
label: '主服务商', label: '主服务商',
prop: 'partnerMerchantName' prop: 'partnerMerchantName'
}, },
{
label: '园区店号',
prop: 'yqMerchantId'
},
{ {
label: '登录账户', label: '登录账户',
prop: 'accountName' prop: 'accountName'
...@@ -237,7 +244,8 @@ export default { ...@@ -237,7 +244,8 @@ export default {
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
merchantNameKeyWord: '', merchantNameKeyWord: '',
merchantIdKeyWord: '' merchantIdKeyWord: '',
yqCode: ''
} }
this.$refs.serviceStoreTable.refreshTable() this.$refs.serviceStoreTable.refreshTable()
}, },
...@@ -246,7 +254,7 @@ export default { ...@@ -246,7 +254,7 @@ export default {
handleDetail(row) { handleDetail(row) {
this.$router.push({ this.$router.push({
name: 'yqStoreDetail', name: 'yqStoreDetail',
query: { yqMerchantId: row.yqMerchantId } query: { yqMerchantId: row.merchantId }
}) })
}, },
...@@ -287,6 +295,22 @@ export default { ...@@ -287,6 +295,22 @@ export default {
sceneDialogClose() { sceneDialogClose() {
this.sceneEntryVisible = !this.sceneEntryVisible this.sceneEntryVisible = !this.sceneEntryVisible
},
// 上架
handleLaunch(row) {
this.$router.push({
name: 'editLaunch',
query: { id: row.id }
})
},
// 上架记录
handleLaunchRecord(row) {
this.$router.push({
name: 'launchRecord',
query: { merchantId: row.merchantId }
})
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!