Browse Source

Merge pull request '根据需求添加同步库存及采购' (#188) from xuxiaoming into develop

Reviewed-on: http://101.201.121.115:3000/leo/LAPP_AdvancedPlanner_Front/pulls/188
pull/191/head
xuxiaoming 3 years ago
parent
commit
ef08d9616f
4 changed files with 60 additions and 0 deletions
  1. +2
    -0
      src/server/productionPlanning/emergencyOrder.js
  2. +29
    -0
      src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue
  3. +28
    -0
      src/views/productionPlanning/emergencyOrder/index.vue
  4. +1
    -0
      src/views/productionPlanning/productInventory/index.vue

+ 2
- 0
src/server/productionPlanning/emergencyOrder.js View File

@ -16,3 +16,5 @@ export const publishData = (params) => postForm("/admin/ap/balance/articledemand
export const getArtIdList = () => get("/admin/base/article/selectdata?ArtTypeId=FINISHED")
export const deleteall = () => deleteData("/admin/ap/articledemandemergency/deleteall")
export const syncPurchase = () => get("admin/common/task/caigou")

+ 29
- 0
src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue View File

@ -73,6 +73,11 @@
MPS计算
</el-button>
</div>
<el-button icon="el-icon-refresh"
size="mini"
class="reset-button-style"
:disabled="syncDataDisable"
@click="syncData" >同步库存</el-button>
</div>
<div class="button_list">
<img :src="require('@/assets/icon/reload.png')"
@ -171,6 +176,7 @@
searchResource,
exportData
} from "@/server/productionPlanning/customerForecastDemandReview";
import { syncData } from "@/server/productionPlanning/productInventory";
import { getColumnName } from "@/utils/allField.js";
export default {
@ -203,6 +209,7 @@
},
data() {
return {
syncDataDisable:false,
queryParams: {},
mode: "",
showPublicDialog: false,
@ -306,6 +313,28 @@
"SET_evaluationSecondResourceLoading",
"SET_articleDemandLoading",
]),
//
syncData() {
this.syncDataDisable = true
syncData().then(({ code }) => {
if (code == 200) {
this.$message({
type: "success",
message: "同步库存成功"
})
} else {
this.$message({
type: "error",
message: "同步库存失败"
})
}
this.syncDataDisable = false
}).catch(() => {
this.syncDataDisable = false
})
},
getPublishedVersion() {
publishedVersion().then(({ data = "" }) => {


+ 28
- 0
src/views/productionPlanning/emergencyOrder/index.vue View File

@ -27,6 +27,11 @@
@click="insertArt()">
插入
</el-button>
<el-button icon="el-icon-refresh"
size="mini"
class="reset-button-style"
:disabled="syncDataDisable"
@click="syncPurchase" >同步采购</el-button>
</el-form-item>
</el-form>
@ -103,6 +108,7 @@
getArtIdList,
publishData,
deleteall,
syncPurchase,
} from "@/server/productionPlanning/emergencyOrder";
import { getColumnName } from "@/utils/allField.js";
@ -111,6 +117,7 @@
name: "demandPlanning",
data() {
return {
syncDataDisable:false,
artId: "",
insertArtDoing:false,
artIdLoading:false,
@ -199,6 +206,27 @@
},
methods: {
syncPurchase(){
this.syncDataDisable = true
syncPurchase().then(({ code }) => {
if (code == 200) {
this.$message({
type: "success",
message: "同步库存成功"
})
} else {
this.$message({
type: "error",
message: "同步库存失败"
})
}
this.syncDataDisable = false
}).catch(() => {
this.syncDataDisable = false
})
},
initData(){
this.articleDemandLoading = true
deleteall().then(({ code,msg }) => {


+ 1
- 0
src/views/productionPlanning/productInventory/index.vue View File

@ -78,6 +78,7 @@
"ArticleStock-FGQty",
"ArticleStock-WIPQty",
"ArticleStock-PUCQty",
"ArticleStock-OSCQty",
],
articleList: [],
syncDataDisable: false,


Loading…
Cancel
Save