Commit 7b5563e0 by 王志慧

质检管理页面样式

1 parent 9e9316b6
...@@ -60,4 +60,26 @@ export const routerName = { ...@@ -60,4 +60,26 @@ export const routerName = {
], ],
component: _import("residentManage/recepDetail") component: _import("residentManage/recepDetail")
}, },
91203: {
path: "/wordCard ",
name: "wordCard",
meta: {
title: "工牌管理",
authId: "91203",
parentId: "912",
cache: false
},
component: _import("residentManage/workCard")
},
91204: {
path: "/inspectionPoint ",
name: "inspectionPoint",
meta: {
title: "质检点管理",
authId: "91204",
parentId: "912",
cache: false
},
component: _import("residentManage/inspectionPoint")
},
} }
<!-- 工牌管理 -->
<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"
>
</d2-search>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<div class="theader">
<h2>质检点管理</h2>
</div>
<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>
</div>
</template>
<script>
import { Util, deepClone } from "@/common/util"
import { mapActions, mapState } from "vuex"
import { getProductTypeBySceneId } from "@api/product"
import {
getyqMerchantList,
getMerchantGoodsStockReduceRecord,
getServicemerchantrefList,
stockReduceRecordCount
} from "@api/stockManage"
import { upgradeFlags } from "@/common/constants.js"
import { baseConfig } from "@/main"
export default {
name: "OutboundList",
components: {},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList,
searchForm: {
reduceDate: "",
eventType: "",
upgradeGoodsName: "",
yqMerchantId: "",
merchantId: "",
goodsType: "",
businessCode: "",
goodsSeries: "",
upgradeFlag: "",
filmRollNo: ""
},
searchFormSearch: {},
searchSelectObj: {
orderOrTrade: {
attr: "inputtedOrderCode",
value: ""
}
},
showFormData: [
{
label: "话术内容",
name: "upgradeGoodsName",
type: "input",
maxlength: "20",
isClear: true
},
{
label: "一级分类",
name: "upgradeGoodsName",
type: "input",
maxlength: "20",
isClear: true
},
{
label: "二级分类",
name: "upgradeGoodsName",
type: "input",
maxlength: "20",
isClear: true
}
],
getListApi: getMerchantGoodsStockReduceRecord,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: false,
tableColumns: [
{
label: "话术内容",
prop: "upgradeGoodsName",
width: "160px"
},
{
label: "一级分类",
prop: "upgradeGoodsName",
width: "160px"
},
{
label: "一级权重",
prop: "productCode",
width: "250px"
},
{
label: "二级分类",
prop: "goodsSeries",
width: "250px"
},
{
label: "二级权重",
prop: "goodsTypeName",
width: "250px"
},
{
label: "更新时间",
prop: "reduceDate",
width: "150px",
formatter: (cellValue) => {
return cellValue.reduceDate
? Util.dateFormate(cellValue.reduceDate, "YYYY-MM-DD HH:mm:ss")
: ""
}
}
]
},
baseData: {
eventTypeList: [
{
confId: "1",
confLabel: "订单出库"
},
{
confId: "2",
confLabel: "盘点出库"
},
{
confId: "3",
confLabel: "调拨出库"
}
],
productTypeList: [],
yqMerchantList: [],
merchantIdList: [],
upgradeFlags: upgradeFlags
},
statisticsData: {}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
// this.getBaseData()
// 获取全部类目
getProductTypeBySceneId({ sceneType: "" }).then((res) => {
this.baseData.productTypeList = res
this.getOptionsList()
})
// 获取当前登录账号可见的园区店列表
getyqMerchantList({ mainPartnerMerchant: true }).then((res) => {
this.baseData.yqMerchantList = res
this.baseData.storeUsageList = res
this.getOptionsList()
})
this.stockReduceRecordCount()
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
// async getBaseData() {
// this.getOptionsList()
// },
// 输入膜卷号
filmRollNoInput(e) {
if (!/^[a-zA-Z0-9]*$/.test(e)) {
this.searchForm.filmRollNo = e.replace(/[^a-zA-Z0-9]/g, "")
}
},
// 出库记录列表统计
stockReduceRecordCount() {
stockReduceRecordCount(this.searchFormSearch).then((res) => {
this.statisticsData = res
})
},
// 获取仓库门店
getServicemerchantrefList(merchantId) {
getServicemerchantrefList({
yqMerchantId: merchantId
}).then((res) => {
this.baseData.merchantIdList = res || []
//总店
let _headOffice = this.baseData.yqMerchantList.find(
(item) => item.merchantNo === merchantId
)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.merchantIdList.push(_headOffice)
this.getOptionsList()
})
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.reduceDate) {
this.searchFormSearch.reduceStartDateStr = Util.dateFormate(
this.searchFormSearch.reduceDate[0],
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.reduceEndDateStr =
Util.dateFormate(
this.searchFormSearch.reduceDate[1],
"YYYY-MM-DD"
) + " 23:59:59"
}
delete this.searchFormSearch.reduceDate
resolve()
})
},
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
] !== "全部"
) {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable(true, true)
this.stockReduceRecordCount()
},
handleReset() {
this.searchForm = {
reduceDate: "",
eventType: "",
upgradeGoodsName: "",
yqMerchantId: "",
merchantId: "",
goodsType: "",
businessCode: "",
goodsSeries: "",
upgradeFlag: ""
}
this.$refs.recordTable.refreshTable()
this.stockReduceRecordCount()
},
handleExport() {
var params = this.searchFormSearch
params.method =
"dj.api.smartcarlife.MerchantGoodsStockReduceRecord.export.async"
const list = [
...this.dowloadList,
{
name: "出库列表",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
}
}
}
</script>
<style scoped lang="scss">
.theader {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
h2 {
font-weight: 600;
font-size: 16px;
color: #333333;
}
span{
font-size: 14px;
color: #999999;
margin-right:10px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<!-- 工牌管理 -->
<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"
>
</d2-search>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<div class="theader">
<h2>工牌管理</h2>
<div>
<span>最近同步:2024-03-05 17:36:05</span>
<el-button @click="handleSearch" size="small" plain type="primary">
数据同步
</el-button>
</div>
</div>
<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>
</div>
</template>
<script>
import { Util, deepClone } from "@/common/util"
import { mapActions, mapState } from "vuex"
import { getProductTypeBySceneId } from "@api/product"
import {
getyqMerchantList,
getMerchantGoodsStockReduceRecord,
getServicemerchantrefList,
stockReduceRecordCount
} from "@api/stockManage"
import { upgradeFlags } from "@/common/constants.js"
import { baseConfig } from "@/main"
export default {
name: "OutboundList",
components: {},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
membraneTypeList: baseConfig.membraneTypeList,
searchForm: {
reduceDate: "",
eventType: "",
upgradeGoodsName: "",
yqMerchantId: "",
merchantId: "",
goodsType: "",
businessCode: "",
goodsSeries: "",
upgradeFlag: "",
filmRollNo: ""
},
searchFormSearch: {},
searchSelectObj: {
orderOrTrade: {
attr: "inputtedOrderCode",
value: ""
}
},
showFormData: [
{
label: "工牌编号",
name: "upgradeGoodsName",
type: "input",
maxlength: "20",
isClear: true
},
{
label: "工牌厂商",
name: "upgradeGoodsName",
type: "input",
maxlength: "20",
isClear: true
},
{
label: "员工姓名",
name: "upgradeGoodsName",
type: "input",
maxlength: "20",
isClear: true
},
{
label: "手机号",
name: "productCode",
type: "input",
maxlength: "40",
isClear: true
}
],
getListApi: getMerchantGoodsStockReduceRecord,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
tableOption: false,
tableColumns: [
{
label: "工牌编号",
prop: "upgradeGoodsName",
width: "160px"
},
{
label: "工牌厂商",
prop: "upgradeGoodsName",
width: "160px"
},
{
label: "员工",
prop: "productCode",
width: "250px"
},
{
label: "手机号",
prop: "goodsSeries",
width: "250px"
},
{
label: "归属门店",
prop: "goodsTypeName",
width: "250px"
},
{
label: "归属服务商",
prop: "reduceStockNum"
},
{
label: "设备绑定时间",
prop: "reduceDate",
width: "150px",
formatter: (cellValue) => {
return cellValue.reduceDate
? Util.dateFormate(cellValue.reduceDate, "YYYY-MM-DD HH:mm:ss")
: ""
}
}
]
},
baseData: {
eventTypeList: [
{
confId: "1",
confLabel: "订单出库"
},
{
confId: "2",
confLabel: "盘点出库"
},
{
confId: "3",
confLabel: "调拨出库"
}
],
productTypeList: [],
yqMerchantList: [],
merchantIdList: [],
upgradeFlags: upgradeFlags
},
statisticsData: {}
}
},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
// this.getBaseData()
// 获取全部类目
getProductTypeBySceneId({ sceneType: "" }).then((res) => {
this.baseData.productTypeList = res
this.getOptionsList()
})
// 获取当前登录账号可见的园区店列表
getyqMerchantList({ mainPartnerMerchant: true }).then((res) => {
this.baseData.yqMerchantList = res
this.baseData.storeUsageList = res
this.getOptionsList()
})
this.stockReduceRecordCount()
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
// async getBaseData() {
// this.getOptionsList()
// },
// 输入膜卷号
filmRollNoInput(e) {
if (!/^[a-zA-Z0-9]*$/.test(e)) {
this.searchForm.filmRollNo = e.replace(/[^a-zA-Z0-9]/g, "")
}
},
// 出库记录列表统计
stockReduceRecordCount() {
stockReduceRecordCount(this.searchFormSearch).then((res) => {
this.statisticsData = res
})
},
// 获取仓库门店
getServicemerchantrefList(merchantId) {
getServicemerchantrefList({
yqMerchantId: merchantId
}).then((res) => {
this.baseData.merchantIdList = res || []
//总店
let _headOffice = this.baseData.yqMerchantList.find(
(item) => item.merchantNo === merchantId
)
_headOffice.merchantId = _headOffice.merchantNo
//门店选项中加入总店
this.baseData.merchantIdList.push(_headOffice)
this.getOptionsList()
})
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.reduceDate) {
this.searchFormSearch.reduceStartDateStr = Util.dateFormate(
this.searchFormSearch.reduceDate[0],
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.reduceEndDateStr =
Util.dateFormate(
this.searchFormSearch.reduceDate[1],
"YYYY-MM-DD"
) + " 23:59:59"
}
delete this.searchFormSearch.reduceDate
resolve()
})
},
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
] !== "全部"
) {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
},
handleSearch() {
this.$refs.recordTable.refreshTable(true, true)
this.stockReduceRecordCount()
},
handleReset() {
this.searchForm = {
reduceDate: "",
eventType: "",
upgradeGoodsName: "",
yqMerchantId: "",
merchantId: "",
goodsType: "",
businessCode: "",
goodsSeries: "",
upgradeFlag: ""
}
this.$refs.recordTable.refreshTable()
this.stockReduceRecordCount()
},
handleExport() {
var params = this.searchFormSearch
params.method =
"dj.api.smartcarlife.MerchantGoodsStockReduceRecord.export.async"
const list = [
...this.dowloadList,
{
name: "出库列表",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
}
}
}
</script>
<style scoped lang="scss">
.theader {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
h2 {
font-weight: 600;
font-size: 16px;
color: #333333;
}
span{
font-size: 14px;
color: #999999;
margin-right:10px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!