采购订单检验报告等修改

ywj_dev
anthonywj 2 years ago
parent 5023d3d487
commit 1eb5e4453c

@ -138,7 +138,6 @@
:action="this.uploadUrl" :action="this.uploadUrl"
:on-preview="uploadHandlePreview" :on-preview="uploadHandlePreview"
:on-remove="uploadHandleRemove" :on-remove="uploadHandleRemove"
:limit="1"
:headers="headers" :headers="headers"
:on-exceed="uploadHandleExceed" :on-exceed="uploadHandleExceed"
accept=".jpg,.png" accept=".jpg,.png"
@ -190,7 +189,6 @@
:action="this.uploadUrl" :action="this.uploadUrl"
:on-preview="uploadHandlePreview" :on-preview="uploadHandlePreview"
:on-remove="uploadHandleRemove1" :on-remove="uploadHandleRemove1"
:limit="1"
:headers="headers" :headers="headers"
:on-exceed="uploadHandleExceed" :on-exceed="uploadHandleExceed"
accept=".jpg,.png" accept=".jpg,.png"
@ -219,7 +217,8 @@
style="text-align:right" @click="showImgViewerCold"> style="text-align:right" @click="showImgViewerCold">
冷链报告预览 冷链报告预览
</el-button> </el-button>
<el-image-viewer v-if="imgViewerVisibleCold" style="z-index:9999" :on-close="closeImgViewerCold" :url-list="imgListCold"/> <el-image-viewer v-if="imgViewerVisibleCold" style="z-index:9999" :on-close="closeImgViewerCold"
:url-list="imgListCold"/>
</el-col> </el-col>
@ -227,7 +226,6 @@
</el-row> </el-row>
</el-card> </el-card>
</el-form> </el-form>
@ -263,9 +261,9 @@ export default {
data() { data() {
return { return {
imgList: [], imgList: [],
imgListCold:[], imgListCold: [],
imgViewerVisible: false, imgViewerVisible: false,
imgViewerVisibleCold:false, imgViewerVisibleCold: false,
BASE_URL: process.env.VUE_APP_BASE_API, BASE_URL: process.env.VUE_APP_BASE_API,
code: "", code: "",
formData: { formData: {
@ -292,7 +290,8 @@ export default {
headers: {}, headers: {},
choiceFile: "选取文件", choiceFile: "选取文件",
choiceFile1: "选取文件", choiceFile1: "选取文件",
isChangeCheck: false,
isChangeCold: false,
}; };
}, },
components: { components: {
@ -373,7 +372,7 @@ export default {
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
}, },
uploadOnchange(file, fileList) { uploadOnchange(file, fileList) {
this.inputQuery.checkFileName = file.name; // this.inputQuery.checkFileName = file.name;
let fileName = file.name; let fileName = file.name;
let uid = file.uid let uid = file.uid
let pos = fileName.lastIndexOf("."); let pos = fileName.lastIndexOf(".");
@ -400,7 +399,7 @@ export default {
return isLt; return isLt;
}, },
uploadOnchange1(file, fileList) { uploadOnchange1(file, fileList) {
this.inputQuery.checkColdFileName = file.name; // this.inputQuery.checkColdFileName = file.name;
let fileName = file.name; let fileName = file.name;
let uid = file.uid let uid = file.uid
let pos = fileName.lastIndexOf("."); let pos = fileName.lastIndexOf(".");
@ -427,20 +426,37 @@ export default {
return isLt; return isLt;
}, },
uploadHandleSuccess(response, file, fileList) { uploadHandleSuccess(response, file, fileList) {
if (response.code === 20000) { if (response.code === 20000) {
this.inputQuery.filePath = response.data.name; if (this.inputQuery.filePath == null || this.isChangeCheck == true) {
// this.onSubmit(); this.inputQuery.filePath = response.data.name + ",";
this.inputQuery.checkFileName = file.name + ",";
this.isChangeCheck = false;
} else {
this.inputQuery.filePath += response.data.name + ",";
this.inputQuery.checkFileName += file.name + ",";
}
} else { } else {
this.$message.error("文件上传失败:" + response.message); this.$message.error("文件上传失败:" + response.message);
} }
}, },
uploadHandleSuccess1(response, file, fileList) { uploadHandleSuccess1(response, file, fileList) {
if (response.code === 20000) { if (response.code === 20000) {
this.inputQuery.coldFilePath = response.data.name; if (this.inputQuery.coldFilePath == null || this.isChangeCold == true) {
// this.onSubmit(); this.inputQuery.coldFilePath = response.data.name + ",";
this.inputQuery.checkColdFileName = file.name + ",";
this.isChangeCold = false;
} else {
this.inputQuery.coldFilePath += response.data.name + ",";
this.inputQuery.checkColdFileName += file.name + ",";
}
} else { } else {
this.$message.error("文件上传失败:" + response.message); this.$message.error("文件上传失败:" + response.message);
} }
}, },
uploadHandleError() { uploadHandleError() {
@ -471,7 +487,7 @@ export default {
document.addEventListener("touchmove", m, false); // document.addEventListener("touchmove", m, false); //
}, },
showImgViewerCold(row){ showImgViewerCold(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.imgList = []; this.imgList = [];
previewImage({imageUrl: this.inputQuery.coldFilePath, certFileUrl: this.certFileUrl}).then(response => { previewImage({imageUrl: this.inputQuery.coldFilePath, certFileUrl: this.certFileUrl}).then(response => {
@ -498,9 +514,11 @@ export default {
document.removeEventListener("touchmove", m, true); document.removeEventListener("touchmove", m, true);
}, },
closeImgViewerCold(){ closeImgViewerCold() {
this.imgViewerVisibleCold = false; this.imgViewerVisibleCold = false;
const m = (e) => { e.preventDefault() }; const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'auto'; document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true); document.removeEventListener("touchmove", m, true);
}, },
@ -529,11 +547,13 @@ export default {
} }
if (this.inputQuery.filePath != null) { if (this.inputQuery.filePath != null) {
this.choiceFile = "更换检验报告"; this.choiceFile = "更换检验报告";
this.isChangeCheck = true;
} else { } else {
this.choiceFile = "选取检验报告"; this.choiceFile = "选取检验报告";
} }
if (this.inputQuery.coldFilePath != null) { if (this.inputQuery.coldFilePath != null) {
this.isChangeCold = true;
this.choiceFile1 = "更换冷链报告"; this.choiceFile1 = "更换冷链报告";
} else { } else {
this.choiceFile1 = "选取冷链报告"; this.choiceFile1 = "选取冷链报告";

@ -378,7 +378,7 @@
size="small" size="small"
@click.native.stop="upload(scope.row)" @click.native.stop="upload(scope.row)"
v-if="scope.row.checkFileName != null" v-if="scope.row.checkFileName != null"
>预览 >编辑
</el-button </el-button
> >
</template> </template>

@ -288,7 +288,7 @@
type="text" type="text"
size="small" size="small"
@click.native.stop="upload(scope.row)" @click.native.stop="upload(scope.row)"
>预览 >编辑
</el-button </el-button
> >
</template> </template>

@ -331,7 +331,7 @@
size="small" size="small"
@click.native.stop="upload(scope.row)" @click.native.stop="upload(scope.row)"
v-if="scope.row.checkFileName != null" v-if="scope.row.checkFileName != null"
>预览 >编辑
</el-button </el-button
> >
</template> </template>

@ -315,7 +315,7 @@
type="text" type="text"
size="small" size="small"
@click.native.stop="upload(scope.row)" @click.native.stop="upload(scope.row)"
>预览 >编辑
</el-button </el-button
> >

@ -172,7 +172,7 @@ export default {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API, BASE_URL: process.env.VUE_APP_BASE_API,
code: "", code: "",
isCleck:false, isCleck: false,
formData: { formData: {
type: 0, type: 0,
vailDate: null, vailDate: null,
@ -290,9 +290,9 @@ export default {
}, },
uploadHandleRemove(file, fileList) { uploadHandleRemove(file, fileList) {
this.formData.filePath=""; this.formData.filePath = "";
for (var i=0;i<fileList.length;i++){ for (var i = 0; i < fileList.length; i++) {
this.formData.filePath+=fileList[i].response.data.name+","; this.formData.filePath += fileList[i].response.data.name + ",";
} }
}, },
uploadHandlePreview(file) { uploadHandlePreview(file) {
@ -330,11 +330,11 @@ export default {
}, },
uploadHandleSuccess(response, file, fileList) { uploadHandleSuccess(response, file, fileList) {
if (response.code === 20000) { if (response.code === 20000) {
if(this.formData.filePath==null || this.isCleck==true){ if (this.formData.filePath == null || this.isCleck == true) {
this.formData.filePath=response.data.name+","; this.formData.filePath = response.data.name + ",";
this.isCleck=false; this.isCleck = false;
}else{ } else {
this.formData.filePath+=response.data.name+","; this.formData.filePath += response.data.name + ",";
} }
} else { } else {
this.$message.error("文件上传失败:" + response.message); this.$message.error("文件上传失败:" + response.message);
@ -372,7 +372,7 @@ export default {
} }
if (this.formData.filePath != null) { if (this.formData.filePath != null) {
this.choiceFile = "更换文件"; this.choiceFile = "更换文件";
this.isCleck=true; this.isCleck = true;
} else { } else {
this.choiceFile = "选取文件"; this.choiceFile = "选取文件";
} }

@ -7,12 +7,14 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="配送企业名称:"> <el-form-item label="配送企业名称:">
<el-input v-model="filterQuery.companyName" style="width: 90%" placeholder="请输入配送企业名称" clearable></el-input> <el-input v-model="filterQuery.companyName" style="width: 90%" placeholder="请输入配送企业名称"
clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="统一社会信用号:"> <el-form-item label="统一社会信用号:">
<el-input v-model="filterQuery.creditNum" style="width: 90%" placeholder="请输入统一社会信用号" clearable></el-input> <el-input v-model="filterQuery.creditNum" style="width: 90%" placeholder="请输入统一社会信用号"
clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -76,7 +78,6 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -361,7 +362,7 @@ export default {
page: 1, page: 1,
limit: 20, limit: 20,
}, },
auditType:1, auditType: 1,
loading: false, loading: false,
list: [], list: [],
total: 0, total: 0,
@ -467,7 +468,7 @@ export default {
}; };
return statusMap[status]; return statusMap[status];
}, },
manufacturerStatusType(passCount,failCout) { manufacturerStatusType(passCount, failCout) {
const statusMap = { const statusMap = {
0: "warning", 0: "warning",
1: "success", 1: "success",
@ -510,7 +511,7 @@ export default {
}, },
getList() { getList() {
this.loading = true; this.loading = true;
this.filterQuery.manufacturerStatus=1; this.filterQuery.manufacturerStatus = 1;
getSupComapnys(this.filterQuery) getSupComapnys(this.filterQuery)
.then((response) => { .then((response) => {
console.log(response) console.log(response)
@ -566,7 +567,7 @@ export default {
supCompanyClick(row) { supCompanyClick(row) {
this.filterManufacturerQuery.customerId = row.customerId; this.filterManufacturerQuery.customerId = row.customerId;
this.registrationList=[]; this.registrationList = [];
this.onManufacturerReset(); this.onManufacturerReset();
}, },
@ -604,7 +605,7 @@ export default {
}, },
getManufacturerList() { getManufacturerList() {
this.manufacturerLoading = true; this.manufacturerLoading = true;
this.filterManufacturerQuery.productStatus=1; this.filterManufacturerQuery.productStatus = 1;
getCompanyList(this.filterManufacturerQuery) getCompanyList(this.filterManufacturerQuery)
.then((response) => { .then((response) => {
this.manufacturerLoading = false; this.manufacturerLoading = false;
@ -618,11 +619,10 @@ export default {
}); });
}, },
addInfoDialog(row) { addInfoDialog(row) {
if(row.auditStatus == 2){ if (row.auditStatus == 2) {
this.editManufacturerType = 2; this.editManufacturerType = 2;
this.formManufacturerName = 1; this.formManufacturerName = 1;
} } else if (row.auditStatus == 6 || row.auditStatus == 3 || row.auditStatus == 4) {
else if (row.auditStatus == 6 || row.auditStatus == 3 || row.auditStatus == 4) {
this.editManufacturerType = 2; this.editManufacturerType = 2;
this.formManufacturerName = 2; this.formManufacturerName = 2;
} else { } else {
@ -681,11 +681,10 @@ export default {
this.showSearch3 = !this.showSearch3; this.showSearch3 = !this.showSearch3;
}, },
registrationDialog(row) { registrationDialog(row) {
if(row.auditStatus == 2){ if (row.auditStatus == 2) {
this.editProductType = 2; this.editProductType = 2;
this.formProductName = 1; this.formProductName = 1;
} } else if (row.auditStatus == 6 || row.auditStatus == 3 || row.auditStatus == 4) {
else if (row.auditStatus == 6 || row.auditStatus == 3 || row.auditStatus == 4) {
this.formProductName = 2; this.formProductName = 2;
this.editProductType = 2; this.editProductType = 2;
} else { } else {

@ -11,7 +11,9 @@
<div style="display: flex;"> <div style="display: flex;">
<el-button v-if="editType==2" type="primary" size="mini" icon="search" @click="onPassSubmit"></el-button> <el-button v-if="editType==2" type="primary" size="mini" icon="search" @click="onPassSubmit"></el-button>
<el-button v-if="editType==2" type="primary" size="mini" @click="onRejectSubmit"></el-button> <el-button v-if="editType==2" type="primary" size="mini" @click="onRejectSubmit"></el-button>
<el-button v-if="editType==1 && auditType!=1" type="primary" size="mini" icon="search" @click="printSupCertAll"></el-button> <el-button v-if="editType==1 && auditType!=1" type="primary" size="mini" icon="search"
@click="printSupCertAll">打印
</el-button>
</div> </div>
<el-row :gutter="20" class="el-row" type="flex" style="margin-top: 20px"> <el-row :gutter="20" class="el-row" type="flex" style="margin-top: 20px">
@ -162,7 +164,8 @@
<el-table-column label="确认说明" prop="auditComment" show-overflow-tooltip></el-table-column> <el-table-column label="确认说明" prop="auditComment" show-overflow-tooltip></el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="editType==1 && auditType!=1" type="text" size="small" @click.native="printSupCert(scope.row)"> <el-button v-if="editType==1 && auditType!=1" type="text" size="small"
@click.native="printSupCert(scope.row)">打印
</el-button> </el-button>
<el-button type="text" size="small" v-if="editType==2" @click.native="auditCert(scope.row)"></el-button> <el-button type="text" size="small" v-if="editType==2" @click.native="auditCert(scope.row)"></el-button>
<el-button type="text" size="small" v-if="scope.row.auditStatus==1" @click.native="revoke(scope.row)"> <el-button type="text" size="small" v-if="scope.row.auditStatus==1" @click.native="revoke(scope.row)">
@ -527,16 +530,18 @@ export default {
return [ return [
'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1; 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1;
}, },
showImgViewer(row){ showImgViewer(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.imgList=[]; this.imgList = [];
previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => { previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) { if (response.code === 20000) {
this.imgList=response.data; this.imgList = response.data;
} }
}); });
this.imgViewerVisible = true; this.imgViewerVisible = true;
const m = (e) => { e.preventDefault() }; const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'hidden'; document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); // document.addEventListener("touchmove", m, false); //
}, },

@ -149,10 +149,10 @@
<script> <script>
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
import purPlanProducts from '@/views/purchase/purPlan/purOrderSelectProduct' import purPlanProducts from '@/views/purchase/purPlan/purOrderSelectProduct'
import { auditOrder, dealOrder, delOrderDetail, listOrderDetail } from '@/api/purchase/purOrder' import {auditOrder, dealOrder, delOrderDetail, listOrderDetail} from '@/api/purchase/purOrder'
import { filterAllByUser, selectByCode } from '@/api/system/invWarehouse' import {filterAllByUser, selectByCode} from '@/api/system/invWarehouse'
import { filterSubByInv } from '@/api/system/invSubWarehouse' import {filterSubByInv} from '@/api/system/invSubWarehouse'
import { getLocalJoinByUser } from '@/api/basic/busType' import {getLocalJoinByUser} from '@/api/basic/busType'
export default { export default {
name: 'idQuery', name: 'idQuery',
@ -187,7 +187,7 @@ export default {
locStorageCode: null, locStorageCode: null,
invWarehouseCode: null, invWarehouseCode: null,
auditRemark: null, auditRemark: null,
autoPurchase: false, autoPurchase: true,
targetInv: 1000, targetInv: 1000,
targetSubInv: null, targetSubInv: null,
targetBillAction: null targetBillAction: null
@ -239,7 +239,7 @@ export default {
purOrderEntity: this.formData, purOrderEntity: this.formData,
subErpOrders: this.codeArray, subErpOrders: this.codeArray,
autoPurchase: this.formData.autoPurchase, autoPurchase: this.formData.autoPurchase,
targetBillAction:this.formData.targetBillAction, targetBillAction: this.formData.targetBillAction,
} }
dealOrder(tQuery) dealOrder(tQuery)
.then(response => { .then(response => {
@ -329,7 +329,7 @@ export default {
// row.count = row.reCount; // row.count = row.reCount;
} }
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({row, rowIndex}) {
row.index = rowIndex row.index = rowIndex
}, },
// //
@ -436,12 +436,12 @@ export default {
targetInvChange() { targetInvChange() {
let query = { let query = {
enable: true, enable: true,
spUse: true spUse: true,
invCode: this.formData.invCode
} }
getLocalJoinByUser(query) getLocalJoinByUser(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || [] this.busTypes = response.data.list || []
// this.formData.targetBillAction = this.busTypes[0].localAction;
}) })
.catch(() => { .catch(() => {
}) })
@ -459,7 +459,7 @@ export default {
}, },
filters: {}, filters: {},
mounted() { mounted() {
document.body.ondrop = function(event) { document.body.ondrop = function (event) {
event.preventDefault() event.preventDefault()
event.stopPropagation() event.stopPropagation()
} }
@ -478,6 +478,7 @@ export default {
this.formData.targetInv = 1000 this.formData.targetInv = 1000
this.orderEditor = true this.orderEditor = true
this.sValue = this.formData.corpName this.sValue = this.formData.corpName
this.formData.autoPurchase = true;
this.getStockOrderDetailList() this.getStockOrderDetailList()
} else { } else {
this.formData = { this.formData = {
@ -489,7 +490,7 @@ export default {
locStorageCode: null, locStorageCode: null,
invWarehouseCode: null, invWarehouseCode: null,
auditRemark: null, auditRemark: null,
autoPurchase: false, autoPurchase: true,
targetInv: 1000, targetInv: 1000,
targetSubInv: null, targetSubInv: null,
targetBillAction: null targetBillAction: null

@ -120,20 +120,24 @@
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display: flex"> <el-button-group style="display: flex">
<el-button icon="el-icon-view" type="primary" @click="hideSearch" <el-button icon="el-icon-view" type="primary" @click="hideSearch"
>显示/隐藏搜索栏</el-button >显示/隐藏搜索栏
</el-button
> >
<el-button type="primary" icon="el-icon-refresh" @click="onReset" <el-button type="primary" icon="el-icon-refresh" @click="onReset"
>重置</el-button >重置
</el-button
> >
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind" <el-button type="primary" icon="el-icon-search" @click="onSubmitFind"
>查询</el-button >查询
</el-button
> >
<el-button <el-button
type="primary" type="primary"
icon="el-icon-share" icon="el-icon-share"
v-if="this.Menustatus === 1" v-if="this.Menustatus === 1"
@click="help" @click="help"
>帮助</el-button >帮助
</el-button
> >
</el-button-group> </el-button-group>
</div> </div>
@ -167,10 +171,15 @@
width="180" width="180"
v-if="showSup" v-if="showSup"
></el-table-column> ></el-table-column>
<el-table-column label="处理状态" prop="emergency" width="120"> <el-table-column label="处理状态" prop="dealStatus" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ dealStatus[scope.row.emergency] }} <el-tag :type="statusFilterType(scope.row.dealStatus)">{{
dealStatus[scope.row.dealStatus]
}}
</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="创建时间" prop="createTime" width="180" show-overflow-tooltip></el-table-column>--> <!-- <el-table-column label="创建时间" prop="createTime" width="180" show-overflow-tooltip></el-table-column>-->
<el-table-column label="紧急程度" prop="emergency" width="120"> <el-table-column label="紧急程度" prop="emergency" width="120">
@ -208,7 +217,7 @@
type="text" type="text"
size="small" size="small"
@click.native.stop="newDistributionForm(scope.row)" @click.native.stop="newDistributionForm(scope.row)"
>处理 >处理
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -307,10 +316,11 @@ import {
listOrderDetail, listOrderDetail,
delOrderDetailAll, delOrderDetailAll,
} from "@/api/purchase/purOrder"; } from "@/api/purchase/purOrder";
import { selectAuthMenu } from "@/api/system/sysMenuHelp"; import {selectAuthMenu} from "@/api/system/sysMenuHelp";
import { getBasicUnitMaintains } from "@/api/basic/basicUnitMaintain"; import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import { getDeptListByUser } from "@/api/auth/authDept"; import {getDeptListByUser} from "@/api/auth/authDept";
import { getInvListByUser } from "@/api/system/invWarehouse"; import {getInvListByUser} from "@/api/system/invWarehouse";
export default { export default {
data() { data() {
return { return {
@ -325,6 +335,7 @@ export default {
corpName: null, corpName: null,
type: 1, type: 1,
editStatus: 1, editStatus: 1,
dealStatus: 0,
}, },
corpLoading: false, corpLoading: false,
@ -502,7 +513,7 @@ export default {
}); });
}, },
handleDetail(row) { handleDetail(row) {
let query = { orderIdFk: row.id }; let query = {orderIdFk: row.id};
this.loading = true; this.loading = true;
listOrderDetail(query) // listOrderDetail(query) //
.then((response) => { .then((response) => {
@ -536,14 +547,15 @@ export default {
this.loading = false; this.loading = false;
}); });
}) })
.catch(() => {}); .catch(() => {
});
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val.page; this.filterQuery.page = val.page;
this.getList(); this.getList();
}, },
selectAuthMenu() { selectAuthMenu() {
let params = { menuName: this.$route.meta.title }; let params = {menuName: this.$route.meta.title};
selectAuthMenu(params).then((res) => { selectAuthMenu(params).then((res) => {
if (res.code === 20000) { if (res.code === 20000) {
this.Menustatus = res.data.status; this.Menustatus = res.data.status;
@ -597,21 +609,21 @@ export default {
} else this.formName = "add"; } else this.formName = "add";
this.newSpDistributionVisible = true; this.newSpDistributionVisible = true;
}, },
},
components: {
purPlanEdit,
},
filters: {
statusFilterType(status) { statusFilterType(status) {
const statusMap = { const statusMap = {
2: "warning", 0: "warning",
3: "success", 1: "success",
4: "danger", 2: "danger",
}; };
return statusMap[status]; return statusMap[status];
}, },
}, },
mounted() {}, components: {
purPlanEdit,
},
filters: {},
mounted() {
},
created() { created() {
let supId = this.$store.getters.customerId; let supId = this.$store.getters.customerId;
if (supId == "110") { if (supId == "110") {

@ -460,7 +460,7 @@ export default {
} }
); );
}, },
change(){ change() {
this.resetQuery(); this.resetQuery();
}, },
getCustomerList() { getCustomerList() {
@ -517,8 +517,13 @@ export default {
let text = row.status === "0" ? "启用" : "禁用"; let text = row.status === "0" ? "启用" : "禁用";
this.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?').then(function () { this.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?').then(function () {
return changeRoleStatus(row.roleId, row.status); return changeRoleStatus(row.roleId, row.status);
}).then(() => { }).then((res) => {
this.$modal.msgSuccess(text + "成功"); if(res.code == 20000){
this.$modal.msgSuccess(text + "成功");
}else {
this.$modal.msgError(text + "成功");
}
}).catch(function () { }).catch(function () {
row.status = row.status === "0" ? "1" : "0"; row.status = row.status === "0" ? "1" : "0";
}); });
@ -680,7 +685,7 @@ export default {
// this.$message("") // this.$message("")
// return // return
// } // }
if(this.form.isCustomer == null){ if (this.form.isCustomer == null) {
if (this.userStatus == 0) { if (this.userStatus == 0) {
this.form.isCustomer = 0; this.form.isCustomer = 0;
} else { } else {
@ -691,17 +696,17 @@ export default {
if (valid) { if (valid) {
if (this.form.roleId != undefined) { if (this.form.roleId != undefined) {
this.form.menuIds = this.getMenuAllCheckedKeys(); this.form.menuIds = this.getMenuAllCheckedKeys();
if( this.form.menuIds.length==0){ if (this.form.menuIds.length == 0) {
this.$message.error("菜单权限不能为空"); this.$message.error("菜单权限不能为空");
return return
} }
updateRole(this.form).then(response => { updateRole(this.form).then(response => {
if(response.code === 20000) { if (response.code === 20000) {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
this.getList(); this.getList();
this.getCustomerList(); this.getCustomerList();
}else{ } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}); });
@ -733,10 +738,15 @@ export default {
const roleIds = row.roleId || this.ids; const roleIds = row.roleId || this.ids;
this.$modal.confirm('是否确认删除该角色?').then(function () { this.$modal.confirm('是否确认删除该角色?').then(function () {
return delRole(roleIds); return delRole(roleIds);
}).then(() => { }).then((res) => {
this.getList(); if (res.code == 20000) {
this.getCustomerList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.getCustomerList();
this.$modal.msgSuccess("删除成功");
} else {
this.$modal.msgError(res.message);
}
}).catch(() => { }).catch(() => {
}); });
}, },

Loading…
Cancel
Save