|
|
|
@ -102,6 +102,18 @@
|
|
|
|
|
v-hasPermi="['mes:pro:proroute:import']"
|
|
|
|
|
>批量上传附件</el-button>
|
|
|
|
|
</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>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
@ -116,7 +128,9 @@
|
|
|
|
|
>{{scope.row.routeCode}}</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="产品编码" align="center" prop="productCode" width="250"/>
|
|
|
|
|
<el-table-column label="产品编码" align="center" prop="productCode" width="130"
|
|
|
|
|
:formatter="productCodeFormate"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column label="工艺路线名称" align="center" prop="routeName" width="250"/>
|
|
|
|
|
<el-table-column label="工艺路线说明" align="center" prop="routeDesc" width="250"/>
|
|
|
|
|
<el-table-column label="工艺路线版本" align="center" prop="routeVersion" width="100"/>
|
|
|
|
@ -327,7 +341,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listProroute, getProroute, delProroute, addProroute, updateProroute,syncSAP,importProroute } from "@/api/technology/proroute";
|
|
|
|
|
import { listProroute, getProroute, delProroute, addProroute, updateProroute,syncSAP,importProroute,syncProductSAP } from "@/api/technology/proroute";
|
|
|
|
|
import Routeprocess from "./routeprocess";
|
|
|
|
|
import Routeprodproduct from "./routeprodproduct";
|
|
|
|
|
export default {
|
|
|
|
@ -341,6 +355,7 @@ export default {
|
|
|
|
|
loading: true,
|
|
|
|
|
// 选中数组
|
|
|
|
|
ids: [],
|
|
|
|
|
productCodes:[],
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
single: true,
|
|
|
|
|
// 非多个禁用
|
|
|
|
@ -391,6 +406,12 @@ export default {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
//产品编码格式化
|
|
|
|
|
productCodeFormate(row, column, cellValue){
|
|
|
|
|
if(cellValue !=null){
|
|
|
|
|
return cellValue.slice(7,18); //返回值
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/** 查询工艺路线列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -441,6 +462,7 @@ export default {
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.routeId)
|
|
|
|
|
this.productCodes = selection.map(item => item.productCode)
|
|
|
|
|
this.single = selection.length!==1
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
},
|
|
|
|
@ -594,6 +616,11 @@ export default {
|
|
|
|
|
this.$modal.msgSuccess('同步成功')
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
/**选择产品进行工艺同步**/
|
|
|
|
|
handleSyncProductSAP(){
|
|
|
|
|
const productCodes = this.productCodes;
|
|
|
|
|
return syncProductSAP(productCodes);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|