tty 1 anno fa
parent
commit
2832ed3bb7

+ 3 - 3
src/api/mes_api_gty/orderAccounting.js

@@ -68,11 +68,11 @@ export const getOrderYj = (params) => {
 }
 
 // 4.2考核设置-更新工单印件资料
-export const updateOrderYj = (params) => {
+export const updateOrderYj = (data) => {
   return service({
     url: '/mes_server/order_super_loss/updateOrderYj',
-    method: 'get',
-    params
+    method: 'post',
+    data
   })
 }
 

+ 7 - 0
src/view/performance/12-orderAccounting/componets/detail.vue

@@ -145,6 +145,13 @@ const detailData = ref([])
 const input = ref(props['gdbh'])
 
 const handleShowDetail = async() => {
+  if (!input.value) {
+    ElMessage({
+      type: 'info',
+      message: '请输入工单编号',
+    })
+    return
+  }
   const res = await getOrderGy({ order: input.value })
   if (res['code'] === 0) {
     const { data } = res

+ 3 - 3
src/view/performance/12-orderAccounting/componets/gdcjstj.vue

@@ -155,9 +155,9 @@ const handlePrint2 = async() => {
         'cl': item['total_cl'],
         'jhsh': item['计划损耗'],
         'zcfp': item['sczl_zcfp'],
-        'zjf': item['waste_quality'],
-        'wxsft': item['intangible_loss'],
-        'jssl': item['loss'],
+        'zjf': item['质检废'],
+        'wxsft': item['无形损分摊'],
+        'jssl': item['节损数量'],
         'cdbl': item['超节损承担比例'],
         'jsj': `<span style="color: red;">${item['loss'] ? item['loss'] : ''}</span>`,
       })),

+ 8 - 1
src/view/performance/12-orderAccounting/componets/khsz.vue

@@ -117,13 +117,14 @@ export const getOrderYj = (params) => {
 </script>
 
 <script setup>
-import { watch, ref, reactive, defineProps, defineEmits, onBeforeUnmount } from 'vue'
+import { watch, ref, reactive, defineProps, defineEmits, onBeforeUnmount, onMounted } from 'vue'
 
 const props = defineProps(['modelValue', 'gdbh'])
 const emits = defineEmits(['update:modelValue'])
 const input = ref(props.gdbh)
 const tableData = ref([])
 const handleGetTable = async() => {
+  if (!input.value) return
   const res = await getOrderYj({ order: input.value })
   if (res['code'] === 0) {
     const { data } = res
@@ -134,6 +135,12 @@ const handleGetTable = async() => {
     tableData.value = arr
   }
 }
+
+// 进入后自动搜索
+onMounted(() => {
+  handleGetTable()
+})
+
 </script>
 
 <style scoped>

+ 105 - 4
src/view/performance/12-orderAccounting/index.vue

@@ -79,6 +79,22 @@
               >核检废品分布
               </el-button>
 
+              <el-button
+                type="primary"
+                icon="edit"
+                class="bt"
+                @click="handleGddy"
+              >工单打印
+              </el-button>
+
+              <el-button
+                type="primary"
+                icon="edit"
+                class="bt"
+                @click="()=>{pd_lcdlist = true}"
+              >流程单查询
+              </el-button>
+
             </el-form-item>
           </el-form>
 
@@ -135,6 +151,82 @@
               v-model="dialogHjfpfb"
               :val="gdbh"
             />
+
+            <!-- 工单打印 -->
+            <PrintPage ref="printPageRef" />
+
+            <!--流程单查询【弹窗】-->
+            <el-dialog
+              v-model="pd_lcdlist"
+              title="工单工序生产进程"
+              fullscreen
+            >
+              <div style="width: 100%;height: 100%;">
+                <el-button
+                  type=""
+                  @click="()=>{pd_lcdlist = false}"
+                >退出</el-button>
+              </div>
+              <div style="width: 100%; height: 100%; display: flex; align-items: center;">
+                <el-form-item
+                  label="工单编号"
+                  style="margin-right: 20px; padding: 0;"
+                >
+                  <el-input
+                    v-model="gdbh"
+                  />
+                </el-form-item>
+                <el-form-item
+                  label=""
+                  style="margin-right: 5px; padding: 0;"
+                >
+                  <el-input
+                    v-model="gdbh"
+                    disabled
+                  />
+                </el-form-item>
+                <el-form-item
+                  label=""
+                  style="margin-right: 5px; padding: 0;"
+                >
+                  <el-input
+                    v-model="gdbh"
+                    disabled
+                    style="width: 500px"
+                  />
+                </el-form-item>
+              </div>
+              <div style="width: 100%; height: 70vh; display: flex;">
+                <layout>
+                  <layout-sider
+                    :resize-directions="['right']"
+                    :width="240"
+                    style="margin-right: 10px;height: 70vh;"
+                  >
+                    <div class="JKWTree-tree">
+                      <el-tree
+                        default-expand-all
+                      />
+                    </div>
+                  </layout-sider>
+                  <layout-main>
+                    <!-- 这里放右侧的内容 -->
+                    <el-space wrap>
+                      <!-- 右侧内容 -->
+                      <!-- <template v-for="item in processList.total_process">
+                        <el-button
+                          disabled
+                          :type="! processList.process.includes(item) ? 'danger' : 'info'"
+                          plain
+                          style="width: 50px"
+                        >{{ item }}</el-button>
+                      </template> -->
+                    </el-space>
+                  </layout-main>
+                </layout>
+              </div>
+            </el-dialog>
+
           </div>
 
         </div>
@@ -192,7 +284,7 @@
                 :label="column.label"
                 :width="column.width"
                 show-overflow-tooltip="true"
-				sortable
+                sortable
               />
 
             </el-table>
@@ -222,7 +314,7 @@
               :label="column.label"
               :width="column.width"
               show-overflow-tooltip="true"
-			  sortable
+              sortable
             />
           </el-table>
         </layout-content>
@@ -242,6 +334,7 @@ import Gongdanzhijianfeipintongji
   from '@/view/performance/09-workOrderVerification/componets/gongdanzhijianfeipintongji.vue'
 import Detail from '@/view/performance/12-orderAccounting/componets/detail.vue'
 import Hjfpfb from './componets/hjfpfb.vue'
+import PrintPage from '@/view/yunyin/shengchanguanli/components/print.vue'
 
 // 弹窗
 const dialogGdcjstj = ref(false)
@@ -369,12 +462,13 @@ const handleSearch = () => {
     })
   }
 }
-const rowClassName = ({ row, rowIndex }) => {
+
+/* const rowClassName = ({ row, rowIndex }) => {
   if (row['csgd'] === '√') {
     return 'yellow-row'
   }
   return ''
-}
+}*/
 
 const cellClassName = ({ row, column, rowIndex, columnIndex }) => {
   if ([7, 11, 13, 21].includes(columnIndex)) {
@@ -382,6 +476,13 @@ const cellClassName = ({ row, column, rowIndex, columnIndex }) => {
   }
   return ''
 }
+
+const printPageRef = ref()
+function handleGddy() {
+  printPageRef.value.open(gdbh.value)
+}
+
+const pd_lcdlist = ref(false)
 </script>
 
 <style scoped>