Commit 52443d4b by wangql

Merge branch 'dev_v4.16.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into dev_v4.16.0
2 parents 3e8f82ec 813f62f9
...@@ -101,6 +101,7 @@ export const routerName = { ...@@ -101,6 +101,7 @@ export const routerName = {
90903: { 90903: {
path: "/procurementReview", path: "/procurementReview",
name: "procurementReview", name: "procurementReview",
role: "admin",
meta: { meta: {
title: "采购审核", title: "采购审核",
authId: "90903", authId: "90903",
...@@ -136,6 +137,7 @@ export const routerName = { ...@@ -136,6 +137,7 @@ export const routerName = {
90904: { 90904: {
path: "/purchaseAndDelivery", path: "/purchaseAndDelivery",
name: "purchaseAndDelivery", name: "purchaseAndDelivery",
role: "service",
meta: { meta: {
title: "采购发货", title: "采购发货",
authId: "90904", authId: "90904",
......
...@@ -40,16 +40,16 @@ export default { ...@@ -40,16 +40,16 @@ export default {
getUserInfo({}).then(async (userInfo) => { getUserInfo({}).then(async (userInfo) => {
userInfo.beSuper = userInfo.loginAccount.isAdmin == 1 userInfo.beSuper = userInfo.loginAccount.isAdmin == 1
if (userInfo.beSuper) { if (userInfo.beSuper) {
//是否园区店 // 是否园区店
userInfo.beYQMerchant = true userInfo.beYQMerchant = true
//是否服务商 // 是否服务商
userInfo.beServerMerchant = true userInfo.beServerMerchant = true
} else { } else {
//是否园区店 // 是否园区店
userInfo.beYQMerchant = userInfo.beYQMerchant =
userInfo.loginAccount.merchantAccountList.includes("6") || userInfo.loginAccount.merchantAccountList.includes("6") ||
userInfo.loginAccount.merchantAccountList.includes("8") userInfo.loginAccount.merchantAccountList.includes("8")
//是否服务商 // 是否服务商
userInfo.beServerMerchant = userInfo.beServerMerchant =
userInfo.loginAccount.merchantAccountList.includes("7") userInfo.loginAccount.merchantAccountList.includes("7")
} }
...@@ -105,6 +105,18 @@ export default { ...@@ -105,6 +105,18 @@ export default {
} }
var tempAuths = [] var tempAuths = []
var targetRoutes = res.beSuper ? routeAll : res.map((i) => i.authId) var targetRoutes = res.beSuper ? routeAll : res.map((i) => i.authId)
// 先处理园区店角色是不能拿到 订单审批和发货的页面
console.log("userInfo.beYQMerchant", userInfo.beYQMerchant)
const filterList = ["90903", "90904"]
if (!userInfo.beSuper && userInfo.beYQMerchant) {
targetRoutes = targetRoutes.filter((item) => {
return !filterList.includes(item.toString())
})
}
if (userInfo.beServerMerchant) {
targetRoutes.push("90904")
}
console.log("targetRoutes", targetRoutes)
routeAll routeAll
.map((i) => i.authId) .map((i) => i.authId)
.forEach((item, index) => { .forEach((item, index) => {
......
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
// 获取类目列表 // 获取类目列表
getGoodsCategoryConfiguration() { getGoodsCategoryConfiguration() {
// const { scene: 1 } = this.routerInfo // const { scene: 1 } = this.routerInfo
getGoodsCategoryConfiguration({ sceneType: 1 }).then((result) => { getGoodsCategoryConfiguration({ sceneType: 1, shoppingMallFlag: true }).then((result) => {
const { list } = result const { list } = result
// console.log(list, 'list') // console.log(list, 'list')
if (list.length) { if (list.length) {
......
...@@ -3,43 +3,29 @@ ...@@ -3,43 +3,29 @@
<div> <div>
<d2-container> <d2-container>
<div class="d2-container-content"> <div class="d2-container-content">
<div class="header" <div class="header" slot="header" style="padding: 15px 0;">
slot="header"
style="padding: 15px 0;">
<!-- <d2-search ref="showSearch" <!-- <d2-search ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData" /> --> :form-data="showFormData" /> -->
<div> <div>
<el-input v-model="searchForm.searchName" <el-input v-model="searchForm.searchName" style="width:200px;" placeholder="请输入商品名称/系列" maxlength="20"
style="width:200px;"
placeholder="请输入商品名称/系列"
maxlength="20"
clearable /> clearable />
<!-- <el-button :id="tableParams.btnId" <!-- <el-button :id="tableParams.btnId"
size="small" size="small"
type="primary"> type="primary">
查询 查询
</el-button> --> </el-button> -->
<el-button @click="handleSearch" <el-button @click="handleSearch" size="small" type="primary" style="marginLeft:15px">
size="small"
type="primary"
style="marginLeft:15px">
查询 查询
</el-button> </el-button>
</div> </div>
</div> </div>
<p>盘存</p> <p>盘存</p>
<d2-table ref="recordTable" <d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn">
<div slot="auth-button" <div slot="auth-button" slot-scope="scope">
slot-scope="scope"> <el-button type="text" @click="inventory(scope.scope)" :disabled="setDisabled(scope.scope)">
<el-button type="text"
@click="inventory(scope.scope)"
:disabled="setDisabled(scope.scope)">
盘点 盘点
</el-button> </el-button>
</div> </div>
...@@ -47,50 +33,39 @@ ...@@ -47,50 +33,39 @@
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<p>盘存确认单</p> <p>盘存确认单</p>
<d2-table ref="recordTable2" <d2-table ref="recordTable2" :table-data="chooseDataList" :table-params="tableParams2" :has-page="false">
:table-data="chooseDataList" <template slot="profitAndLoss" slot-scope="scope">
:table-params="tableParams2"
:hasPage="false">
<template slot="profitAndLoss"
slot-scope="scope">
<span v-if="scope.scope.profitAndLoss || scope.scope.profitAndLoss == 0"> <span v-if="scope.scope.profitAndLoss || scope.scope.profitAndLoss == 0">
<span v-if="parseFloat(scope.scope.profitAndLoss) > 0" <span v-if="parseFloat(scope.scope.profitAndLoss) > 0" style="color:blue">{{ '+' +
style="color:blue">{{ '+' + parseFloat(scope.scope.profitAndLoss).toFixed(2) + (this.membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span> parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米'
<span v-else-if="parseFloat(scope.scope.profitAndLoss) < 0" : '件') }}</span>
style="color:red">{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (this.membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span> <span v-else-if="parseFloat(scope.scope.profitAndLoss) < 0" style="color:red">{{
<span parseFloat(scope.scope.profitAndLoss).toFixed(2) + (membraneTypeList.includes(scope.scope.goodsType) ? '米'
v-else>{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) + (this.membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span> : '件') }}</span>
</span> <span v-else>{{ parseFloat(scope.scope.profitAndLoss).toFixed(2) +
(membraneTypeList.includes(scope.scope.goodsType) ? '米' : '件') }}</span>
</span> </span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
<div slot="auth-button" <div slot="auth-button" slot-scope="scope">
slot-scope="scope"> <el-button type="text" @click="cancelInventory(scope.row, scope.$index)">
<el-button type="text"
@click="cancelInventory(scope.row,scope.$index)">
取消 取消
</el-button> </el-button>
</div> </div>
</d2-table> </d2-table>
</div> </div>
<d2-form ref="addInventoryForm" <d2-form ref="addInventoryForm" :origin-data="editData" :form-list="editForm" form-ref="inveFormRef"
:origin-data="editData" @handleAddConfirm="handleAddConfirm" @handleClose="handleAddClose">
:form-list="editForm"
form-ref="inveFormRef"
@handleAddConfirm="handleAddConfirm"
@handleClose="handleAddClose">
</d2-form> </d2-form>
</d2-container> </d2-container>
<!-- 盘点 --> <!-- 盘点 -->
<inventory-num-dialog :inventory-num-visible="inventoryNumVisible" <inventory-num-dialog :inventory-num-visible="inventoryNumVisible" :record-info="recordInfo"
:recordInfo="recordInfo" v-if="inventoryNumVisible" @dialogClose="dialogClose" />
v-if="inventoryNumVisible"
@dialogClose="dialogClose" />
</div> </div>
</template> </template>
<script> <script>
import { Util, deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { stockRemainPage, saveStockCheck } from '@api/stockManage' import { stockRemainPage, saveStockCheck } from '@api/stockManage'
import inventoryNumDialog from './inventoryNumDialog' import inventoryNumDialog from './inventoryNumDialog'
...@@ -193,7 +168,7 @@ export default { ...@@ -193,7 +168,7 @@ export default {
}, },
editData: { editData: {
thumbUrlList: [], thumbUrlList: []
}, },
editForm: [{ editForm: [{
formBlock: [ formBlock: [
...@@ -267,7 +242,7 @@ export default { ...@@ -267,7 +242,7 @@ export default {
this.inventoryNumVisible = true this.inventoryNumVisible = true
}, },
//设置禁选 // 设置禁选
setDisabled(row) { setDisabled(row) {
const index = this.chooseDataList.findIndex(item => item.id == row.id) const index = this.chooseDataList.findIndex(item => item.id == row.id)
if (index == -1) { if (index == -1) {
...@@ -279,7 +254,7 @@ export default { ...@@ -279,7 +254,7 @@ export default {
dialogClose(chooseData) { dialogClose(chooseData) {
this.inventoryNumVisible = !this.inventoryNumVisible this.inventoryNumVisible = !this.inventoryNumVisible
console.log(chooseData); console.log(chooseData)
if (chooseData) { if (chooseData) {
this.chooseDataList.push(chooseData) this.chooseDataList.push(chooseData)
} }
...@@ -323,7 +298,7 @@ export default { ...@@ -323,7 +298,7 @@ export default {
handleAddClose(isRefresh = false) { handleAddClose(isRefresh = false) {
this.close({ tagName: '/addInventory' }) this.close({ tagName: '/addInventory' })
this.$router.push({ name: 'inventoryList' }) this.$router.push({ name: 'inventoryList' })
}, }
} }
} }
...@@ -335,6 +310,7 @@ export default { ...@@ -335,6 +310,7 @@ export default {
color: #2a58ad; color: #2a58ad;
margin: 0 2px; margin: 0 2px;
} }
.leftSpan { .leftSpan {
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!