zhaoxiaolin 7 months ago
parent d598dbd775
commit 13a7909e26

@ -102,18 +102,6 @@
v-hasPermi="['mes:pro:proroute:import']" v-hasPermi="['mes:pro:proroute:import']"
>批量上传附件</el-button> >批量上传附件</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-download"
:disabled="multiple"
size="mini"
@click="handleSyncProductSAP"
v-hasPermi="['mes:pro:order:add']"
>同步物料工艺
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -341,7 +329,7 @@
</template> </template>
<script> <script>
import { listProroute, getProroute, delProroute, addProroute, updateProroute,syncSAP,importProroute,syncProductSAP } from "@/api/technology/proroute"; import { listProroute, getProroute, delProroute, addProroute, updateProroute,syncSAP,importProroute} from "@/api/technology/proroute";
import Routeprocess from "./routeprocess"; import Routeprocess from "./routeprocess";
import Routeprodproduct from "./routeprodproduct"; import Routeprodproduct from "./routeprodproduct";
export default { export default {
@ -355,7 +343,6 @@ export default {
loading: true, loading: true,
// //
ids: [], ids: [],
productCodes:[],
// //
single: true, single: true,
// //
@ -462,7 +449,6 @@ export default {
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.routeId) this.ids = selection.map(item => item.routeId)
this.productCodes = selection.map(item => item.productCode)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -616,11 +602,6 @@ export default {
this.$modal.msgSuccess('同步成功') this.$modal.msgSuccess('同步成功')
}).catch(() => { }).catch(() => {
}) })
},
/**选择产品进行工艺同步**/
handleSyncProductSAP(){
const productCodes = this.productCodes;
return syncProductSAP(productCodes);
} }
} }
}; };

@ -85,6 +85,18 @@
>导出</el-button >导出</el-button
> >
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-download"
:disabled="multiple"
size="mini"
@click="handleSyncProductSAP"
v-hasPermi="['wms:product:edit']"
>同步物料工艺
</el-button>
</el-col>
<right-toolbar <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@queryTable="getList" @queryTable="getList"
@ -508,6 +520,7 @@ import {
addProduct, addProduct,
updateProduct, updateProduct,
} from "@/api/wms/product"; } from "@/api/wms/product";
import { syncProductSAP } from "@/api/technology/proroute";
export default { export default {
name: "Product", name: "Product",
@ -524,6 +537,7 @@ export default {
loading: true, loading: true,
// //
ids: [], ids: [],
productCodes:[],
// //
single: true, single: true,
// //
@ -690,6 +704,7 @@ export default {
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.productId); this.ids = selection.map((item) => item.productId);
this.productCodes = selection.map(item => item.productCode)
this.single = selection.length !== 1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
@ -765,6 +780,11 @@ export default {
`product_${new Date().getTime()}.xlsx` `product_${new Date().getTime()}.xlsx`
); );
}, },
/**选择产品进行工艺同步**/
handleSyncProductSAP(){
const productCodes = this.productCodes;
return syncProductSAP(productCodes);
}
}, },
}; };
</script> </script>

Loading…
Cancel
Save