jcdm-main/pom.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/webservice/domain/Item.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/webservice/domain/ItemList.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReceivingServices.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/api/main/om/productionOrde/productionOrde.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
jcdm-ui/src/views/main/om/productionOrde/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
jcdm-main/pom.xml
@@ -74,6 +74,22 @@ <artifactId>lombok</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>3.1</version> </dependency> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>5.7.4</version> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.10.1</version> </dependency> </dependencies> </project> jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -4,6 +4,7 @@ import javax.servlet.http.HttpServletResponse; import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService; import com.jcdm.main.webservice.service.ReceivingServices; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -111,4 +112,14 @@ { return omProductionOrdeInfoService.upDownMove(omProductionOrdeInfo); } /** * tableåä¸ç§»ä¸ç§» */ @GetMapping("/getProductionNotice") public AjaxResult getProductionNotice(OmProductionOrdeInfo omProductionOrdeInfo) { ReceivingServices.insertWebserviceData(omProductionOrdeInfo.getProductionNotice()); return AjaxResult.success(); } } jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/domain/OmProductionOrdeInfo.java
@@ -164,6 +164,18 @@ private String flag; /** ç产éç¥åå· */ @Excel(name = "ç产éç¥åå·") private String productionNotice; public String getProductionNotice() { return productionNotice; } public void setProductionNotice(String productionNotice) { this.productionNotice = productionNotice; } public String getFlag() { return flag; } jcdm-main/src/main/java/com/jcdm/main/webservice/domain/Item.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,27 @@ package com.jcdm.main.webservice.domain; import lombok.Data; import java.util.Date; @Data public class Item { private String MAKTX; private String FEVOR; private String WERKS; private String LGORT; private String ZHTH; private String GSTRP; private String AUFNR; private String PSMNG; private String DISPO; private String ZSCTZD; private String PLNBEZ; private String ZSTAT; private String DAUAT; private String ZWS; private String KDAUF; private String ZUSER; private Date ZDATE; private String FERTH; } jcdm-main/src/main/java/com/jcdm/main/webservice/domain/ItemList.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,22 @@ package com.jcdm.main.webservice.domain; import java.util.List; public class ItemList { private List<Item> item; // æ·»å æé å½æ°ågetter/setteræ¹æ³ // æé å½æ° public ItemList() { } // GetteråSetteræ¹æ³ public List<Item> getItem() { return item; } public void setItem(List<Item> item) { this.item = item; } } jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReceivingServices.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,197 @@ package com.jcdm.main.webservice.service; import cn.hutool.json.JSONObject; import com.google.gson.Gson; import com.google.gson.JsonObject; import com.jcdm.main.da.collectionParamConf.service.IDaCollectionParamConfService; import com.jcdm.main.da.opcuaconfig.init.BeanUtils; import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo; import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService; import com.jcdm.main.om.workReport.service.IOmWorkReportService; import com.jcdm.main.webservice.domain.Item; import com.jcdm.main.webservice.domain.ItemList; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.auth.AuthScope; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.methods.RequestEntity; import org.apache.commons.httpclient.methods.StringRequestEntity; import org.apache.commons.io.IOUtils; import com.jcdm.main.om.productionOrde.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RestController; import javax.swing.border.Border; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.util.List; public class ReceivingServices { @Autowired // private static IOmProductionOrdeInfoService omProductionOrdeInfoService; private static IOmProductionOrdeInfoService omProductionOrdeInfoService = BeanUtils.getBean(IOmProductionOrdeInfoService.class); public static final String ProductionPlanInformationUrl = "http://podqapp.cfmoto.com.cn:50200/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_MES&receiverParty=&receiverService=&interface=SI_ZPP_CF_MES_005_SYN_OUT&interfaceNamespace=http://cfmoto.com/xi/MES"; public static void main(String[] args) throws Exception { // getInterfaceInformationXml(ProductionPlanInformationUrl,getProductionPlanInformationXml("A0055577")); // test1(); // String serviceUrl = "http://podqapp.cfmoto.com.cn:50200/XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_MES&receiverParty=&receiverService=&interface=SI_ZPP_CF_MES_005_SYN_OUT&interfaceNamespace=http://cfmoto.com/xi/MES"; // // String content = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:sap-com:document:sap:rfc:functions\">\n" + // " <soapenv:Header/>\n" + // " <soapenv:Body>\n" + // " <urn:ZPP_CF_MES_005>\n" + // " <!--Optional:-->\n" + // " <IV_WERKS>1000</IV_WERKS>\n" + // " <!--Optional:-->\n" + // " <IV_ZSCTZD>A0055577</IV_ZSCTZD>\n" + // " </urn:ZPP_CF_MES_005>\n" + // " </soapenv:Body>\n" + // "</soapenv:Envelope>"; // // HttpClientåéSOAPè¯·æ± // int timeout = 10000; // HttpClient client = new HttpClient(); // //å¦æéè¦ç¨æ·åå¯ç éªè¯ï¼ä¸éè¦éªè¯ç»å½åä¸éè¦ä»¥ä¸4è¡ // String username = "POMESUSER"; // String password = "12345tgb"; // UsernamePasswordCredentials creds = new UsernamePasswordCredentials(username, password); // client.getState().setCredentials(AuthScope.ANY, creds); // // PostMethod postMethod = new PostMethod(serviceUrl); // // 设置è¿æ¥è¶ æ¶ // client.getHttpConnectionManager().getParams().setConnectionTimeout(timeout); // // 设置读åæ¶é´è¶ æ¶ // client.getHttpConnectionManager().getParams().setSoTimeout(timeout); // // ç¶åæSoap请æ±æ°æ®æ·»å å°PostMethodä¸ // RequestEntity requestEntity = new StringRequestEntity(content, "text/xml", "UTF-8"); // // // 设置请æ±å¤´é¨ï¼å¦åå¯è½ä¼æ¥ âno SOAPAction headerâ çé误 // postMethod.setRequestHeader("SOAPAction", ""); // // 设置请æ±ä½ // postMethod.setRequestEntity(requestEntity); // int status = client.executeMethod(postMethod); // // if (status == 200) {// æå // InputStream is = postMethod.getResponseBodyAsStream(); // // è·å请æ±ç»æå符串 // String result = IOUtils.toString(is); // String jsonStr = xmlToJSON2(result); // Gson gson = new Gson(); // // å°jsonå符串转æ¢æ对象 // ItemList itemList = gson.fromJson(jsonStr, ItemList.class); // System.out.println("è¿åç»æ:" + result); // } else { // System.out.println("é误代ç ï¼" + status + ":" + postMethod.getResponseBodyAsString()); // } } public static void insertWebserviceData(String str) { String result = getInterfaceInformationXml(ProductionPlanInformationUrl, getProductionPlanInformationXml(str)); String jsonStr = xmlToJSON2(result); Gson gson = new Gson(); // å°jsonå符串转æ¢æ对象 ItemList itemList = gson.fromJson(jsonStr, ItemList.class); for (Item item : itemList.getItem()) { OmProductionOrdeInfo ordeInfo = new OmProductionOrdeInfo(); ordeInfo.setProductName(item.getMAKTX()); ordeInfo.setLineCode(item.getFEVOR()); ordeInfo.setWorkOrderNo(item.getAUFNR()); ordeInfo.setPlanQty((long) Double.parseDouble(item.getPSMNG())); ordeInfo.setProductionNotice(item.getZSTAT()); ordeInfo.setTypeZ(item.getFERTH()); ordeInfo.setCreateUser(item.getZUSER()); ordeInfo.setCreateTime(item.getZDATE()); omProductionOrdeInfoService.insertOmProductionOrdeInfo(ordeInfo); } } public static String getInterfaceInformationXml(String url,String xml){ int timeout = 10000; HttpClient client = new HttpClient(); //å¦æéè¦ç¨æ·åå¯ç éªè¯ï¼ä¸éè¦éªè¯ç»å½åä¸éè¦ä»¥ä¸4è¡ String username = "POMESUSER"; String password = "12345tgb"; UsernamePasswordCredentials creds = new UsernamePasswordCredentials(username, password); client.getState().setCredentials(AuthScope.ANY, creds); PostMethod postMethod = new PostMethod(url); // 设置è¿æ¥è¶ æ¶ client.getHttpConnectionManager().getParams().setConnectionTimeout(timeout); // 设置读åæ¶é´è¶ æ¶ client.getHttpConnectionManager().getParams().setSoTimeout(timeout); // ç¶åæSoap请æ±æ°æ®æ·»å å°PostMethodä¸ RequestEntity requestEntity = null; try { requestEntity = new StringRequestEntity(xml, "text/xml", "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } // 设置请æ±å¤´é¨ï¼å¦åå¯è½ä¼æ¥ âno SOAPAction headerâ çé误 postMethod.setRequestHeader("SOAPAction", ""); // 设置请æ±ä½ postMethod.setRequestEntity(requestEntity); int status = 0; try { status = client.executeMethod(postMethod); } catch (IOException e) { throw new RuntimeException(e); } if (status == 200) {// æå InputStream is = null; try { is = postMethod.getResponseBodyAsStream(); } catch (IOException e) { throw new RuntimeException(e); } // è·å请æ±ç»æå符串 String result = null; try { result = IOUtils.toString(is); return result; } catch (IOException e) { throw new RuntimeException(e); } } return "æ¥å£è°ç¨é误"; } public static String getProductionPlanInformationXml(String str){ String content = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:sap-com:document:sap:rfc:functions\">\n" + " <soapenv:Header/>\n" + " <soapenv:Body>\n" + " <urn:ZPP_CF_MES_005>\n" + " <!--Optional:-->\n" + " <IV_WERKS>1000</IV_WERKS>\n" + " <!--Optional:-->\n" + " <IV_ZSCTZD>"+str+"</IV_ZSCTZD>\n" + " </urn:ZPP_CF_MES_005>\n" + " </soapenv:Body>\n" + "</soapenv:Envelope>"; return content; } /** * æ¹å¼--è´° * 使ç¨hutoolå·¥å ·å ä¸çå·¥å ·è½¬å * @param xmlStr * @return */ public static String xmlToJSON2(String xmlStr){ JSONObject jsonObject1 = cn.hutool.json.XML.toJSONObject(xmlStr, true); Gson gson = new Gson(); JsonObject jsonObject2 = gson.fromJson(jsonObject1.toString(), JsonObject.class); JsonObject etData = jsonObject2 .getAsJsonObject("SOAP:Envelope") .getAsJsonObject("SOAP:Body") .getAsJsonObject("n0:ZPP_CF_MES_005.Response") .getAsJsonObject("ET_DATA"); return etData.toString(); } } jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml
@@ -44,10 +44,12 @@ <result property="spareField3" column="spare_field_3" /> <result property="spareField4" column="spare_field_4" /> <result property="typeZ" column="type_z" /> <result property="productionNotice" column="production_notice" /> </resultMap> <sql id="selectOmProductionOrdeInfoVo"> select id, work_order_no, sales_order_code,type_z,product_code, product_name, workshop_code, line_code, route_code, bom_code, recipe_code, plan_qty, actual_qty, bad_qty, scrap_qty, repair_qty, actual_online_qty, online_completion_mark, demand_date, plan_start_time, plan_end_time, actual_start_time, actual_end_time, serial_number, order_status, create_time, update_time, create_user, update_user, remarks, stream_number, custom, market_area_code, software_version_code, product_company_code, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from om_production_orde_info select id, work_order_no, sales_order_code,type_z,product_code, product_name, workshop_code, line_code, route_code, bom_code, recipe_code, plan_qty, actual_qty, bad_qty, scrap_qty, repair_qty, actual_online_qty, online_completion_mark, demand_date, plan_start_time, plan_end_time, actual_start_time, actual_end_time, serial_number, order_status, create_time, update_time, create_user, update_user, remarks, stream_number, custom, market_area_code, software_version_code, product_company_code, spare_field_1, spare_field_2, spare_field_3, spare_field_4, production_notice from om_production_orde_info </sql> <select id="selectOmProductionOrdeInfoList" parameterType="OmProductionOrdeInfo" resultMap="OmProductionOrdeInfoResult"> @@ -69,6 +71,8 @@ <if test="typeZ != null and typeZ != ''"> and type_z like concat('%', #{typeZ}, '%')</if> <if test="softwareVersionCode != null and softwareVersionCode != ''"> and software_version_code like concat('%', #{softwareVersionCode}, '%')</if> <if test="productCompanyCode != null and productCompanyCode != ''"> and product_company_code like concat('%', #{productCompanyCode}, '%')</if> <if test="productionNotice != null and productionNotice != ''"> and production_notice like concat('%', #{productionNotice}, '%')</if> </where> ORDER BY stream_number DESC </select> @@ -120,7 +124,9 @@ <if test="spareField2 != null">spare_field_2,</if> <if test="spareField3 != null">spare_field_3,</if> <if test="spareField4 != null">spare_field_4,</if> </trim> <if test="productionNotice != null">production_notice,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null">#{id},</if> <if test="workOrderNo != null">#{workOrderNo},</if> @@ -161,7 +167,9 @@ <if test="spareField2 != null">#{spareField2},</if> <if test="spareField3 != null">#{spareField3},</if> <if test="spareField4 != null">#{spareField4},</if> </trim> <if test="productionNotice != null">#{productionNotice},</if> </trim> </insert> <update id="updateOmProductionOrdeInfo" parameterType="OmProductionOrdeInfo"> @@ -205,6 +213,8 @@ <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> <if test="spareField3 != null">spare_field_3 = #{spareField3},</if> <if test="spareField4 != null">spare_field_4 = #{spareField4},</if> <if test="productionNotice != null">production_notice = #{productionNotice},</if> </trim> where id = #{id} </update> jcdm-ui/src/api/main/om/productionOrde/productionOrde.js
@@ -9,6 +9,14 @@ }) } export function getProductionNotice(query) { return request({ url: '/om/productionOrde/getProductionNotice', method: 'get', params: query }) } export function upDownMove(query) { return request({ url: '/om/productionOrde/upDownMove', jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -2,12 +2,15 @@ <div class="app-container"> <el-card class="box-card"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form-item label-width="80" label="ç产工åå·" prop="workOrderNo"> <el-input v-model="queryParams.workOrderNo" placeholder="请è¾å ¥ç产工åå·" clearable @keyup.enter.native="handleQuery"/> <el-form-item label-width="100" label="ç产éç¥å" prop="productName"> <el-input v-model="queryParams.productionNotice" placeholder="请è¾å ¥ç产éç¥å" clearable @keyup.enter.native="handleQuery"/> </el-form-item> <el-form-item label="产åå称" prop="productName"> <el-input v-model="queryParams.productName" placeholder="请è¾å ¥äº§åå称" clearable @keyup.enter.native="handleQuery"/> <el-form-item label-width="80" label="ç产订å" prop="workOrderNo"> <el-input v-model="queryParams.workOrderNo" placeholder="请è¾å ¥ç产订å" clearable @keyup.enter.native="handleQuery"/> </el-form-item> <!-- <el-form-item label="产åå称" prop="productName">--> <!-- <el-input v-model="queryParams.productName" placeholder="请è¾å ¥äº§åå称" clearable @keyup.enter.native="handleQuery"/>--> <!-- </el-form-item>--> <el-form-item label="å·¥åç¶æ" prop="orderStatus"> <el-select v-model="queryParams.orderStatus" placeholder="请éæ©å·¥åç¶æ" clearable> <el-option @@ -18,6 +21,7 @@ </el-select> </el-form-item> <el-form-item style="float: right"> <el-button type="warning" icon="el-icon-download" size="mini" @click="getProductionNotice">æ¥æ¶</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> <el-button type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">é«çº§æ¥è¯¢</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> @@ -129,20 +133,20 @@ <el-table border v-loading="loading" :data="productionOrdeList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="ç产工åå·" width="160" align="center"> <el-table-column label="ç产éç¥åå·" width="160" align="center" prop="productionNotice"> </el-table-column> <el-table-column label="ç产订å" width="160" align="center"> <template slot-scope="scope"> <router-link :to="{path: '/main/workReport-data/index/', query: {workOrderNo: scope.row.workOrderNo} }" class="link-type"> <span>{{ scope.row.workOrderNo }}</span> </router-link> </template> </el-table-column> <el-table-column label="订åç¼å·" width="140" align="center" prop="salesOrderCode"> <el-table-column label="æºå" width="160" align="center" prop="typeZ"> </el-table-column> <el-table-column label="产åç¼å·" width="140" align="center" prop="productCode"> <el-table-column label="éæ±æ°é" align="center" prop="planQty"> </el-table-column> <el-table-column label="产åå称" width="160" align="center" prop="productName"> </el-table-column> <el-table-column label="ç§ç±»" width="160" align="center" prop="typeZ"> <el-table-column label="ç©æç±»å" width="140" align="center" prop="productCode"> </el-table-column> <el-table-column label="å®é æ°é" width="160" align="center" prop="actualQty"> </el-table-column> @@ -151,65 +155,74 @@ <dict-tag :options="dict.type.order_state" :value="scope.row.orderStatus"/> </template> </el-table-column> <el-table-column label="车é´ç¼å·" align="center" prop="workshopCode"> <el-table-column label="å·¥å" align="center" prop="workshopCode"> </el-table-column> <el-table-column label="产线ç¼å·" align="center" prop="lineCode"> <el-table-column label="ä»åº" align="center"> </el-table-column> <el-table-column label="å·¥èºæµç¨" width="140" align="center" prop="routeCode"> <el-table-column label="产线" align="center" prop="lineCode"> </el-table-column> <el-table-column label="产åBOM" width="140" align="center" prop="bomCode"> <el-table-column label="订åç±»å" align="center"> </el-table-column> <el-table-column label="å·¥èºé æ¹" width="140" align="center" prop="recipeCode"> <el-table-column label="ZWS" align="center"> </el-table-column> <el-table-column label="计åæ°é" align="center" prop="planQty"> <!-- <el-table-column label="å·¥èºæµç¨" width="140" align="center" prop="routeCode">--> <!-- </el-table-column>--> <!-- <el-table-column label="产åBOM" width="140" align="center" prop="bomCode">--> <!-- </el-table-column>--> <!-- <el-table-column label="å·¥èºé æ¹" width="140" align="center" prop="recipeCode">--> <!-- </el-table-column>--> <!-- <el-table-column label="å®é æ°é" align="center" prop="actualQty">--> <!-- </el-table-column>--> <!-- <el-table-column label="å®é ä¸çº¿æ°é" width="100" align="center" prop="actualOnlineQty">--> <!-- </el-table-column>--> <!-- <el-table-column label="éæ±æ¥æ" align="center" prop="demandDate" width="180">--> <!-- </el-table-column>--> <!-- <el-table-column label="计åå¼å§æ¶é´" width="160" align="center" prop="planStartTime">--> <!-- </el-table-column>--> <!-- <el-table-column label="计åç»ææ¶é´" width="160" align="center" prop="planEndTime">--> <!-- </el-table-column>--> <!-- <el-table-column label="å®é å¼å§æ¶é´" width="160" align="center" prop="actualStartTime">--> <!-- </el-table-column>--> <!-- <el-table-column label="å®é ç»ææ¶é´" width="160" align="center" prop="actualEndTime">--> <!-- </el-table-column>--> <!-- <el-table-column width="160" label="æ´æ°æ¶é´" align="center" prop="updateTime">--> <!-- </el-table-column>--> <el-table-column label="éç¥åå¶å人" width="80" align="center" prop="createUser"> </el-table-column> <el-table-column label="å®é æ°é" align="center" prop="actualQty"> <el-table-column width="160" label="éç¥çææ¥æ" align="center" prop="createTime"> </el-table-column> <el-table-column label="å®é ä¸çº¿æ°é" width="100" align="center" prop="actualOnlineQty"> <el-table-column label="æåæè¿°" width="160" align="center" prop="productName"> </el-table-column> <el-table-column label="éæ±æ¥æ" align="center" prop="demandDate" width="180"> </el-table-column> <el-table-column label="计åå¼å§æ¶é´" width="160" align="center" prop="planStartTime"> </el-table-column> <el-table-column label="计åç»ææ¶é´" width="160" align="center" prop="planEndTime"> </el-table-column> <el-table-column label="å®é å¼å§æ¶é´" width="160" align="center" prop="actualStartTime"> </el-table-column> <el-table-column label="å®é ç»ææ¶é´" width="160" align="center" prop="actualEndTime"> </el-table-column> <el-table-column width="160" label="å建æ¶é´" align="center" prop="createTime"> </el-table-column> <el-table-column width="160" label="æ´æ°æ¶é´" align="center" prop="updateTime"> </el-table-column> <el-table-column label="å建人" width="80" align="center" prop="createUser"> </el-table-column> <el-table-column label="ä¿®æ¹äºº" width="80" align="center" prop="updateUser"> </el-table-column> <el-table-column label="å¤æ³¨" width="100" align="center" prop="remarks"> </el-table-column> <el-table-column label="æµæ°´å·" align="center" prop="streamNumber"> </el-table-column> <el-table-column label="客æ·" width="80" align="center" prop="custom"> </el-table-column> <el-table-column fixed="right" width="350" label="æä½" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <!-- å·¥åç¶æï¼1å建ã2å·²åå¸ã3ç产ä¸ã4å·²å»ç»ã5å·²å®å·¥ã6å·²å ³éï¼ --> <el-button type="success" :disabled="scope.row.orderStatus !== '1'" style="width: 72px" plain @click="handleCommand('3',scope.row.id)" size="mini"> å¼å§</el-button> <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '2' && scope.row.orderStatus !== '3'" v-if="scope.row.orderStatus !== '2'&& scope.row.orderStatus !== '4'" plain @click="handleCommand('4',scope.row.id)" type="warning" size="mini"> å»ç»</el-button> <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '4'" v-if="scope.row.orderStatus === '4'" plain @click="handleCommand('3',scope.row.id)" type="warning" size="mini"> 解å»</el-button> <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '1'" plain @click="handleCommand('6',scope.row.id)" v-if="scope.row.orderStatus === '1'||scope.row.orderStatus === '3'||scope.row.orderStatus === '4'||scope.row.orderStatus === '5'" type="danger" size="mini"> å ³é</el-button> <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini"> å¯ç¨</el-button> <el-button style="width: 72px" :disabled="scope.row.orderStatus === '4'||scope.row.orderStatus === '6'" v-if="scope.row.orderStatus !== '5'" @click="handleCommand('5',scope.row.id)" type="success" size="mini"> å®æ</el-button> <el-button style="width: 72px" :disabled="scope.row.orderStatus === '5'" v-if="scope.row.orderStatus === '5'" type="success" size="mini">å·²å®å·¥</el-button> <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini"> å¯ç¨</el-button> </template> </el-table-column> <!-- <el-table-column label="ä¿®æ¹äºº" width="80" align="center" prop="updateUser">--> <!-- </el-table-column>--> <!-- <el-table-column label="å¤æ³¨" width="100" align="center" prop="remarks">--> <!-- </el-table-column>--> <!-- <el-table-column label="æµæ°´å·" align="center" prop="streamNumber">--> <!-- </el-table-column>--> <!-- <el-table-column label="客æ·" width="80" align="center" prop="custom">--> <!-- </el-table-column>--> <!-- <el-table-column fixed="right" width="350" label="æä½" align="center" class-name="small-padding fixed-width">--> <!-- <template slot-scope="scope">--> <!-- <!– å·¥åç¶æï¼1å建ã2å·²åå¸ã3ç产ä¸ã4å·²å»ç»ã5å·²å®å·¥ã6å·²å ³éï¼ –>--> <!-- <el-button type="success" :disabled="scope.row.orderStatus !== '1'" style="width: 72px" plain @click="handleCommand('3',scope.row.id)" size="mini">--> <!-- å¼å§</el-button>--> <!-- <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '2' && scope.row.orderStatus !== '3'" v-if="scope.row.orderStatus !== '2'&& scope.row.orderStatus !== '4'" plain @click="handleCommand('4',scope.row.id)" type="warning" size="mini">--> <!-- å»ç»</el-button>--> <!-- <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '4'" v-if="scope.row.orderStatus === '4'" plain @click="handleCommand('3',scope.row.id)" type="warning" size="mini">--> <!-- 解å»</el-button>--> <!-- <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '1'" plain @click="handleCommand('6',scope.row.id)" v-if="scope.row.orderStatus === '1'||scope.row.orderStatus === '3'||scope.row.orderStatus === '4'||scope.row.orderStatus === '5'" type="danger" size="mini">--> <!-- å ³é</el-button>--> <!-- <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">--> <!-- å¯ç¨</el-button>--> <!-- <el-button style="width: 72px" :disabled="scope.row.orderStatus === '4'||scope.row.orderStatus === '6'" v-if="scope.row.orderStatus !== '5'" @click="handleCommand('5',scope.row.id)" type="success" size="mini">--> <!-- å®æ</el-button>--> <!-- <el-button style="width: 72px" :disabled="scope.row.orderStatus === '5'" v-if="scope.row.orderStatus === '5'" type="success" size="mini">å·²å®å·¥</el-button> <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">--> <!-- å¯ç¨</el-button>--> <!-- </template>--> <!-- </el-table-column>--> </el-table> </el-card> @@ -230,7 +243,7 @@ </span> <el-form ref="form" inline :model="form" :rules="rules" label-width="80px"> <el-form-item label="å·¥åå·" prop="workOrderNo"> <el-input v-model="form.workOrderNo" placeholder="请è¾å ¥ç产工åå·" /> <el-input v-model="form.workOrderNo" placeholder="请è¾å ¥ç产订å" /> </el-form-item> <el-form-item label="订åç¼å·" prop="salesOrderCode"> <el-input v-model="form.salesOrderCode" placeholder="请è¾å ¥è®¢åç¼å·" /> @@ -378,7 +391,7 @@ import { listProductBom } from "@/api/main/bs/ProductBom/ProductBom"; import { listTechnologyRoute} from "@/api/main/bs/technologyRoute/technologyRoute"; import ItemSelect from "@/components/itemSelect/single.vue"; import { upDownMove, listProductionOrde, getProductionOrde, delProductionOrde, addProductionOrde, updateProductionOrde } from "@/api/main/om/productionOrde/productionOrde"; import { getProductionNotice, upDownMove, listProductionOrde, getProductionOrde, delProductionOrde, addProductionOrde, updateProductionOrde } from "@/api/main/om/productionOrde/productionOrde"; import { listOrderScheduling, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling,generateNumbers } from "@/api/main/bs/orderScheduling/orderScheduling"; export default { @@ -442,6 +455,7 @@ typeZ: null, flag: null, adds:null, productionNotice: null, }, // 表ååæ° @@ -479,10 +493,14 @@ this.initWorkshop(); }, methods: { getProductionNotice(){ getProductionNotice(this.queryParams).then(response => { this.$modal.msgSuccess("æ¥æ¶æå"); this.queryParams = {} this.getList(); }); }, //æ°ç»çæ changeDay(day){ this.change.day = day; let adds =this.form.typeZ+this.change.year+this.change.month+this.change.day+this.form.actualQty; @@ -498,8 +516,6 @@ let adds =this.form.typeZ+this.change.year+this.change.month+this.change.day+this.form.actualQty; this.form.adds = adds }, moveUp(row, val){ console.log(val) const ids = row.id || this.ids @@ -646,7 +662,7 @@ this.initWorkshop(); this.reset(); this.open = true; this.titleName = "æ·»å ç产工å"; this.titleName = "æ·»å ç产订å"; }, /** åæ¥æé®æä½ */ CreatehandleUpdate(Row) { @@ -673,7 +689,7 @@ console.log(response.data) this.form = response.data; this.open = true; this.titleName = "ä¿®æ¹ç产工å"; this.titleName = "ä¿®æ¹ç产订å"; }); }, /** æ交æé® */ @@ -699,7 +715,7 @@ /** å é¤æé®æä½ */ handleDelete(row) { const ids = row.id || this.ids; this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤ç产工åç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤ç产订åç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { return delProductionOrde(ids); }).then(() => { this.getList();