Browse Source

根据需求添加同步库存及采购

pull/188/head
xuxiaoming 3 years ago
parent
commit
e2bc96ab0f
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 getArtIdList = () => get("/admin/base/article/selectdata?ArtTypeId=FINISHED")
export const deleteall = () => deleteData("/admin/ap/articledemandemergency/deleteall") 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计算 MPS计算
</el-button> </el-button>
</div> </div>
<el-button icon="el-icon-refresh"
size="mini"
class="reset-button-style"
:disabled="syncDataDisable"
@click="syncData" >同步库存</el-button>
</div> </div>
<div class="button_list"> <div class="button_list">
<img :src="require('@/assets/icon/reload.png')" <img :src="require('@/assets/icon/reload.png')"
@ -171,6 +176,7 @@
searchResource, searchResource,
exportData exportData
} from "@/server/productionPlanning/customerForecastDemandReview"; } from "@/server/productionPlanning/customerForecastDemandReview";
import { syncData } from "@/server/productionPlanning/productInventory";
import { getColumnName } from "@/utils/allField.js"; import { getColumnName } from "@/utils/allField.js";
export default { export default {
@ -203,6 +209,7 @@
}, },
data() { data() {
return { return {
syncDataDisable:false,
queryParams: {}, queryParams: {},
mode: "", mode: "",
showPublicDialog: false, showPublicDialog: false,
@ -306,6 +313,28 @@
"SET_evaluationSecondResourceLoading", "SET_evaluationSecondResourceLoading",
"SET_articleDemandLoading", "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() { getPublishedVersion() {
publishedVersion().then(({ data = "" }) => { publishedVersion().then(({ data = "" }) => {


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

@ -27,6 +27,11 @@
@click="insertArt()"> @click="insertArt()">
插入 插入
</el-button> </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-item>
</el-form> </el-form>
@ -103,6 +108,7 @@
getArtIdList, getArtIdList,
publishData, publishData,
deleteall, deleteall,
syncPurchase,
} from "@/server/productionPlanning/emergencyOrder"; } from "@/server/productionPlanning/emergencyOrder";
import { getColumnName } from "@/utils/allField.js"; import { getColumnName } from "@/utils/allField.js";
@ -111,6 +117,7 @@
name: "demandPlanning", name: "demandPlanning",
data() { data() {
return { return {
syncDataDisable:false,
artId: "", artId: "",
insertArtDoing:false, insertArtDoing:false,
artIdLoading:false, artIdLoading:false,
@ -199,6 +206,27 @@
}, },
methods: { 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(){ initData(){
this.articleDemandLoading = true this.articleDemandLoading = true
deleteall().then(({ code,msg }) => { deleteall().then(({ code,msg }) => {


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

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


Loading…
Cancel
Save