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 1508 additions and 445 deletions
......@@ -57,3 +57,42 @@ export function isexistdata(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) {
return request(data, "post")
}
// 发货签收单
export function deliveryPdf(data) {
data.method = "dj.api.smarcarlife.warehousedeliver.detail.pdf"
return request(data, "post")
}
// 发货单 - 发货签收单
// export function orderDeliverySign(data) {
// data.method = "dj.api.smarcarlife.purchaseOrder.delivery.sign"
......
......@@ -234,6 +234,12 @@ export function getResidentListApi(data) {
return request(data, "post")
}
// 分页查询园区店员工列表(可增加特殊门店列表)
export function getEmployee(data) {
data.method = `dj.api.employee.yq.page`
return request(data, "post")
}
// 导入员工修订工资
export function importStaffSalaryApi(data) {
data.method = `${path2}staffMonthSalary.staffSalary.import`
......@@ -592,3 +598,8 @@ export function addBatchPermissions(data) {
data.method = `dj.api.smartcarlife.qdhc.staff.permissions.batch.authorization`
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) {
return request(data, "post")
}
// 获取园区店列表
// // 获取园区店列表
export function getYqMerchantConfig(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.page`
return request(data, "GET")
}
export function getYqMerchantinfoPage(data) {
data.method = `dj.api.smarcarlife.yqMerchantInfo.page`
return request(data, "GET")
}
// 获取园区店列表-获取园区店配置项
export function GETYQMERCHANTCONFIGDETAIL(data) {
......@@ -120,12 +124,12 @@ export function searchServiceMerchant(data) {
return request(data, "post")
}
/**根据4s店商户号查找员工设备列表 */
/** 根据4s店商户号查找员工设备列表 */
export function getMerchantEmployeeList(data) {
data.method = "dj.api.mindworkplate.badge.findPhoneListByShopMerchantNo"
return request(data, "post")
}
/**获取阿里云token */
/** 获取阿里云token */
export function getAliOSSToken(data = {}) {
data.method = "dj.api.mindworkplate.badge.getToken"
return request(data, "post")
......@@ -141,3 +145,33 @@ export function setDefaultPaymentChannel(data) {
data.method = "dj.api.serviceMerchant.setDefaultPaymentChannel"
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 = [
{
confId: "technicianConstructionOrder",
confValue: "轻改技师施工单月度汇总表"
}
},
{ confId: "yqMerchantGrossProfitReport", confValue: "园区店毛利报表" }
]
// 下载报表 业务类型
......@@ -1481,3 +1482,43 @@ export const scheduling_inviteStatus = [
{ confId: 6, 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 @@
:option-config="item.optionConfig"
:base-data="baseData"
@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 slot-scope="scope">
<slot v-if="item.addHtml"
......@@ -343,6 +344,12 @@ export default {
},
methods: {
// 表头加图标
handleHeaderBatch(currentItem) {
if (currentItem.headerImgObj.fn) {
currentItem.headerImgObj.fn(currentItem)
}
},
// 排序
sortChange({ column, prop, order }) {
this.sortColum = order ? prop : ""
......
......@@ -117,7 +117,7 @@ export default {
.el-dialog__footer {
border-top: 1px solid #e5e5e5 !important;
.el-button {
width: 70px;
width: 80px;
}
}
}
......
......@@ -305,6 +305,32 @@ export const routerName = {
parentId: "90608",
label: "场景入口",
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")
......@@ -321,6 +347,30 @@ export const routerName = {
},
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: {
path: "/accountList_new",
......@@ -1339,6 +1389,18 @@ export const routerName = {
parentId: "90630",
label: "自定义周期",
handle: "handleCustomize"
},
{
authId: "9063004",
parentId: "90630",
label: "导入更新",
handle: "handleImport"
},
{
authId: "9063005",
parentId: "90630",
label: "推送",
handle: "handlePush"
}
],
component: _import("systemConfig/downloadReportManage/index")
......
......@@ -928,6 +928,7 @@ export default {
// 上传文件,转码为base64
importFile(e) {
console.log('e', e)
const size = e.target.files[0].size / 1024 / 1024
if (size < 10) {
this.$set(this.fileForm, 'fileName', e.target.files[0].name)
......
......@@ -4,7 +4,7 @@
<div class="edit-order-dialog" v-if="dialogShow">
<div class="table-class">
<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-option v-for="item in staffList" :key="item.uuid" :label="item.staffName" :value="item.uuid">
</el-option>
......@@ -26,9 +26,9 @@
</el-tooltip>
<div v-else>-</div>
</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>
</template>
</div>
</d2-table>
</div>
<div class="footer">
......@@ -38,6 +38,7 @@
</div>
</baseDialog>
<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>
</template>
......@@ -91,6 +92,26 @@ export default {
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,
dialogData: {},
deliveryCardList: [],
......@@ -169,7 +190,13 @@ export default {
label: '发货方',
prop: '',
width: 150,
addHtml: 'nowPurNum'
addHtml: 'nowPurNum',
headerImgObj: {
imgUrl: 'icon-edit2.png',
fn: () => {
this.batchDialogVisible()
}
}
},
{
label: '发货备注',
......@@ -196,6 +223,20 @@ export default {
this.getStaffList()
},
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() {
getShipperList({}).then(res => {
this.staffList = res
......
......@@ -24,7 +24,7 @@
</div> -->
<div class="table-class">
<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="
(tableList[scope.index].purchaseNumber == 0 ||
......@@ -48,7 +48,7 @@
}}
</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>
......@@ -311,6 +311,7 @@ export default {
{
label: "已发货数量",
prop: "purchaseNumber",
width: 120,
formatter: (cellValue) => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType)
? `${cellValue.purchaseNumber || 0}卷`
......@@ -320,11 +321,13 @@ export default {
{
label: "本次发货数量",
prop: "",
width: 124,
addHtml: "nowPurNum"
},
{
label: "发货卡号",
prop: "",
width: 122,
addHtml: "cardNum"
}
]
......
<!-- 发货单详情弹窗 -->
<template>
<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>
发货单号:
......@@ -51,7 +51,6 @@
</div>
</div>
<div slot="reference">
<!-- <img style="width: 14px;height: 13px;" src="./images/merchant_icon.png"> -->
<span style="color: #2A58AD;">(…{{ scope.scope.filmRollList.length }})</span>
</div>
</el-popover>
......
......@@ -12,9 +12,9 @@
<span class="phone">电话:<span class="label">{{ detailInfo[0].contactPhone }}</span></span>
<span class="address">收货地址:<span class="label">{{ detailInfo[0].contactAddress }}</span></span>
</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>
</div>
</div> -->
<div v-for="(itemList, index) in detailInfo" :key="index">
<div class="detail-info">
<div style="width: 319px;">
......@@ -31,7 +31,7 @@
</div>
<div>
<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>
<d2-table ref="recordTable" :table-data="itemList.deliveryDetailList" :table-params="tableParams" :has-page="false">
......@@ -135,6 +135,13 @@ export default {
}
},
{
label: '备注',
prop: '',
formatter: cellValue => {
return ((cellValue.deliveryRemark || '') + (cellValue.purchaseOrderRemark || '')) || '-'
}
},
{
label: '发货卡号',
prop: 'deliveryCardList',
addHtml: 'deliveryCard'
......@@ -250,8 +257,11 @@ export default {
},
handleEdit(targetItem) {
this.editData = {}
this.editData.id = targetItem.id
this.editData = {
id: targetItem.id,
deliveryNumber: targetItem.deliveryNumber,
deliveryCompany: targetItem.deliveryCompany
}
this.editDialogVisible()
},
......@@ -266,6 +276,15 @@ export default {
this.loading = false
})
},
handleSign(row) {
const params = {
id: row.orderDeliveryId
}
deliveryPdf(params).then((res) => {
console.log(res)
this.$open(res)
})
},
handleClose() {
// this.$emit('dialogClose')
......
<template>
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose">
<baseDialog :is-show.sync="dialogShow" :config="dialogConfig.setting" :dialog-config="dialogConfig.config" @closeDialog="handleDetailClose">
<div class="detail-content" v-if="dialogShow">
<div class="addressTitle">
<img src="../images/addressIcon.webp" alt="" class="icon">
......@@ -18,8 +17,7 @@
<span class="address">结束发货说明:<span class="label">{{ detailInfo.terminateDeliveryInstruction }}</span></span>
</div>
<div class="table-class">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" @refreshTable="refreshTable"
:table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
<d2-table ref="purchaseOrderDetailTable" :table-params="tableParams" @refreshTable="refreshTable" :table-data="detailInfo.tableData" :table-total="detailInfo.tableTotal">
<template slot="upgradeGoodsName" slot-scope="scope">
<div>
<img v-if="scope.scope.refundStatus == 'Y'" class="return" src="@/assets/retrun.png" alt="">
......@@ -65,16 +63,14 @@
<div class="record-div">
<div class="record-div-d" v-for="(item, index) in detailInfo.auditDetaiList" :key="index">
<span class="dot"></span>
<span class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</span><span
class="span-txt-two">
<span class="span-txt-one">{{ item.status ? $$(statusForShow, [item.status], 'text') : '' }}</span><span class="span-txt-two">
<span :class="item.status ? examineStatusClass[item.status] : ''">
{{ item.status ? $$(statusForShow, [item.status], 'status') : '' }}</span>
</span>
<span class="span-txt-two">审核人:{{ item.reviewedBy }}</span>
<span class="span-txt-two">审核时间:{{ item.reviewedDateFormat }}</span>
<span v-if="item.remark" class="span-txt-two">备注:
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark"
placement="right">
<el-tooltip class="item" popper-class="remark-popper-class" effect="dark" :content="item.remark" placement="right">
<el-button type="text">
{{ item.remark ? (item.remark.length > 15 ? (item.remark.slice(0, 15) + '...') : item.remark) : '' }}
</el-button>
......@@ -243,41 +239,41 @@ export default {
dynamicParams() {
console.log(this.paramsObj.purchaseType)
if (this.paramsObj.purchaseType == 1) {
this.tableParams.tableColumns.push(
{
label: '已发货数量',
prop: 'purchaseNumber',
width: 110,
formatter: cellValue => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`
}
},
{
label: '已入库数量',
prop: 'inputNumber',
width: 110,
formatter: cellValue => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.inputNumber}米` : `${cellValue.inputNumber}件`
}
// if (this.paramsObj.purchaseType == 1) {
this.tableParams.tableColumns.push(
{
label: '已发货数量',
prop: 'purchaseNumber',
width: 110,
formatter: cellValue => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`
}
)
} else {
this.tableParams.tableColumns.push(
{
label: '入库仓库',
prop: 'putYqMerchantName',
width: 100,
line: 1
},
{
label: '入库门店',
prop: 'putMerchantName',
width: 100,
line: 1
},
{
label: '已入库数量',
prop: 'inputNumber',
width: 110,
formatter: cellValue => {
return baseConfig.membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.inputNumber}米` : `${cellValue.inputNumber}件`
}
)
}
}
)
// } else {
// this.tableParams.tableColumns.push(
// {
// label: '入库仓库',
// prop: 'putYqMerchantName',
// width: 100,
// line: 1
// },
// {
// label: '入库门店',
// prop: 'putMerchantName',
// width: 100,
// line: 1
// }
// )
// }
if (this.paramsObj.factoryType) {
this.tableParams.tableColumns = this.tableParams.tableColumns.filter(item => item.prop != 'goodsTotalPrice')
}
......@@ -358,7 +354,7 @@ export default {
font-size: 14px;
color: #666666;
>span {
> span {
margin-right: 20px;
margin-bottom: 10px;
}
......@@ -378,7 +374,7 @@ export default {
.title {
font-weight: 500;
color: #3A3A3A;
color: #3a3a3a;
margin-bottom: 8px;
}
}
......
......@@ -37,7 +37,7 @@
</div>
<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']" />
</span>
<!-- 确认发货 -->
......@@ -398,6 +398,24 @@ export default {
beforeSearchFn() {
return new Promise(resolve => {
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()
})
},
......@@ -427,7 +445,7 @@ export default {
// delete params[key]
// }
// }
params.method = 'dj.api.smarcarlife.warehousedeliver.export.async '
params.method = 'dj.api.smarcarlife.warehousedeliver.export.async'
const list = [
...this.dowloadList,
{
......@@ -441,7 +459,10 @@ export default {
},
editClose(isRefresh) {
this.handleEditClose()
isRefresh && this.$refs.purchaseAndDeliveryTable.refreshTable()
if (isRefresh) {
this.clearMutiSelect = true
this.$refs.purchaseAndDeliveryTable.refreshTable(isRefresh)
}
},
handleEditClose() {
this.editVisible = !this.editVisible
......@@ -481,11 +502,17 @@ export default {
setTableFinishFun(data) {
this.$nextTick(() => {
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) {
this.selectedList = val
console.log(this.selectedList, 'selectedList')
// this.selectedList = val
// console.log(this.selectedList, 'selectedList')
},
// 确认发货
handleDelivery(row) {
......@@ -502,8 +529,37 @@ export default {
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() {
this.selectedList = this.getMutiDate()
if (this.selectedList.length == 0) {
this.notice.errorTips('请选择要发货的订单')
return
......
......@@ -18,9 +18,12 @@
<auth-button category="Button" />
</d2-table-header>
<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)">
<span class="one-line-ellipsis">{{ scope.columnsObj.formatter(scope.scope) }}</span>
</el-tooltip>
<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>
</el-tooltip>
<div v-else>{{ scope.columnsObj.formatter(scope.scope) }}</div>
</div>
<div slot="auth-button" slot-scope="scope">
<!-- 查看 -->
<span style="margin-right: 10px">
......@@ -31,7 +34,7 @@
<auth-button :data="scope.scope" :show-btn-ids="['9090504']" />
</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']" />
</span>
<!-- 发货签收单 -->
......@@ -52,7 +55,7 @@
<script>
import { Util, deepClone } from '@/common/util'
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 { invouceType } from '@/common/constants.js'
export default {
......@@ -308,8 +311,11 @@ export default {
this.editVisible = !this.editVisible
},
handleEdit(row) {
this.editData = {}
this.editData.id = row.id
this.editData = {
id: row.id,
deliveryNumber: row.deliveryNumber,
deliveryCompany: row.deliveryCompany
}
this.editDialogVisible()
},
handleEditConfirm() {
......@@ -326,7 +332,7 @@ export default {
const params = {
id: row.id
}
exportTable(params).then((res) => {
deliveryPdf(params).then((res) => {
console.log(res)
this.$open(res)
})
......
......@@ -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-form-item>
</el-form>
<p style="margin-left: 150px; color: #999999;">
说明:驳回后,整个采购订单进行驳回,无法再重新进行发货操作。
</p>
</div>
<!-- <div class="footer">
<el-button @click="handleRejectClose">取消</el-button>
......@@ -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-form-item>
</el-form>
<p style="margin-left: 150px">
说明:结束发货后,订单发货完结,无法再重新进行发货操作。是否确定结束发货
<p style="margin-left: 150px; color: #999999;">
说明:结束发货后,整个采购订单发货完结,无法再重新进行发货操作。
</p>
</div>
<!-- <div class="footer">
......@@ -155,7 +158,7 @@ export default {
// ]
},
config: {
title: "驳回提示",
title: "驳回",
width: "750px"
}
},
......@@ -366,7 +369,11 @@ export default {
},
{
label: "已发货数量",
prop: "purchaseNumber"
width: 100,
prop: "purchaseNumber",
formatter: (cellValue) => {
return cellValue.purchaseNumber
}
},
{
label: "采购总价",
......@@ -492,7 +499,16 @@ export default {
},
{
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: "发货方",
......@@ -583,6 +599,24 @@ export default {
beforeSearchFn() {
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()
resolve()
})
......@@ -647,7 +681,10 @@ export default {
},
editClose(isRefresh) {
this.handleDetailClose()
isRefresh && this.$refs.purchaseAndDeliveryTable.refreshTable()
if (isRefresh) {
this.clearMutiSelect = true
this.$refs.purchaseAndDeliveryTable.refreshTable(isRefresh)
}
},
handleDetailClose() {
this.editVisible = !this.editVisible
......@@ -678,6 +715,7 @@ export default {
},
// 批量分配
handleBatchAllocat() {
this.selectedList = this.getMutiDate()
if (this.selectedList.length == 0) {
this.notice.errorTips('请选择要发货的订单')
return true
......@@ -696,27 +734,63 @@ export default {
},
allocateClose(isRefresh) {
this.handleAllocateClose()
isRefresh && this.$refs.purchaseAndDeliveryTable.refreshTable()
if (isRefresh) {
this.clearMutiSelect = true
this.$refs.purchaseAndDeliveryTable.refreshTable(isRefresh)
}
},
handleAllocateClose() {
this.allocateVisible = !this.allocateVisible
},
// recoverySelection(list) {
// var exitIds = this.selectedList.map((item) => item.id)
// console.log(exitIds)
// list.forEach((item) => {
// console.log(item.id, "item.id")
// exitIds.includes(item.id) &&
// this.$refs.purchaseAndDeliveryTable.$refs.deliveryIdMutiTable.toggleRowSelection(
// item,
// true
// )
// })
// },
recoverySelection(list) {
// var exitIds = this.selectedList.map((item) => item.id)
// console.log(exitIds)
// list.forEach((item) => {
// console.log(item.id, "item.id")
// exitIds.includes(item.id) &&
// this.$refs.purchaseAndDeliveryTable.$refs.deliveryIdMutiTable.toggleRowSelection(
// item,
// 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) {
this.$nextTick(() => {
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) {
......@@ -724,7 +798,7 @@ export default {
},
handleSelectionTable(val) {
this.selectedList = val
// this.selectedList = val
// console.log(val)
// var list = val
// const currentSelectIds = val.map(item => item.id)
......@@ -742,7 +816,7 @@ export default {
// }
// })
// this.selectedList = list
console.log(this.selectedList, 'selectedList')
// console.log(this.selectedList, 'selectedList')
},
// 确认发货
handleDelivery(row) {
......@@ -757,6 +831,7 @@ export default {
// 批量发货
handleBatchDelivery() {
// console.log(this.$refs.purchaseAndDeliveryTable.mutiSelectArr.deliveryList)
this.selectedList = this.getMutiDate()
if (this.selectedList.length == 0) {
this.notice.errorTips('请选择要发货的订单')
return
......
<!-- 权限管理 -->
<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">
<div class="content">
<el-form ref="form" :model="form" :rules="rules" label-suffix=":" label-width="140px">
......@@ -8,7 +8,8 @@
<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"
: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-select>
</el-form-item>
......@@ -24,7 +25,7 @@
</template>
<script>
import { getResidentListApi, getPermissionsList, addBatchPermissions } from "@api/resident"
import { getResidentListApi, getPermissionsList, addBatchPermissions, getEmployee } from "@api/resident"
import { deepClone } from '@/common/util'
import { merchantClassifyList } from '@/common/constants'
export default {
......@@ -33,35 +34,35 @@ export default {
return {
merchantClassifyList,
optionsSelectList: [
{
name: "预约客户",
code: 'YUYUEKEHU'
},
{
// 创建施工单 CHUANGJIANSHIGONGDAN
name: "创建施工单",
code: "CHUANGJIANSHIGONGDAN"
},
// 施工确认 SHIGONGQUEREN
{
name: "施工确认",
code: "SHIGONGQUEREN"
},
// 物料出库 WULIAOCHUKU
{
name: "物料出库",
code: "WULIAOCHUKU"
},
// 完成施工 WANCHENGSHIGONG
{
name: "完成施工",
code: "WANCHENGSHIGONG"
},
// 审核施工单 SHENHESHIGONGDAN
{
name: "审核施工单",
code: "SHENHESHIGONGDAN"
}
// {
// name: "预约客户",
// code: 'YUYUEKEHU'
// },
// {
// // 创建施工单 CHUANGJIANSHIGONGDAN
// name: "创建施工单",
// code: "CHUANGJIANSHIGONGDAN"
// },
// // 施工确认 SHIGONGQUEREN
// {
// name: "施工确认",
// code: "SHIGONGQUEREN"
// },
// // 物料出库 WULIAOCHUKU
// {
// name: "物料出库",
// code: "WULIAOCHUKU"
// },
// // 完成施工 WANCHENGSHIGONG
// {
// name: "完成施工",
// code: "WANCHENGSHIGONG"
// },
// // 审核施工单 SHENHESHIGONGDAN
// {
// name: "审核施工单",
// code: "SHENHESHIGONGDAN"
// }
],
userInfo: this.$store.state.d2admin.user.info,
......@@ -117,14 +118,14 @@ export default {
getPermissionsList({
}).then(res => {
console.log(res, 'getPermissionsList')
this.optionsSelectList = res.list
this.optionsSelectList = res
}).catch((err) => {
console.log(err)
})
},
getResidentList() {
getResidentListApi({
pageSize: 10,
getEmployee({
pageSize: 20,
currentPage: 1
}).then(res => {
console.log(res)
......@@ -141,14 +142,14 @@ export default {
this.form.checkList.forEach(item => {
acc.push({
staffPhone: cur.staffPhone,
permissionId: JSON.parse(item).code
permissionId: JSON.parse(item).id
})
})
return acc
}, [])
var params = {
private: 1,
list
type: 1,
relations: list
}
addBatchPermissions(params).then(res => {
this.notice.okTips('新增成功')
......@@ -175,8 +176,8 @@ export default {
this.loading = true
setTimeout(() => {
this.loading = false
var params = { currentPage: 1, pageSize: 100, staffName: queryString, }
getResidentListApi(params).then(res => {
var params = { currentPage: 1, pageSize: 100, staffName: queryString }
getEmployee(params).then(res => {
const list = this.form.staffIds || []
const options = [...list, ...res.list || []]
// // 对数据对象去重过滤
......@@ -275,4 +276,8 @@ export default {
font-size: 12px;
color: #666666;
}
.option {
width: 26%;
}
</style>
......@@ -68,7 +68,7 @@
<span>
<el-checkbox-group v-model="checkList">
<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>
</span>
</div>
......@@ -456,6 +456,7 @@
</template>
<script>
import { limitPrice } from "@/common/format"
import dayjs from "dayjs"
import allocateStoreDialog from "./allocateStoreDialog.vue"
......@@ -472,7 +473,10 @@ import {
merchantListByYqMerchantApi,
addStaffDailyReportConfigApi,
updateStaffDailyReportConfigApi,
deleteStaffDailyReportConfigApi
deleteStaffDailyReportConfigApi,
addBatchPermissions,
getPermissionsList,
getPermissionsByPhone
} from "@api/resident"
import { isEmpty, filterStr } from "../util.js"
export default {
......@@ -492,36 +496,35 @@ export default {
isEmpty,
staffSceneLabelList: staffSceneLabelList,
optionsSelectList: [
{
name: "预约客户",
code: 'YUYUEKEHU'
},
{
// 创建施工单 CHUANGJIANSHIGONGDAN
name: "创建施工单",
code: "CHUANGJIANSHIGONGDAN"
},
// 施工确认 SHIGONGQUEREN
{
name: "施工确认",
code: "SHIGONGQUEREN"
},
// 物料出库 WULIAOCHUKU
{
name: "物料出库",
code: "WULIAOCHUKU"
},
// 完成施工 WANCHENGSHIGONG
{
name: "完成施工",
code: "WANCHENGSHIGONG"
},
// 审核施工单 SHENHESHIGONGDAN
{
name: "审核施工单",
code: "SHENHESHIGONGDAN"
}
// {
// name: "预约客户",
// code: 'YUYUEKEHU'
// },
// {
// // 创建施工单 CHUANGJIANSHIGONGDAN
// name: "创建施工单",
// code: "CHUANGJIANSHIGONGDAN"
// },
// // 施工确认 SHIGONGQUEREN
// {
// name: "施工确认",
// code: "SHIGONGQUEREN"
// },
// // 物料出库 WULIAOCHUKU
// {
// name: "物料出库",
// code: "WULIAOCHUKU"
// },
// // 完成施工 WANCHENGSHIGONG
// {
// name: "完成施工",
// code: "WANCHENGSHIGONG"
// },
// // 审核施工单 SHENHESHIGONGDAN
// {
// name: "审核施工单",
// code: "SHENHESHIGONGDAN"
// }
],
info: {},
checkList: [],
......@@ -735,33 +738,92 @@ export default {
this.jobTypeList = this.externalLevelList
this.tempjobTypeList = this.tempExternalLevelList
}
// this.getPermissionsList()
this.getPermissionsList()
this.getPermissionsByPhone()
},
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) {
if (checked) {
console.log('勾选了:', item)
this.onItemSelected(item)
} else {
console.log('取消勾选了:', item)
this.onItemDeselected(item)
// console.log(item, checked, 'handleSingleChange')
const params = {
type: 2
}
let relations = this.checkList.reduce((acc, cur) => {
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) {
// 处理勾选逻辑
console.log('处理勾选:', item)
},
// onItemSelected(item) {
// // 处理勾选逻辑
// console.log('处理勾选:', item)
// },
onItemDeselected(item) {
// 处理取消勾选逻辑
console.log('处理取消勾选:', item)
},
// onItemDeselected(item) {
// // 处理取消勾选逻辑
// console.log('处理取消勾选:', item)
// },
getPermissionsList() {
getPermissionsList({
}).then(res => {
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) => {
console.log(err)
})
......@@ -1145,7 +1207,7 @@ export default {
return new Promise((resolve, reject) => {
this.$refs["staffInfoForm"]?.validate((valid) => {
if (valid) {
let params = {
const params = {
staffPhone: this.detail.staffPhone,
entryTime: new Date(this.detail.entryTime),
hireType: this.detail.hireType || this.detail.hireType,
......@@ -1183,6 +1245,7 @@ export default {
: this.detail.performanceSalary || 0
: this.detail.performSalary || 0
}
this.handleSingleChange()
editStaffApi(params).then((res) => {
if (res) {
// 修改扣款配置项数据
......
......@@ -2,7 +2,11 @@
<template>
<div>
<d2-container>
<div class="header" slot="header" style="padding: 10px 20px">
<div
class="header"
slot="header"
style="padding: 10px 20px"
>
<d2-search
ref="showSearch"
class="show-search"
......@@ -10,10 +14,17 @@
:form-data="showFormData"
/>
<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 size="small" @click="handleReset"> 重置 </el-button>
<el-button
size="small"
@click="handleReset"
> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
......@@ -23,7 +34,10 @@
<auth-button category="Button"
:show-btn-ids="['9080501']" />
</span> -->
<auth-button category="Button" :show-btn-ids="['9080502']" />
<auth-button
category="Button"
:show-btn-ids="['9080502']"
/>
</d2-table-header>
<d2-table
ref="recordTable"
......@@ -66,7 +80,7 @@ export default {
components: {
allocationDetailDialog
},
data() {
data () {
return {
userInfo: this.$store.state.d2admin.user.info,
searchForm: {
......@@ -170,9 +184,9 @@ export default {
formatter: (cellValue) => {
return cellValue.allocateTime
? Util.dateFormate(
cellValue.allocateTime,
"YYYY-MM-DD HH:mm:ss"
)
cellValue.allocateTime,
"YYYY-MM-DD HH:mm:ss"
)
: ""
}
},
......@@ -227,7 +241,7 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
mounted () {
// this.getBaseData()
// 获取全部类目
getProductTypeBySceneId({ sceneType: "" }).then((res) => {
......@@ -259,7 +273,7 @@ export default {
// this.getOptionsList()
// },
beforeSearchFn() {
beforeSearchFn () {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.allocateTime) {
......@@ -278,13 +292,13 @@ export default {
})
},
getOptionsList() {
getOptionsList () {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {}
......@@ -302,7 +316,7 @@ export default {
},
// 获取仓库门店
getServicemerchantrefList(merchantId, type) {
getServicemerchantrefList (merchantId, type) {
getServicemerchantrefList({
yqMerchantId: merchantId
}).then((res) => {
......@@ -335,7 +349,7 @@ export default {
// handleSearch() {
// this.$refs.recordTable.refreshTable()
// },
handleReset() {
handleReset () {
this.searchForm = {
allocateTime: "",
allocateCode: "",
......@@ -350,7 +364,8 @@ export default {
this.$refs.recordTable.refreshTable()
},
handleExport() {
async handleExport () {
await this.beforeSearchFn()
var params = this.searchFormSearch
params.method = "dj.smartcarlife.api.stock.allocate.export.async"
const list = [
......@@ -366,16 +381,16 @@ export default {
},
// 查看
look(row) {
look (row) {
this.recordInfo = row
this.allocationDetailVisible = true
},
gotoAdd() {
gotoAdd () {
this.$router.push({ name: "addAllocation" })
},
dialogClose(flag) {
dialogClose (flag) {
this.allocationDetailVisible = !this.allocationDetailVisible
}
}
......
......@@ -2,7 +2,11 @@
<template>
<div>
<d2-container>
<div class="header" slot="header" style="padding: 10px 20px">
<div
class="header"
slot="header"
style="padding: 10px 20px"
>
<d2-search
ref="showSearch"
class="show-search"
......@@ -10,10 +14,17 @@
:form-data="showFormData"
/>
<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 size="small" @click="handleReset"> 重置 </el-button>
<el-button
size="small"
@click="handleReset"
> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
......@@ -23,7 +34,10 @@
<auth-button category="Button"
:show-btn-ids="['9080401']" />
</span> -->
<auth-button category="Button" :show-btn-ids="['9080402']" />
<auth-button
category="Button"
:show-btn-ids="['9080402']"
/>
</d2-table-header>
<d2-table
ref="recordTable"
......@@ -32,7 +46,11 @@
:table-params="tableParams"
: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
class="pro-img"
:src="scope.scope.voucherPic"
......@@ -55,8 +73,15 @@
@dialogClose="dialogClose"
/>
<!-- 预览图片 -->
<el-dialog :visible="imgVisible" :before-close="handleCloseImg">
<img width="100%" :src="previewImgUrl" alt="图片" />
<el-dialog
:visible="imgVisible"
:before-close="handleCloseImg"
>
<img
width="100%"
:src="previewImgUrl"
alt="图片"
/>
</el-dialog>
</div>
</template>
......@@ -76,7 +101,7 @@ export default {
components: {
inventoryDetailDialog
},
data() {
data () {
return {
userInfo: this.$store.state.d2admin.user.info,
searchForm: {
......@@ -197,7 +222,7 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
mounted () {
// this.getBaseData()
// 获取全部类目
getProductTypeBySceneId({ sceneType: "" }).then((res) => {
......@@ -223,7 +248,7 @@ export default {
// this.getOptionsList()
// },
beforeSearchFn() {
beforeSearchFn () {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.checkTime) {
......@@ -240,13 +265,13 @@ export default {
})
},
getOptionsList() {
getOptionsList () {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {}
......@@ -264,7 +289,7 @@ export default {
},
// 获取仓库门店
getServicemerchantrefList(merchantId) {
getServicemerchantrefList (merchantId) {
getServicemerchantrefList({
yqMerchantId: merchantId
}).then((res) => {
......@@ -283,7 +308,7 @@ export default {
// handleSearch() {
// this.$refs.recordTable.refreshTable()
// },
handleReset() {
handleReset () {
this.searchForm = {
checkTime: "",
checkCode: "",
......@@ -295,12 +320,13 @@ export default {
this.$refs.recordTable.refreshTable()
},
gotoAdd() {
gotoAdd () {
// this.close({ tagName: '/orderList' })
this.$router.push({ name: "addInventory" })
},
handleExport() {
async handleExport () {
await this.beforeSearchFn()
var params = this.searchFormSearch
params.method = "dj.smartcarlife.api.stock.check.export.async"
const list = [
......@@ -316,23 +342,23 @@ export default {
},
// 查看
look(row) {
look (row) {
this.recordInfo = row
this.inventoryDetailVisible = true
},
dialogClose(flag) {
dialogClose (flag) {
this.inventoryDetailVisible = !this.inventoryDetailVisible
},
handleEnlargeImg(url) {
handleEnlargeImg (url) {
if (url) {
this.previewImgUrl = url
this.imgVisible = !this.imgVisible
}
},
handleCloseImg() {
handleCloseImg () {
this.imgVisible = !this.imgVisible
}
}
......
......@@ -2,63 +2,83 @@
<template>
<div>
<d2-container>
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData">
<div
class="header"
slot="header"
style="padding: 10px 20px;"
>
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData"
>
<template slot="filmRollNo">
<el-input :style="{ width: '100%'}"
placeholder="请输入膜卷号"
v-model.trim="searchForm['filmRollNo']"
:clearable="true"
:maxlength="50"
@input="filmRollNoInput" />
<el-input
:style="{ width: '100%'}"
placeholder="请输入膜卷号"
v-model.trim="searchForm['filmRollNo']"
:clearable="true"
:maxlength="50"
@input="filmRollNoInput"
/>
</template>
</d2-search>
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
<el-button
@click="handleSearch"
size="small"
type="primary"
>
查询
</el-button>
<el-button size="small"
@click="handleReset">
<el-button
size="small"
@click="handleReset"
>
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left"
class="leftSpan">合计:出库数量<span
class="count-txt">{{ statisticsData.totalReduceStockNum }}</span>,出库金额<span
class="count-txt">¥{{ statisticsData.totalReduceStockMoney }}</span></span>
<span
slot="left"
class="leftSpan"
>合计:出库数量<span class="count-txt">{{ statisticsData.totalReduceStockNum }}</span>,出库金额<span class="count-txt">¥{{ statisticsData.totalReduceStockMoney }}</span></span>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<template slot="auth-button"
slot-scope="scope">
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<template
slot="auth-button"
slot-scope="scope"
>
<!-- 关联技师 -->
<span style="margin-right: 10px;"
v-if="scope.scope.subOrderStatus != 2">
<auth-button :data="scope.scope"
:show-btn-ids="['9080302']" />
<span
style="margin-right: 10px;"
v-if="scope.scope.subOrderStatus != 2"
>
<auth-button
:data="scope.scope"
:show-btn-ids="['9080302']"
/>
</span>
</template>
</d2-table>
</div>
<!-- 关联技师 -->
<correlationDialog :visible.sync="corrVisible"
v-if="corrVisible"
:params-obj="recordInfo"
@dialogClose="closeCorrDialog" />
<correlationDialog
:visible.sync="corrVisible"
v-if="corrVisible"
:params-obj="recordInfo"
@dialogClose="closeCorrDialog"
/>
</d2-container>
</div>
</template>
......@@ -77,7 +97,7 @@ export default {
components: {
correlationDialog
},
data() {
data () {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList,
......@@ -337,7 +357,7 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
mounted () {
// this.getBaseData()
// 获取全部类目
getProductTypeBySceneId({ sceneType: '' }).then(res => {
......@@ -367,21 +387,21 @@ export default {
// },
// 输入膜卷号
filmRollNoInput(e) {
filmRollNoInput (e) {
if (!/^[a-zA-Z0-9]*$/.test(e)) {
this.searchForm.filmRollNo = e.replace(/[^a-zA-Z0-9]/g, '')
}
},
// 出库记录列表统计
stockReduceRecordCount() {
stockReduceRecordCount () {
stockReduceRecordCount(this.searchFormSearch).then(res => {
this.statisticsData = res
})
},
// 获取仓库门店
getServicemerchantrefList(merchantId) {
getServicemerchantrefList (merchantId) {
getServicemerchantrefList({
yqMerchantId: merchantId
}).then(res => {
......@@ -395,7 +415,7 @@ export default {
})
},
beforeSearchFn() {
beforeSearchFn () {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.reduceDate) {
......@@ -407,7 +427,7 @@ export default {
})
},
getOptionsList() {
getOptionsList () {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
......@@ -421,11 +441,11 @@ export default {
})
},
handleSearch() {
handleSearch () {
this.$refs.recordTable.refreshTable(true, true)
this.stockReduceRecordCount()
},
handleReset() {
handleReset () {
this.searchForm = {
reduceDate: '',
eventType: '',
......@@ -442,7 +462,8 @@ export default {
this.stockReduceRecordCount()
},
handleExport() {
async handleExport () {
await this.beforeSearchFn()
var params = this.searchFormSearch
params.method = 'dj.api.smartcarlife.MerchantGoodsStockReduceRecord.export.async'
const list = [
......@@ -458,7 +479,7 @@ export default {
},
// 查询领料技师
getRoleTechnicianList() {
getRoleTechnicianList () {
const params = {}
// params.yqMerchantId = this.userInfo.merchant.merchantId
getRoleTechnician(params).then(res => {
......@@ -468,12 +489,12 @@ export default {
},
// 关联技师
correlationTechnician(row) {
correlationTechnician (row) {
this.recordInfo = row
this.corrVisible = !this.corrVisible
},
closeCorrDialog(obj) {
closeCorrDialog (obj) {
console.log('obj', obj)
this.corrVisible = !this.corrVisible
if (obj.flag) {
......
......@@ -332,7 +332,8 @@ export default {
},
handleExport () {
async handleExport () {
await this.beforeSearchFn()
var params = this.searchFormSearch
params.method = "dj.smartcarlife.api.stock.refund.export"
const list = [
......
......@@ -2,57 +2,77 @@
<template>
<div>
<d2-container>
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData" />
<div
class="header"
slot="header"
style="padding: 10px 20px;"
>
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData"
/>
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
<el-button
@click="handleSearch"
size="small"
type="primary"
>
查询
</el-button>
<el-button size="small"
@click="handleReset">
<el-button
size="small"
@click="handleReset"
>
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left"
class="leftSpan">合计:当前库存<span class="count-txt">{{ statisticsData }}</span></span>
<span
slot="left"
class="leftSpan"
>合计:当前库存<span class="count-txt">{{ statisticsData }}</span></span>
<div>
<auth-button category="Button" />
</div>
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<auth-button
slot="auth-button"
slot-scope="scope"
:data="scope.scope"
/>
</d2-table>
</div>
</d2-container>
<!-- 查看 -->
<stock-month-dialog :stock-month-visible="stockMonthVisible"
:record-info="recordInfo"
v-if="stockMonthVisible"
@dialogClose="dialogClose" />
<stockDetailDialog :visible.sync="stockDetailDialogVisible"
:record-info="recordInfo"
v-if="stockDetailDialogVisible">
<stock-month-dialog
:stock-month-visible="stockMonthVisible"
:record-info="recordInfo"
v-if="stockMonthVisible"
@dialogClose="dialogClose"
/>
<stockDetailDialog
:visible.sync="stockDetailDialogVisible"
:record-info="recordInfo"
v-if="stockDetailDialogVisible"
>
</stockDetailDialog>
<statementOfAccountDialog :visible.sync="statementOfAccountDialogVisible"
v-if="statementOfAccountDialogVisible"
:yq-merchant-list="baseData.yqMerchantList"
@handleRelateProConfirm="handleRelateProConfirm">
<statementOfAccountDialog
:visible.sync="statementOfAccountDialogVisible"
v-if="statementOfAccountDialogVisible"
:yq-merchant-list="baseData.yqMerchantList"
@handleRelateProConfirm="handleRelateProConfirm"
>
</statementOfAccountDialog>
</div>
</template>
......@@ -73,7 +93,7 @@ export default {
stockDetailDialog,
statementOfAccountDialog
},
data() {
data () {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList,
......@@ -141,11 +161,11 @@ export default {
label: '商品名称',
prop: 'upgradeGoodsName',
width: '160px'
},{
}, {
label: '规格',
prop: 'specificationData',
width: '160px'
},{
}, {
label: '商品编码',
prop: 'productCode',
width: '250px'
......@@ -202,7 +222,7 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
mounted () {
// this.getBaseData()
// 获取全部类目
getProductTypeBySceneId({ sceneType: '' }).then(res => {
......@@ -231,18 +251,18 @@ export default {
// },
// 库存记录统计
stockMonthReportCount() {
stockMonthReportCount () {
stockMonthReportCount(this.searchFormSearch).then(res => {
this.statisticsData = res
})
},
// 库存对账单
handleStatementOfAccount() {
handleStatementOfAccount () {
this.statementOfAccountDialogVisible = true
},
beforeSearchFn() {
beforeSearchFn () {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.dataMonth = Util.dateFormate(new Date(), "YYYY-MM")
......@@ -251,7 +271,7 @@ export default {
})
},
getOptionsList() {
getOptionsList () {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
......@@ -265,11 +285,11 @@ export default {
})
},
handleSearch() {
handleSearch () {
this.$refs.recordTable.refreshTable(true, true)
this.stockMonthReportCount()
},
handleReset() {
handleReset () {
this.searchForm = {
upgradeGoodsName: '',
yqMerchantId: '',
......@@ -281,7 +301,7 @@ export default {
},
// 库存对账单导出
handleRelateProConfirm(data) {
handleRelateProConfirm (data) {
var params = data
params.method = 'dj.api.smartcarlife.merchantShopGoodsStock.statement.exportAsync'
console.log(params)
......@@ -299,7 +319,7 @@ export default {
this.statementOfAccountDialogVisible = false
},
handleExport() {
handleExport () {
var params = this.searchFormSearch
params.method = 'dj.api.smartcarlife.MerchantGoodsStockMonthReport.export.async'
const list = [
......@@ -315,16 +335,16 @@ export default {
},
// 查看
look(row) {
look (row) {
this.recordInfo = row
this.stockMonthVisible = true
},
handleDetail(row) {
handleDetail (row) {
this.recordInfo = row
console.log(row, 'row')
this.stockDetailDialogVisible = true
},
dialogClose(flag) {
dialogClose (flag) {
this.stockMonthVisible = !this.stockMonthVisible
// if (flag) {
// this.$refs.recordTable.refreshTable()
......
......@@ -2,50 +2,64 @@
<template>
<div>
<d2-container>
<div class="header"
slot="header"
style="padding: 10px 20px;">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData">
<div
class="header"
slot="header"
style="padding: 10px 20px;"
>
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData"
>
<template slot="filmRollNo">
<el-input :style="{ width: '100%'}"
placeholder="请输入膜卷号"
v-model.trim="searchForm['filmRollNo']"
:clearable="true"
:maxlength="50"
@input="filmRollNoInput" />
<el-input
:style="{ width: '100%'}"
placeholder="请输入膜卷号"
v-model.trim="searchForm['filmRollNo']"
:clearable="true"
:maxlength="50"
@input="filmRollNoInput"
/>
</template>
</d2-search>
<div class="up-btns">
<el-button @click="handleSearch"
size="small"
type="primary">
<el-button
@click="handleSearch"
size="small"
type="primary"
>
查询
</el-button>
<el-button size="small"
@click="handleReset">
<el-button
size="small"
@click="handleReset"
>
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left"
class="leftSpan">合计:入库数量<span
class="count-txt">{{ statisticsData.totalIncreaseStockNum }}</span>,入库金额<span
class="count-txt">¥{{ statisticsData.totalIncreaseStockMoney }}</span></span>
<span
slot="left"
class="leftSpan"
>合计:入库数量<span class="count-txt">{{ statisticsData.totalIncreaseStockNum }}</span>,入库金额<span class="count-txt">¥{{ statisticsData.totalIncreaseStockMoney }}</span></span>
<auth-button category="Button" />
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<auth-button
slot="auth-button"
slot-scope="scope"
:data="scope.scope"
/>
</d2-table>
</div>
</d2-container>
......@@ -64,7 +78,7 @@ export default {
components: {
},
data() {
data () {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList,
......@@ -195,7 +209,7 @@ export default {
label: '商品名称',
prop: 'upgradeGoodsName',
width: '160px'
}, {
}, {
label: '规格',
prop: 'specificationData',
width: '160px'
......@@ -299,7 +313,7 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
mounted () {
// this.getBaseData()
// 获取全部类目
getProductTypeBySceneId({ sceneType: '' }).then(res => {
......@@ -328,14 +342,14 @@ export default {
// },
// 输入膜卷号
filmRollNoInput(e) {
filmRollNoInput (e) {
if (!/^[a-zA-Z0-9]*$/.test(e)) {
this.searchForm.filmRollNo = e.replace(/[^a-zA-Z0-9]/g, '')
}
},
// 获取仓库门店
getServicemerchantrefList(merchantId) {
getServicemerchantrefList (merchantId) {
getServicemerchantrefList({
yqMerchantId: merchantId
}).then(res => {
......@@ -350,25 +364,25 @@ export default {
},
// 入库管理列表统计
goodsWarehousingInfoCount() {
goodsWarehousingInfoCount () {
goodsWarehousingInfoCount(this.searchFormSearch).then(res => {
this.statisticsData = res
})
},
beforeSearchFn() {
beforeSearchFn () {
return new Promise(resolve => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.increaseTime) {
this.searchFormSearch.startDate = Util.dateFormate(this.searchFormSearch.increaseTime[0], 'YYYY-MM-DD')
this.searchFormSearch.endDate = Util.dateFormate(this.searchFormSearch.increaseTime[1], 'YYYY-MM-DD')
delete this.searchFormSearch.increaseTime
}
delete this.searchFormSearch.increaseTime
resolve()
})
},
getOptionsList() {
getOptionsList () {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
......@@ -382,11 +396,11 @@ export default {
})
},
handleSearch() {
handleSearch () {
this.$refs.recordTable.refreshTable(true, true)
this.goodsWarehousingInfoCount()
},
handleReset() {
handleReset () {
this.searchForm = {
increaseTime: '',
increaseStockType: '',
......@@ -403,7 +417,8 @@ export default {
this.goodsWarehousingInfoCount()
},
handleExport() {
async handleExport () {
await this.beforeSearchFn()
var params = this.searchFormSearch
params.method = 'dj.api.life.GoodsWarehousingInfo.exportExcel.async'
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 @@
:search-form="searchFormSearch"
:table-params="tableParams"
: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"
slot-scope="scope"
v-if="scope.scope.status != -1">
......@@ -53,6 +59,18 @@
<auth-button :data="scope.scope"
:show-btn-ids="['9063003']" />
</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 v-else>
<span class="list-span">正在生成中</span>
......@@ -65,6 +83,76 @@
v-if="dateVisible"
:params-obj="recordInfo"
@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>
</div>
</template>
......@@ -78,13 +166,17 @@ import {
import {
queryAllExcel,
reportExport_download,
rebuild
rebuild,
pushMessageAndExcle,
importExcel
} from "@api/downloadReportManage"
import dateChooseDialog from "./components/dateChooseDialog"
import pushRecordDialog from "./components/pushRecordDialog"
export default {
name: "DownloadReportList",
components: {
dateChooseDialog
dateChooseDialog,
pushRecordDialog
},
data() {
return {
......@@ -139,30 +231,22 @@ export default {
{
label: "报表类型",
prop: "report_type"
// formatter: (cellValue) => {
// return downloadReportManage_reportType.find(el => el.confId == cellValue.report_type)?.confValue
// }
},
{
label: "业务类型",
prop: "business_type"
// formatter: (cellValue) => {
// return downloadReportManage_businessType.find(el => el.confId == cellValue.business_type)?.confValue
// }
},
{
label: "统计周期",
prop: "statperiod"
// formatter: (cellValue) => {
// return sceneForInStore.find(el => el.confId == o)?.confValue
// }
},
{
label: "创建时间",
prop: "created_date"
// formatter: (cellValue) => {
// return sceneForInStore.find(el => el.confId == o)?.confValue
// }
},
{
label: "推送次数",
addHtml: "pushNumHtml"
}
]
},
......@@ -175,7 +259,19 @@ export default {
)
},
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: {
......@@ -293,11 +389,112 @@ export default {
closeDateDialog() {
this.dateVisible = !this.dateVisible
// 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>
<style scoped>
<style lang="scss" scoped>
.count-txt {
font-weight: 700;
color: #2a58ad;
......@@ -315,4 +512,46 @@ export default {
font-size: 14px;
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>
<template>
<d2-dialog title="收款二维码" :is-visible="qRcodeVisible" class="qRcodeDailog" width="750px" btn-ok-label="全部下载"
@closeDialog="handleClose" @confirmDialog="handleAddConfirm">
<d2-dialog title="收款二维码"
:is-visible="qRcodeVisible"
class="qRcodeDailog"
width="750px"
btn-ok-label="全部下载"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<div class="channelBox">
<span>支付渠道: </span>
<el-select v-model="paymentChannelId" placeholder="请选择" class="elSelect">
<el-option v-for="item in paymentChannelList" :key="item.paymentChannelId" :label="item.paymentChannelName"
:value="item.paymentChannelId">
<el-select v-model="paymentChannelId"
placeholder="请选择"
class="elSelect">
<el-option v-for="item in paymentChannelList"
:key="item.paymentChannelId"
:label="item.paymentChannelName"
:value="item.paymentChannelId">
</el-option>
</el-select>
<el-button type="primary" @click="savaAll">保存并重新生成</el-button>
<el-button type="primary"
@click="savaAll">保存并重新生成</el-button>
</div>
<div class="qrcon">
<div class="wxcon">
<div class="codeDiv" id="wxview">
<img style="width:100%;height:100%" src="./images/code3.png">
<div class="codeDiv"
id="wxview">
<img style="width:100%;height:100%"
src="./images/code3.png">
<!-- 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" -->
<div v-if="!qrCodeURL" class="el-icon-loading loadingIcon" />
<div v-if="!qrCodeURL"
class="el-icon-loading loadingIcon" />
<!-- </div> -->
<div class="merchantNameDiv">{{ info.yqMerchantName }}</div>
</div>
<el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('wxview', `${info.yqMerchantName}微信支付收款码`)">下载</el-button>
<el-button style="marginTop:20px"
type="primary "
@click="takeScreenshot('wxview', `${info.yqMerchantName}微信支付收款码`)">下载</el-button>
</div>
<div class="alicon">
<div class="codeDiv" id="aliview">
<img style="width:100%;height:100%" src="./images/alipay.png">
<div class="codeDiv"
id="aliview">
<img style="width:100%;height:100%"
src="./images/alipay.png">
<!-- <img v-if="aliqrCodeURL"
class="qrImg imgs"
:src="aliqrCodeURL"
crossorigin="anonymous"> -->
<div id="qrcodeDiv" class="qrImg" />
<div id="qrcodeDiv"
class="qrImg" />
<!-- -->
<!-- :src="aliqrCodeURL"> -->
<div v-if="!aliqrCodeURL" class="el-icon-loading loadingIcon" />
<div v-if="!aliqrCodeURL"
class="el-icon-loading loadingIcon" />
<!-- </div> -->
<div class="merchantNameDiv">{{ info.yqMerchantName }}</div>
</div>
<el-button style="marginTop:20px" type="primary "
@click="takeScreenshot('aliview', `${info.yqMerchantName}支付宝支付收款码`)">下载
<el-button style="marginTop:20px"
type="primary "
@click="takeScreenshot('aliview', `${info.yqMerchantName}支付宝支付收款码`)">下载
</el-button>
</div>
</div>
......@@ -105,7 +127,7 @@ export default {
savaAll() {
setDefaultPaymentChannel({
paymentChannelId: this.paymentChannelId,
merchantId: this.info.yqMerchantId
merchantId: this.info.merchantId
})
this.createQrcodeImage()
this.alipayQrcode()
......@@ -153,7 +175,7 @@ export default {
// oParams.appId = this.paymentChannelId == '8881A96B22B84A348263EE4F314A2A23' ? 'wx06d1198e751435d1' : 'wx3d2ee7f8bda398cc'
oParams.qrcodeType = 'QR_WXA_UNLIMIT'
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 => {
this.qrCodeURL = res
......@@ -210,7 +232,7 @@ export default {
alipayQrcode() {
// const that = this
// 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(shareUrl)
setTimeout(() => {
......@@ -243,7 +265,7 @@ export default {
// const params = {
// path: baseConfig.alipayPath,
// yqMerchantId: this.info.yqMerchantId,
// yqMerchantId: this.info.merchantId ,
// yqMerchantName: this.info.yqMerchantName
// }
......
......@@ -7,8 +7,12 @@
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<div class="scene-box">
<div class="scene-item" 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="scene-item"
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="text-name">{{ item.sceneName }}</div>
<div class="text-tips">{{ item.sceneDesc }}</div>
......@@ -76,7 +80,7 @@ export default {
mounted() {
// 获取当前园区店开通的场景入口
getYqMerchantSceneConfigAPI({ yqMerchantId: this.info.yqMerchantId }).then(res => {
getYqMerchantSceneConfigAPI({ yqMerchantId: this.info.merchantId }).then(res => {
res?.forEach(val => {
this.sceneList.map(v => {
if (v.sceneType === val.scene && val.sceneOpenFlag === 0) {
......@@ -94,7 +98,7 @@ export default {
const arr = []
this.sceneList.forEach(v => {
arr.push({
merchantId: this.info.yqMerchantId,
merchantId: this.info.merchantId,
sceneOpenFlag: v.isOpen === 'Y' ? 0 : 1,
scene: v.sceneType
})
......@@ -112,40 +116,40 @@ export default {
}
</script>
<style lang="scss" scoped>
.scene-box{
.scene-box {
display: flex;
flex-wrap: wrap;
gap: 15px;
.scene-item{
.scene-item {
display: flex;
align-items: center;
width: 343px;
background: #F4F5FA;
background: #f4f5fa;
border-radius: 12px;
padding: 16px;
box-sizing: border-box;
.scene-image{
.scene-image {
width: 64px;
height: 64px;
margin-right: 12px;
}
.item-text{
.text-name{
.item-text {
.text-name {
font-size: 16px;
color: #333333;
font-weight: 500;
}
.text-tips{
.text-tips {
margin-top: 5px;
font-size: 12px;
color: #9B9B9E;
color: #9b9b9e;
font-weight: 400;
}
}
.switch-box{
.switch-box {
flex-grow: 1;
text-align: right;
.switch-text{
.switch-text {
margin-top: 5px;
font-size: 12px;
color: #2a58ad;
......@@ -162,7 +166,6 @@ export default {
::v-deep .el-switch__label--right {
z-index: 1;
right: 20px;
}
/*关闭时文字位置设置*/
::v-deep .el-switch__label--left {
......@@ -171,16 +174,16 @@ export default {
}
::v-deep .el-switch__label--left.is-active {
display: block;
span{
span {
font-size: 12px;
color: #999999;
}
}
::v-deep .el-switch__label--right.is-active {
display: block;
span{
span {
font-size: 12px;
color: #FFFFFF;
color: #ffffff;
}
}
</style>
......@@ -7,8 +7,8 @@
@confirmDialog="handleAddConfirm">
<!-- btnOkLabel="下载二维码" -->
<div class="dialogContainer">
<p class="merchantName">{{ merchantInfo.yqMerchantName }}</p>
<p class="merchantId">{{ merchantInfo.yqMerchantId }}</p>
<p class="merchantName">{{ merchantInfo.merchantName }}</p>
<p class="merchantId">{{ merchantInfo.merchantId }}</p>
<el-form :model="formData"
:rules="rules"
ref="elForm">
......@@ -148,7 +148,7 @@ export default {
methods: {
yqMerchantConfigDetail() {
// let parmas = this.merchantInfo.merchantId
yqMerchantConfigDetail({ yqMerchantId: this.merchantInfo.yqMerchantId }).then((result) => {
yqMerchantConfigDetail({ yqMerchantId: this.merchantInfo.merchantId }).then((result) => {
console.log(result)
const { workWechatQrcode, qrcodeType } = result
this.imgUrl = workWechatQrcode
......@@ -167,7 +167,7 @@ export default {
// return
if (valid) {
const params = {
yqMerchantId: this.merchantInfo.yqMerchantId,
yqMerchantId: this.merchantInfo.merchantId,
...this.formData
}
const result = await serviceMerchantRelateQrcode(params)
......
......@@ -2,7 +2,8 @@
<template>
<d2-container class="service-manage">
<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">
<el-button :id="tableParams.btnId" size="small" type="primary">
查询
......@@ -33,7 +34,7 @@
<script>
import { Util, deepClone } from '@/common/util'
import { getYqMerchantConfig } from '@api/serviceManage'
import { getYqMerchantinfoPage } from '@api/serviceManage'
import { mapActions } from 'vuex'
import { BaseData, manageTypeList } from '@/common/constants.js'
import qrcodeDialog from './qRcodeDialog'
......@@ -47,12 +48,13 @@ export default {
merchantNameKeyWord: '',
merchantIdKeyWord: '',
yqMerchantName: '',
accountName: ''
accountName: '',
yqCode: ''
},
showFormData: [
{
label: '园区店号',
name: 'yqMerchantId',
name: 'merchantId',
type: 'input',
placeholder: '请输入园区店号',
isClear: true,
......@@ -71,7 +73,7 @@ export default {
// },
{
label: '园区店名',
name: 'yqMerchantName',
name: 'merchantName',
type: 'input',
placeholder: '请输入园区店名',
isClear: true,
......@@ -84,10 +86,18 @@ export default {
placeholder: '请输入登录账户',
isClear: true,
keyFn: this.keyDowmGetList
},
{
label: '园区店编码',
name: 'yqCode',
type: 'input',
isClear: true,
maxlength: '50',
keyFn: this.keyDowmGetList
}
],
maxLength: 10,
getListApi: getYqMerchantConfig,
getListApi: getYqMerchantinfoPage,
// 表格参数
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
......@@ -96,16 +106,16 @@ export default {
tableColumns: [
{
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: '模式',
prop: '',
......@@ -125,10 +135,7 @@ export default {
label: '主服务商',
prop: 'partnerMerchantName'
},
{
label: '园区店号',
prop: 'yqMerchantId'
},
{
label: '登录账户',
prop: 'accountName'
......@@ -237,7 +244,8 @@ export default {
handleReset() {
this.searchForm = {
merchantNameKeyWord: '',
merchantIdKeyWord: ''
merchantIdKeyWord: '',
yqCode: ''
}
this.$refs.serviceStoreTable.refreshTable()
},
......@@ -246,7 +254,7 @@ export default {
handleDetail(row) {
this.$router.push({
name: 'yqStoreDetail',
query: { yqMerchantId: row.yqMerchantId }
query: { yqMerchantId: row.merchantId }
})
},
......@@ -287,6 +295,22 @@ export default {
sceneDialogClose() {
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!