|
@@ -87,7 +87,7 @@
|
|
|
icon="el-icon-copy-document"
|
|
|
:disabled="false"
|
|
|
@click="copyRow(row)"
|
|
|
- >复制</el-button
|
|
|
+ >升版</el-button
|
|
|
>
|
|
|
<el-button link icon="el-icon-copy-document" @click="bindProcessPop(row)"
|
|
|
>绑定</el-button
|
|
@@ -212,7 +212,14 @@ import { ref, getCurrentInstance } from "vue";
|
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
|
import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
|
import { useDictionaryStore } from "@/store";
|
|
|
-import {copyList, copyProductRoute, copyRoute, editRouteWith, updateMain} from "@/api/craft/route/index";
|
|
|
+import {
|
|
|
+ copyList,
|
|
|
+ copyProductRoute,
|
|
|
+ copyRoute,
|
|
|
+ editRouteWith,
|
|
|
+ getMaxRouteVersion,
|
|
|
+ updateMain
|
|
|
+} from "@/api/craft/route/index";
|
|
|
import { getUserList } from "@/api/system/user/index";
|
|
|
import RouteChangeLog from "@/views/base/craftManagement/route/components/routeChangeLog.vue";
|
|
|
import {ElMessageBox} from "element-plus";
|
|
@@ -255,10 +262,16 @@ const dialog2 = ref({
|
|
|
title: "绑定",
|
|
|
visible: false,
|
|
|
});
|
|
|
+const routeData =ref({});
|
|
|
// 传入一个url,后面不带/
|
|
|
const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
|
useCrud({
|
|
|
src: "/api/v1/op/route",
|
|
|
+ afterAdd:(routeData)=>{
|
|
|
+ router.push({
|
|
|
+ path: `/base/craftManagement/bindProcess/${routeData.id}/${routeData.prodtCode}`,
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
|
|
|
Methords; //增删改查
|
|
@@ -389,15 +402,31 @@ const startChooseRoute = () => {
|
|
|
};
|
|
|
// 已经绑定了工序的可以复制,跟后端HT商量只传id即可。
|
|
|
const copyRow = (row) => {
|
|
|
- option.value.column[4].display = false;
|
|
|
- option.value.column[5].display = false;
|
|
|
+ option.value.column.forEach((item)=>{
|
|
|
+ if(item.prop==="commonRouteCode"||item.prop==="commonRouteName"){
|
|
|
+ item.display=false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ );
|
|
|
if (row.usable == 0) {
|
|
|
ElMessage.error("该路线未被绑定!");
|
|
|
return;
|
|
|
}
|
|
|
- form.value = Object.assign(form.value, row);
|
|
|
- form.value.processRouteVersion = "";
|
|
|
- crudRef.value.rowAdd();
|
|
|
+ getMaxRouteVersion(row.prodtCode).then((data)=>{
|
|
|
+ if(data.code==='200'){
|
|
|
+ form.value = Object.assign(form.value, row);
|
|
|
+ form.value.processRouteVersion ='';
|
|
|
+ if(data.data){
|
|
|
+ form.value.processRouteVersion =(parseFloat(data.data)+1).toFixed(1);
|
|
|
+ }
|
|
|
+ form.value.prodtName1 = row.prodtName;
|
|
|
+ crudRef.value.rowAdd();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ )
|
|
|
+
|
|
|
};
|
|
|
|
|
|
const renameRoute = () => {
|