Browse Source

全局发布、全局反发布,错误信息提示不消失

pull/202/head
wangxy 2 years ago
parent
commit
00eb748e91
5 changed files with 57 additions and 34 deletions
  1. +3
    -0
      src/assets/css/base.css
  2. +32
    -30
      src/components/queryComponent/index.vue
  3. +1
    -1
      src/server/productionPlanning/customerForecastDemandReview.js
  4. +6
    -1
      src/server/request.js
  5. +15
    -2
      src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/public.vue

+ 3
- 0
src/assets/css/base.css View File

@ -595,4 +595,7 @@ li {
} }
.el-select-v2__wrapper.is-focused{ .el-select-v2__wrapper.is-focused{
border-color:#CCCCCC; border-color:#CCCCCC;
}
.el-input.is-disabled .el-input__inner {
color: #818A92;
} }

+ 32
- 30
src/components/queryComponent/index.vue View File

@ -140,26 +140,24 @@ export default {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
return put('/admin/ap/custdemandverhead/issueglobalallversion')
})
.then(() => {
// this.msgSuccess("");
ElMessage({
showClose: true,
message: '全局发布成功',
type: 'success',
duration: 0
put('/admin/ap/custdemandverhead/issueglobalallversion').then(() => {
ElMessage({
showClose: true,
message: '全局发布成功',
type: 'success',
duration: 0
})
this.$emit('batchReleaseEmit', true)
}) })
this.$emit('batchReleaseEmit', true)
.catch(({msg}) => {
ElMessage({
showClose: true,
message: msg,
type: 'error',
duration: 0
})
});
}) })
.catch(({msg}) => {
ElMessage({
showClose: true,
message: msg,
type: 'error',
duration: 0
})
});
}, },
// //
contraryReleaseAll() { contraryReleaseAll() {
@ -169,19 +167,23 @@ export default {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
return put('/admin/ap/custdemandverhead/removeissueglobalallversion')
})
.then(() => {
// this.msgSuccess("");
ElMessage({
showClose: true,
message: '全局反发布成功',
type: 'success',
duration: 0
})
this.$emit('batchReleaseEmit', true)
put('/admin/ap/custdemandverhead/removeissueglobalallversion').then(() => {
ElMessage({
showClose: true,
message: '全局反发布成功',
type: 'success',
duration: 0
})
this.$emit('batchReleaseEmit', true)
}).catch(({msg}) => {
ElMessage({
showClose: true,
message: msg,
type: 'error',
duration: 0
})
});
}) })
.catch(() => { });
}, },
// //
handleUpload() { handleUpload() {


+ 1
- 1
src/server/productionPlanning/customerForecastDemandReview.js View File

@ -48,7 +48,7 @@ export const reloadData = (params) => postForm('/admin/ap/balance/refreshdata',p
// 刷新数据 // 刷新数据
export const refreshData = (data) => postForm('/admin/ap/balance/refreshcustomerarticledemand',data) export const refreshData = (data) => postForm('/admin/ap/balance/refreshcustomerarticledemand',data)
export const publicData = (data) => post('admin/ap/balance/publishmpsplan',data)
export const publicData = (data) => post('/admin/ap/balance/publishmpsplan',data)
// 客户主要资源查询 // 客户主要资源查询
export const searchResource = (artId) => get(`/admin/ap/articleresource/search/${artId}`); export const searchResource = (artId) => get(`/admin/ap/articleresource/search/${artId}`);


+ 6
- 1
src/server/request.js View File

@ -19,7 +19,6 @@ service.interceptors.request.use(
return Promise.reject(error); return Promise.reject(error);
} }
); );
service.interceptors.response.use( service.interceptors.response.use(
(response) => { (response) => {
const code = response.data.code; const code = response.data.code;
@ -27,8 +26,14 @@ service.interceptors.response.use(
switchValue = true; switchValue = true;
return response.data; return response.data;
} }
return response.data;
}, },
(error) => { (error) => {
if (error.response.config.url == '/admin/ap/custdemandverhead/removeissueglobalallversion' ||
error.response.config.url == '/admin/ap/custdemandverhead/issueglobalallversion' ||
error.response.config.url == '/admin/ap/balance/publishmpsplan') {
return Promise.reject(error.response.data);
}
if ( if (
error.response && error.response &&
error.response.data && error.response.data &&


+ 15
- 2
src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/public.vue View File

@ -74,6 +74,7 @@
<script> <script>
import { publishIdentify, publicData, planOrderQuery, republish } from '@/server/productionPlanning/customerForecastDemandReview' import { publishIdentify, publicData, planOrderQuery, republish } from '@/server/productionPlanning/customerForecastDemandReview'
import PublicDetail from "./publicDetail.vue" import PublicDetail from "./publicDetail.vue"
import { ElMessage } from 'element-plus'
import { baseURL } from "@/server/request" import { baseURL } from "@/server/request"
export default { export default {
emits: ["cancelHandle"], emits: ["cancelHandle"],
@ -156,9 +157,21 @@
this.loading = true this.loading = true
publicData(this.formData).then(({ data = [] }) => { publicData(this.formData).then(({ data = [] }) => {
this.loading = false this.loading = false
this.$message({ type: "success", message: "发布成功" });
// this.$message({ type: "success", message: "" });
ElMessage({
showClose: true,
message: '发布成功',
type: 'success',
duration: 0
})
this.$emit("cancelHandle", this.formData) this.$emit("cancelHandle", this.formData)
}).catch(() => {
}).catch((res) => {
ElMessage({
showClose: true,
message: res.msg,
type: 'error',
duration: 0
})
this.$emit("cancelHandle", this.formData) this.$emit("cancelHandle", this.formData)
this.loading = false this.loading = false
}); });


Loading…
Cancel
Save