Browse Source

Merge branch 'master' of http://119.23.210.103:3000/wy/mj_firm_former

zhangjingyuan 3 năm trước cách đây
mục cha
commit
c64e0205cf

+ 2 - 1
src/business/platform/data/templaterender/templates/list.vue

@@ -768,7 +768,8 @@ export default {
     },
     },
     /*按钮传参*/
     /*按钮传参*/
     scanHandlerObj(val,obj){
     scanHandlerObj(val,obj){
-      console.log(val,obj)
+      // console.log(666)
+      // console.log(val,obj)
       this.scanVisible = true
       this.scanVisible = true
       this.scanName = val
       this.scanName = val
       this.obj = obj
       this.obj = obj

+ 1 - 0
src/business/platform/form/formrender/index.vue

@@ -571,6 +571,7 @@
             },
             },
             scanHandlerObj(list){
             scanHandlerObj(list){
                 this.scanList = list
                 this.scanList = list
+                // console.log(list)
                 this.scanVisible = true
                 this.scanVisible = true
             },
             },
             closeScan(){
             closeScan(){

+ 5 - 5
src/business/platform/form/utils/custom/process.js

@@ -209,11 +209,11 @@ export const processEdit = params => {
         node.users[0].calcs[0].description = formData.executor[index].desc2
         node.users[0].calcs[0].description = formData.executor[index].desc2
         node.users[0].calcs[0].executorVar.name = formData.executor[index].name
         node.users[0].calcs[0].executorVar.name = formData.executor[index].name
         node.form.formValue = formData.formKey[index]
         node.form.formValue = formData.formKey[index]
-        // 填充权限信息
-        processPermission[index].formKey = formData.formKey[index]
-        processPermission[index].flowKey = keys.process
-        processPermission[index].nodeId = keys.activity[index]
-        node.form.editFormRights = processPermission[index]
+        // 填充权限信息 -> 改为由表单统一限制
+        // processPermission[index].formKey = formData.formKey[index]
+        // processPermission[index].flowKey = keys.process
+        // processPermission[index].nodeId = keys.activity[index]
+        // node.form.editFormRights = processPermission[index]
 
 
         node.attributes.nodeId = keys.activity[index]
         node.attributes.nodeId = keys.activity[index]
         // 填充节点操作按钮
         // 填充节点操作按钮

+ 23 - 5
src/business/platform/form/utils/custom/processPermission.js

@@ -1068,7 +1068,9 @@ export const processPermission = [
                     "code": "jchjb",
                     "code": "jchjb",
                     "name": "jchjb",
                     "name": "jchjb",
                     "read": [{ "type": "all" }],
                     "read": [{ "type": "all" }],
-                    "edit": [{ "type": "all" }]
+                    "edit": [{ "type": "all" }],
+                    "required": [{ "type": "none" }],
+                    "hide": [{ "type": "none" }]
                 }
                 }
             ],
             ],
             "button": [],
             "button": [],
@@ -1088,6 +1090,8 @@ export const processPermission = [
                     "isMain": "N",
                     "isMain": "N",
                     "read": [{ "type": "all" }],
                     "read": [{ "type": "all" }],
                     "edit": [{ "type": "all" }],
                     "edit": [{ "type": "all" }],
+                    "required": [{ "type": "none" }],
+                    "hide": [{ "type": "none" }],
                     "buttons": [],
                     "buttons": [],
                     "fields": subfield1
                     "fields": subfield1
                 }
                 }
@@ -1113,13 +1117,17 @@ export const processPermission = [
                     "code": "jcsysbb",
                     "code": "jcsysbb",
                     "name": "jcsysbb",
                     "name": "jcsysbb",
                     "read": [{ "type": "all" }],
                     "read": [{ "type": "all" }],
-                    "edit": [{ "type": "all" }]
+                    "edit": [{ "type": "all" }],
+                    "required": [{ "type": "none" }],
+                    "hide": [{ "type": "none" }]
                 },
                 },
                 {
                 {
                     "code": "mjsjhcb",
                     "code": "mjsjhcb",
                     "name": "mjsjhcb",
                     "name": "mjsjhcb",
                     "read": [{ "type": "all" }],
                     "read": [{ "type": "all" }],
-                    "edit": [{ "type": "all" }]
+                    "edit": [{ "type": "all" }],
+                    "required": [{ "type": "none" }],
+                    "hide": [{ "type": "none" }]
                 }
                 }
             ],
             ],
             "button": [
             "button": [
@@ -1168,6 +1176,8 @@ export const processPermission = [
                     "isMain": "N",
                     "isMain": "N",
                     "read": [{ "type": "all" }],
                     "read": [{ "type": "all" }],
                     "edit": [{ "type": "all" }],
                     "edit": [{ "type": "all" }],
+                    "required": [{ "type": "none" }],
+                    "hide": [{ "type": "none" }],
                     "buttons": [
                     "buttons": [
                         {
                         {
                             "type": "add",
                             "type": "add",
@@ -1190,6 +1200,8 @@ export const processPermission = [
                     "isMain": "N",
                     "isMain": "N",
                     "read": [{ "type": "all" }],
                     "read": [{ "type": "all" }],
                     "edit": [{ "type": "all" }],
                     "edit": [{ "type": "all" }],
+                    "required": [{ "type": "none" }],
+                    "hide": [{ "type": "none" }],
                     "buttons": [
                     "buttons": [
                         {
                         {
                             "type": "add",
                             "type": "add",
@@ -1228,13 +1240,17 @@ export const processPermission = [
                     "code": "jcsysbb",
                     "code": "jcsysbb",
                     "name": "jcsysbb",
                     "name": "jcsysbb",
                     "read": [{ "type": "all" }],
                     "read": [{ "type": "all" }],
-                    "edit": [{ "type": "none" }]
+                    "edit": [{ "type": "none" }],
+                    "required": [{ "type": "none" }],
+                    "hide": [{ "type": "none" }]
                 },
                 },
                 {
                 {
                     "code": "mjsjhcb",
                     "code": "mjsjhcb",
                     "name": "mjsjhcb",
                     "name": "mjsjhcb",
                     "read": [{ "type": "all" }],
                     "read": [{ "type": "all" }],
-                    "edit": [{ "type": "none" }]
+                    "edit": [{ "type": "none" }],
+                    "required": [{ "type": "none" }],
+                    "hide": [{ "type": "none" }]
                 }
                 }
             ],
             ],
             "button": [
             "button": [
@@ -1283,6 +1299,8 @@ export const processPermission = [
                     "isMain": "N",
                     "isMain": "N",
                     "read": [{ "type": "all" }],
                     "read": [{ "type": "all" }],
                     "edit": [{ "type": "none" }],
                     "edit": [{ "type": "none" }],
+                    "required": [{ "type": "none" }],
+                    "hide": [{ "type": "none" }],
                     "buttons": [
                     "buttons": [
                         {
                         {
                             "type": "add",
                             "type": "add",

+ 128 - 7
src/views/system/jbdScan/goods/manualConfirmation.vue

@@ -34,16 +34,18 @@
 
 
                          <el-table-column
                          <el-table-column
                            prop="yang_pin_bian_hao"
                            prop="yang_pin_bian_hao"
-                           label="样品编号">
+                           label="样品编号"
+                           width="150px">
                           </el-table-column>
                           </el-table-column>
 
 
                          <el-table-column
                          <el-table-column
                            prop="yang_pin_ming_che"
                            prop="yang_pin_ming_che"
-                           label="样品名称">
+                           label="样品名称"
+                           width="150px">
                          </el-table-column>
                          </el-table-column>
 
 
                          <el-table-column
                          <el-table-column
-                           prop="shou_yang_shu_lia"
+                           prop="yang_pin_zong_shu"
                            label="收样数量"
                            label="收样数量"
                            width="130px">
                            width="130px">
                          </el-table-column>
                          </el-table-column>
@@ -60,6 +62,105 @@
                                     </el-input-number>
                                     </el-input-number>
                                 </template>
                                 </template>
                          </el-table-column>
                          </el-table-column>
+                        
+                         <el-table-column
+                          prop="yang_pin_lei_xy_"
+                          label="样品类型(一)"
+                          width="150px">
+                         </el-table-column>
+
+                        <el-table-column
+                          prop="cun_chu_yao_qiu_"
+                          label="样品运输条件(一)"
+                          width="150px">
+                         </el-table-column>
+
+                        <el-table-column
+                          prop="shu_liang_"
+                          label="样品数量(一)"
+                          width="150px">
+                         </el-table-column>
+
+                        <el-table-column
+                          prop="yang_pin_gui_ge_y"
+                          label="样品规格(一)"
+                          width="150px">
+                         </el-table-column>
+
+
+                         <el-table-column
+                           prop="yang_pin_lei_xe"
+                           label="样品类型(二)"
+                           width="150px">
+                          </el-table-column>
+
+                         <el-table-column
+                           prop="cun_chu_yao_qiu_q"
+                           label="样品运输条件(二)"
+                           width="150px">
+                          </el-table-column>
+
+                         <el-table-column
+                           prop="yang_pin_shu_lian"
+                           label="样品数量(二)"
+                           width="150px">
+                          </el-table-column>
+
+                         <el-table-column
+                           prop="yang_pin_gui_ge_e"
+                           label="样品规格(二)"
+                           width="150px">
+                          </el-table-column>
+
+
+                         <el-table-column
+                           prop="yang_pin_lei_xs"
+                           label="样品类型(三)"
+                           width="150px">
+                          </el-table-column>
+
+                         <el-table-column
+                           prop="yun_shu_tiao_jian"
+                           label="样品运输条件(三)"
+                           width="150px">
+                          </el-table-column>
+
+                         <el-table-column
+                           prop="yang_pin_shu_ls"
+                           label="样品数量(三)"
+                           width="150px">
+                          </el-table-column>
+
+                         <el-table-column
+                           prop="yang_pin_gui_ge_s"
+                           label="样品规格(三)"
+                           width="150px">
+                          </el-table-column>
+
+                        <el-table-column
+                          prop="yang_pin_lei_xsi"
+                          label="样品类型(四)"
+                          width="150px">
+                         </el-table-column>
+
+                        <el-table-column
+                          prop="yun_shu_tiao_jsi"
+                          label="样品运输条件(四)"
+                          width="150px">
+                         </el-table-column>
+
+                        <el-table-column
+                          prop="yang_pin_shu_lsi"
+                          label="样品数量(四)"
+                          width="150px">
+                         </el-table-column>
+
+                        <el-table-column
+                          prop="yang_pin_gui_ge_i"
+                          label="样品规格(四)"
+                          width="150px">
+                         </el-table-column>
+
 
 
                          <el-table-column
                          <el-table-column
                            prop="shi_fou_liu_yang_"
                            prop="shi_fou_liu_yang_"
@@ -123,7 +224,18 @@
 
 
 
 
                        </el-table>
                        </el-table>
+                       
+                       <el-pagination
+                         layout="prev,pager,next"
+                         background
+                         @current-change="current_change"
+                         :current-page="currentPage"
+                         :pager-count="5"
+                         :page-size="10"
+                         :total="this.pageCount"
+                       ></el-pagination>
                    </div>
                    </div>
+
              </el-dialog>
              </el-dialog>
 
 
   </div>
   </div>
@@ -139,13 +251,12 @@ import liuyangData from "./liuyangData.vue"
    components:{
    components:{
      IbpsLinkData,
      IbpsLinkData,
      weizhiData,
      weizhiData,
-     liuyangData
+     liuyangData,
    },
    },
    mixins:[manualConfirmationJS],
    mixins:[manualConfirmationJS],
    props:{scanVisible:Boolean},
    props:{scanVisible:Boolean},
    watch:{
    watch:{
     listData: {
     listData: {
-
            handler(val, oldName) {
            handler(val, oldName) {
             if(val.length>0){
             if(val.length>0){
               this.visible = true
               this.visible = true
@@ -174,7 +285,7 @@ import liuyangData from "./liuyangData.vue"
      }
      }
    },
    },
    created() {
    created() {
-     this.facilityData()
+     this.facilityData(1)
    },
    },
   data () {
   data () {
     return {
     return {
@@ -182,6 +293,7 @@ import liuyangData from "./liuyangData.vue"
      visible:false,
      visible:false,
      redar:false,
      redar:false,
      facilityId:'',
      facilityId:'',
+     currentPage:1,
      listData:[],
      listData:[],
      options: [{
      options: [{
                value: '已确认',
                value: '已确认',
@@ -191,10 +303,19 @@ import liuyangData from "./liuyangData.vue"
                label: '未确认'
                label: '未确认'
              }],
              }],
       OriginalPosition:[],
       OriginalPosition:[],
-      mjwtsqbAllResult:[]
+      mjwtsqbAllResult:[],
+      pageCount:1,
+      item:''
 
 
     }
     }
   },
   },
+  
+  methods:{
+    current_change(currentPage){
+      this.currentPage = currentPage
+      this.facilityData(currentPage)
+    }
+  }
 
 
   }
   }
 </script>
 </script>

+ 103 - 3
src/views/system/jbdScan/goods/sampleConfirmation.vue

@@ -33,16 +33,18 @@
 
 
                          <el-table-column
                          <el-table-column
                            prop="yang_pin_bian_hao"
                            prop="yang_pin_bian_hao"
-                           label="样品编号">
+                           label="样品编号"
+                           width="150px">
                           </el-table-column>
                           </el-table-column>
 
 
                          <el-table-column
                          <el-table-column
                            prop="yang_pin_ming_che"
                            prop="yang_pin_ming_che"
-                           label="样品名称">
+                           label="样品名称"
+                           width="150px">
                          </el-table-column>
                          </el-table-column>
 
 
                          <el-table-column
                          <el-table-column
-                           prop="shou_yang_shu_lia"
+                           prop="yang_pin_zong_shu"
                            label="收样数量"
                            label="收样数量"
                            width="130px">
                            width="130px">
                          </el-table-column>
                          </el-table-column>
@@ -60,6 +62,104 @@
                                 </template>
                                 </template>
                          </el-table-column>
                          </el-table-column>
 
 
+                         <el-table-column
+                          prop="yang_pin_lei_xy_"
+                          label="样品类型(一)"
+                          width="150px">
+                         </el-table-column>
+
+                        <el-table-column
+                          prop="cun_chu_yao_qiu_"
+                          label="样品运输条件(一)"
+                          width="150px">
+                         </el-table-column>
+
+                        <el-table-column
+                          prop="shu_liang_"
+                          label="样品数量(一)"
+                          width="150px">
+                         </el-table-column>
+
+                        <el-table-column
+                          prop="yang_pin_gui_ge_y"
+                          label="样品规格(一)"
+                          width="150px">
+                         </el-table-column>
+
+
+                         <el-table-column
+                           prop="yang_pin_lei_xe"
+                           label="样品类型(二)"
+                           width="150px">
+                          </el-table-column>
+
+                         <el-table-column
+                           prop="cun_chu_yao_qiu_q"
+                           label="样品运输条件(二)"
+                           width="150px">
+                          </el-table-column>
+
+                         <el-table-column
+                           prop="yang_pin_shu_lian"
+                           label="样品数量(二)"
+                           width="150px">
+                          </el-table-column>
+
+                         <el-table-column
+                           prop="yang_pin_gui_ge_e"
+                           label="样品规格(二)"
+                           width="150px">
+                          </el-table-column>
+
+
+                         <el-table-column
+                           prop="yang_pin_lei_xs"
+                           label="样品类型(三)"
+                           width="150px">
+                          </el-table-column>
+
+                         <el-table-column
+                           prop="yun_shu_tiao_jian"
+                           label="样品运输条件(三)"
+                           width="150px">
+                          </el-table-column>
+
+                         <el-table-column
+                           prop="yang_pin_shu_ls"
+                           label="样品数量(三)"
+                           width="150px">
+                          </el-table-column>
+
+                         <el-table-column
+                           prop="yang_pin_gui_ge_s"
+                           label="样品规格(三)"
+                           width="150px">
+                          </el-table-column>
+
+                        <el-table-column
+                          prop="yang_pin_lei_xsi"
+                          label="样品类型(四)"
+                          width="150px">
+                         </el-table-column>
+
+                        <el-table-column
+                          prop="yun_shu_tiao_jsi"
+                          label="样品运输条件(四)"
+                          width="150px">
+                         </el-table-column>
+
+                        <el-table-column
+                          prop="yang_pin_shu_lsi"
+                          label="样品数量(四)"
+                          width="150px">
+                         </el-table-column>
+
+                        <el-table-column
+                          prop="yang_pin_gui_ge_i"
+                          label="样品规格(四)"
+                          width="150px">
+                         </el-table-column>
+
                          <el-table-column
                          <el-table-column
                            prop="shi_fou_liu_yang_"
                            prop="shi_fou_liu_yang_"
                            label="是否留样"
                            label="是否留样"

+ 2 - 2
src/views/system/jbdScan/goods/sampleTag.vue

@@ -120,7 +120,7 @@ export default {
   watch: {
   watch: {
     obj() {
     obj() {
       this.getInit()
       this.getInit()
-      // console.log(this.obj)
+      console.log(this.obj)
     }
     }
   },
   },
   created() {
   created() {
@@ -131,7 +131,7 @@ export default {
       this.$refs.easyPrint.print()
       this.$refs.easyPrint.print()
     },
     },
     getInit() {
     getInit() {
-      // console.log('getInit:',this.obj)
+      console.log('getInit:',this.obj)
       this.sampleShuLiangList = []
       this.sampleShuLiangList = []
       var idStr = '';
       var idStr = '';
       this.obj.forEach(item=>{
       this.obj.forEach(item=>{

+ 62 - 22
src/views/system/jbdScan/js/manualConfirmationJS.js

@@ -2,19 +2,41 @@ import repostCurd from '@/business/platform/form/utils/custom/joinCURD.js'
 
 
 export default {
 export default {
   methods: {
   methods: {
-    facilityData() {
-      this.loadData()
+    facilityData(page) {
+      // this.loadData()
+      this.loadDataBySQL(page)
     },
     },
     /* 获取数据 ,开始查阅记录 */
     /* 获取数据 ,开始查阅记录 */
     loadData() {
     loadData() {
       // 扫码扫到新数据,查询 回填展示
       // 扫码扫到新数据,查询 回填展示
-      repostCurd('select', '{"tableName": "t_mjypdjb","paramWhere":{"jie_yang_zhuang_t":"待确认"}}').then(response => {
+      repostCurd('select', '{"tableName": "t_mjypb","paramWhere":{"jie_yang_zhuang_t":"待确认"}}').then(response => {
         if (response.variables.data && response.variables.data.length > 0) {
         if (response.variables.data && response.variables.data.length > 0) {
           for (let i in response.variables.data) {
           for (let i in response.variables.data) {
             response.variables.data[i].jie_yang_shu_lian = 1
             response.variables.data[i].jie_yang_shu_lian = 1
             this.listData.push(response.variables.data[i])
             this.listData.push(response.variables.data[i])
             this.OriginalPosition.push(response.variables.data[i].shi_fou_liu_yang_ == "是" ? response.variables.data[i].liu_yang_wei_zhi_ : response.variables.data[i].shou_yang_wei_zhi)
             this.OriginalPosition.push(response.variables.data[i].shi_fou_liu_yang_ == "是" ? response.variables.data[i].liu_yang_wei_zhi_ : response.variables.data[i].shou_yang_wei_zhi)
           }
           }
+          console.log('All data',this.listData)
+        }
+      })
+    },
+    
+    loadDataBySQL(page) {
+      // 扫码扫到新数据,查询 并分页 回填展示
+      let countSQL = `select count(*) as count from t_mjypb where jie_yang_zhuang_t = '待确认'`
+      let str = (page-1)*10
+      let fysql = `select * from t_mjypb where jie_yang_zhuang_t = '待确认' limit ${str},10`
+      Promise.all([repostCurd('sql', countSQL), repostCurd('sql', fysql)]).then(([res1, res]) => {
+        this.listData = []
+        this.pageCount = res1.variables.data[0].count
+        if (res.variables.data && res.variables.data.length > 0) {
+          for (let i in res.variables.data) {
+            res.variables.data[i].jie_yang_shu_lian = 1
+            // res.variables.data[i].jie_yang_zhuang_t = '待确认'
+            // res.variables.data[i].biao_zhi_uuid_ = this.uuid()
+            this.listData.push(res.variables.data[i])
+            this.OriginalPosition.push(res.variables.data[i].shi_fou_liu_yang_ == "是" ? res.variables.data[i].liu_yang_wei_zhi_ : res.variables.data[i].shou_yang_wei_zhi)
+          }
         }
         }
       })
       })
     },
     },
@@ -92,13 +114,11 @@ export default {
                 return;
                 return;
               }
               }
               let isLy = ypInfoList[yp].liu_yang_wei_zhi_
               let isLy = ypInfoList[yp].liu_yang_wei_zhi_
-              // console.log(isLy, "留样");
               if (isLy.substr(-2, isLy.length - 1) == "占用" || isLy.substr(-2, isLy.length - 1) == "空余") { //?
               if (isLy.substr(-2, isLy.length - 1) == "占用" || isLy.substr(-2, isLy.length - 1) == "空余") { //?
                 let sql = "select 'id' from MJ_yp_position_status where positionAndStatus = '" + isLy + "' limit 1"
                 let sql = "select 'id' from MJ_yp_position_status where positionAndStatus = '" + isLy + "' limit 1"
                 repostCurd('sql', sql).then(response => {
                 repostCurd('sql', sql).then(response => {
                   cfwz = response.variables.data[0].id
                   cfwz = response.variables.data[0].id
                   ypInfoList[yp].liu_yang_wei_zhi_ = cfwz
                   ypInfoList[yp].liu_yang_wei_zhi_ = cfwz
-                  // console.log(ypInfoList)
                   console.log('?question time留样')
                   console.log('?question time留样')
                 })
                 })
               } else {
               } else {
@@ -117,9 +137,7 @@ export default {
               let isZC = ypInfoList[yp].shou_yang_wei_zhi
               let isZC = ypInfoList[yp].shou_yang_wei_zhi
               if (isZC.substr(-2, isZC.length - 1) == "占用" || isZC.substr(-2, isZC.length - 1) == "空余") { //?
               if (isZC.substr(-2, isZC.length - 1) == "占用" || isZC.substr(-2, isZC.length - 1) == "空余") { //?
                 let sql1 = "select `id` from MJ_yp_position_status where positionAndStatus = '" + isZC + "' limit 1"
                 let sql1 = "select `id` from MJ_yp_position_status where positionAndStatus = '" + isZC + "' limit 1"
-                // console.log(sql1)
                 repostCurd('sql', sql1).then(response => {
                 repostCurd('sql', sql1).then(response => {
-                  // console.log(response.variables)
                   cfwz = response.variables.data[0].id
                   cfwz = response.variables.data[0].id
                   ypInfoList[yp].shou_yang_wei_zhi = cfwz //查询位置状态表 取值位置的id
                   ypInfoList[yp].shou_yang_wei_zhi = cfwz //查询位置状态表 取值位置的id
                   console.log('?question time')
                   console.log('?question time')
@@ -142,26 +160,27 @@ export default {
           }
           }
 
 
 
 
-          for (let index in ypIdList) { // 更新样品登记表
+          for (let index in ypIdList) { // 更新样品登记表  样品表
             let WZtem = ypWeiZhi[index] == null ? '' : ypWeiZhi[index]
             let WZtem = ypWeiZhi[index] == null ? '' : ypWeiZhi[index]
             let LYWZtem = ypLiuYangWeiZhi[index] == null ? '' : ypLiuYangWeiZhi[index]
             let LYWZtem = ypLiuYangWeiZhi[index] == null ? '' : ypLiuYangWeiZhi[index]
             changeWeizhi = WZtem;
             changeWeizhi = WZtem;
             changesyWeizhi = LYWZtem;
             changesyWeizhi = LYWZtem;
-            // console.log(WZtem, LYWZtem, "双id")
+            repostCurd('update', '{"tableName":"t_mjypdjb","paramWhere":' + ypbhList[index] + ',"paramCond":' + '{"shou_yang_wei_zhi":"' + WZtem + '","jie_yang_shu_lian":"' + saoMaNumList[index] + '","jie_yang_zhuang_t":"' + jieYangQueRenZTList[index] + '","liu_yang_wei_zhi_":"' + LYWZtem + '"}}')
 
 
-            repostCurd('update', '{"tableName":"t_mjypdjb","paramWhere":' + ypIdList[index] + ',"paramCond":' + '{"shou_yang_wei_zhi":"' + WZtem + '","jie_yang_shu_lian":"' + saoMaNumList[index] + '","jie_yang_zhuang_t":"' + jieYangQueRenZTList[index] + '","liu_yang_wei_zhi_":"' + LYWZtem + '"}}').then(res => {
-              // console.log(res, "更新成功")
-            })
+            repostCurd('update','{"tableName":"t_mjypb","paramWhere":' + ypIdList[index] + ',"paramCond":' + '{"jie_yang_zhuang_t":"已确认","cun_fang_wei_zhi_":"'+WZtem+'","liu_yang_cun_fang":"'+LYWZtem+'"}}')
           }
           }
+
+// /*
           for (let num in dWhere) {
           for (let num in dWhere) {
             if (this.OriginalPosition[num] != cfwzIdList[num]) {
             if (this.OriginalPosition[num] != cfwzIdList[num]) {
               let sql = "select * from t_mjypcfwz where id_ = '" + cfwzIdList[num] + "'"
               let sql = "select * from t_mjypcfwz where id_ = '" + cfwzIdList[num] + "'"
               repostCurd('sql', sql).then(response => {
               repostCurd('sql', sql).then(response => {
                 let resArr = response.variables.data
                 let resArr = response.variables.data
+                console.log(resArr)
                 if (resArr.length == 1) {
                 if (resArr.length == 1) {
                   if (resArr[0].wei_zhi_zhuang_ta == "空余") {
                   if (resArr[0].wei_zhi_zhuang_ta == "空余") {
                     repostCurd('update', '{"tableName":"t_mjypcfwz","paramWhere":' + dWhere[num] + ',"paramCond":' + '{"wei_zhi_zhuang_ta":"占用","yang_pin_bian_hao":"' + ypbh[num] +'","yang_pin_ming_che":"'  + ypmcList[num] + '","ru_ku_shi_jian_":"' + this_.dateFormat() + '","shou_yang_ri_qi_":"' + uuidList[num] + '"}}').then(res => {
                     repostCurd('update', '{"tableName":"t_mjypcfwz","paramWhere":' + dWhere[num] + ',"paramCond":' + '{"wei_zhi_zhuang_ta":"占用","yang_pin_bian_hao":"' + ypbh[num] +'","yang_pin_ming_che":"'  + ypmcList[num] + '","ru_ku_shi_jian_":"' + this_.dateFormat() + '","shou_yang_ri_qi_":"' + uuidList[num] + '"}}').then(res => {
-                      // console.log(res, "原本位置为空余 ,新位置更新成功")
+                      console.log(res, "原本位置为空余 ,新位置更新成功")
                       // alert('样品货位状态更新成功')
                       // alert('样品货位状态更新成功')
                     })
                     })
                   } else if (resArr[0].wei_zhi_zhuang_ta == "占用") {
                   } else if (resArr[0].wei_zhi_zhuang_ta == "占用") {
@@ -203,6 +222,7 @@ export default {
             }
             }
 
 
           }
           }
+
           repostCurd('selects', '{"tableName":"t_mjypb","paramWhere":[' + ypbhList + ']}').then(response => {
           repostCurd('selects', '{"tableName":"t_mjypb","paramWhere":[' + ypbhList + ']}').then(response => {
             mjypbList = response.variables.data
             mjypbList = response.variables.data
             let wjList = []
             let wjList = []
@@ -242,21 +262,38 @@ export default {
             }, 1000)
             }, 1000)
 
 
             setTimeout(() => {
             setTimeout(() => {
-              // console.log('mjfbbList',mjfbbList)
-              // console.log('mjypbList',mjypbList)
               let rwb = []
               let rwb = []
               let index = 0
               let index = 0
               if (mjypbList != null && mjypbList.length >= 1) {
               if (mjypbList != null && mjypbList.length >= 1) {
-                index = mjypbList[0].jian_ce_xiang_mu2.split(",").length - 1
+                index = mjypbList[0].jian_ce_xiang_me_.split(",").length + mjypbList[0].jian_ce_xiang_mu2
+                .split(",").length + mjypbList[0].jian_ce_xiang_ms_
+                .split(",").length+ mjypbList[0].jian_ce_xiang_si_
+                .split(",").length -1 
               }
               }
+              console.log('final',mjypbList)
               for (var i in mjypbList) {
               for (var i in mjypbList) {
                 let rwzb = {}
                 let rwzb = {}
+                // let yplxAll = ''
+                // if(mjypbList[i].yang_pin_lei_xy_ != null){
+                //   yplxAll +=  mjypbList[i].yang_pin_lei_xy_ + ","
+                // }
+                // if(mjypbList[i].yang_pin_lei_xe  != null){
+                //   yplxAll +=  mjypbList[i].yang_pin_lei_xe + ","
+                // }
+                // if(mjypbList[i].yang_pin_lei_xs  != null){
+                //   yplxAll +=  mjypbList[i].yang_pin_lei_xs + ","
+                // }
+                // if(mjypbList[i].yang_pin_lei_xsi != null){
+                //   yplxAll +=  mjypbList[i].yang_pin_lei_xsi + ","
+                // }
+                // yplxAll = yplxAll.substr(0, yplxAll.length - 1)
                 let wz_ = ypInfoList[i].shi_fou_liu_yang_ == "是" ? ypInfoList[i].liu_yang_wei_zhi_ : ypInfoList[i].shou_yang_wei_zhi //	对应的样品存放位置
                 let wz_ = ypInfoList[i].shi_fou_liu_yang_ == "是" ? ypInfoList[i].liu_yang_wei_zhi_ : ypInfoList[i].shou_yang_wei_zhi //	对应的样品存放位置
+                // console.log(wz_)
                 rwzb["yang_pin_bian_hao"] = mjypbList[i].yang_pin_bian_hao //	取对应的样品编号
                 rwzb["yang_pin_bian_hao"] = mjypbList[i].yang_pin_bian_hao //	取对应的样品编号
                 rwzb["yang_pin_ming_che"] = mjypbList[i].yang_pin_ming_che //	对应的样品名称
                 rwzb["yang_pin_ming_che"] = mjypbList[i].yang_pin_ming_che //	对应的样品名称
-                rwzb["yang_pin_dai_ci_"] = mjypbList[i].dai_ci_ //	对应的样品代次
-                rwzb["yang_pin_pi_hao_"] = mjypbList[i].pi_hao_ //	对应的样品批号
-                rwzb["yang_pin_shu_lian"] = mjypbList[i].shu_liang_ //	对应的样品数量
+                rwzb["yang_pin_dai_ci_"] = mjypbList[i].dai_ci_            //	对应的样品代次
+                rwzb["yang_pin_pi_hao_"] = mjypbList[i].pi_hao_            //	对应的样品批号
+                rwzb["yang_pin_shu_lian"] = mjypbList[i].yang_pin_zong_shu //	对应的样品数量
                 rwzb["bug_ri_qi_"] = mjypbList[i].song_yang_ri_qi_ //  对应的送样日期
                 rwzb["bug_ri_qi_"] = mjypbList[i].song_yang_ri_qi_ //  对应的送样日期
                 rwzb["cun_fang_wei_zhi_"] = wz_
                 rwzb["cun_fang_wei_zhi_"] = wz_
                 rwzb["wei_tuo_wai_jian_"] = mjypbList[i].wai_jian_      //	检测申请单id
                 rwzb["wei_tuo_wai_jian_"] = mjypbList[i].wai_jian_      //	检测申请单id
@@ -266,8 +303,9 @@ export default {
                 rwzb["bao_gao_jian_ce_s"] = this_.dateFormat()          // 检测时间
                 rwzb["bao_gao_jian_ce_s"] = this_.dateFormat()          // 检测时间
                 rwzb["zhan_shi_biao_wai"] = mjwtsqbAllResult[i].ye_mian_zong_zhua
                 rwzb["zhan_shi_biao_wai"] = mjwtsqbAllResult[i].ye_mian_zong_zhua
                 rwzb["zhuang_tai_"] = "任务待分配"                       //	状态
                 rwzb["zhuang_tai_"] = "任务待分配"                       //	状态
-                rwzb["gong_xian_zhi_"] = mjypbList[i].yang_pin_lei_xin			// 供限值
+                // rwzb["gong_xian_zhi_"] = mjypbList[i].yang_pin_lei_xin			// 供限值
                 rwzb["yang_pin_bei_zhu_"] = mjypbList[i].bei_zhu_			// 样品备注
                 rwzb["yang_pin_bei_zhu_"] = mjypbList[i].bei_zhu_			// 样品备注
+                // rwzb["yang_pin_lei_xing"] =  yplxAll //23/1/10号 吴懿说不要了
                 rwb.push(rwzb)
                 rwb.push(rwzb)
                 // let str = mjypbList[i].jian_ce_xiang_mu2.split(",")
                 // let str = mjypbList[i].jian_ce_xiang_mu2.split(",")
                 // for (var p in str) {
                 // for (var p in str) {
@@ -297,7 +335,7 @@ export default {
                 // }
                 // }
                 // index += str.length
                 // index += str.length
               }
               }
-              // console.log('任务表:',rwb)
+              console.log('任务表:',rwb)
 
 
               repostCurd('updates', '{"tableName":"t_mjwtsqb","paramWhere":[' + mjwtsqbIdList + '],"paramCond":{"jian_ce_kai_shi_s":"' + this_.dateFormat() + '"}}')
               repostCurd('updates', '{"tableName":"t_mjwtsqb","paramWhere":[' + mjwtsqbIdList + '],"paramCond":{"jian_ce_kai_shi_s":"' + this_.dateFormat() + '"}}')
               let uidList = []
               let uidList = []
@@ -312,9 +350,11 @@ export default {
                   ups.push('{"shen_qing_id_":"' + t + '"}')
                   ups.push('{"shen_qing_id_":"' + t + '"}')
                 }
                 }
                 repostCurd('updates', '{"tableName":"t_mjwtzsb","paramWhere":[' + ups + '],"paramCond":{"zhuang_tai_":"任务分配进行中"}}')
                 repostCurd('updates', '{"tableName":"t_mjwtzsb","paramWhere":[' + ups + '],"paramCond":{"zhuang_tai_":"任务分配进行中"}}')
-              } /**/
+              } 
             }, 5000)
             }, 5000)
           })
           })
+
+       //   */
           this.$emit('callback', true)
           this.$emit('callback', true)
           this.visable = false
           this.visable = false
           this.$message({
           this.$message({

+ 10 - 3
src/views/system/jbdScan/js/sampleConfirmationJS.js

@@ -29,7 +29,7 @@ export default {
       // 扫码扫到新数据,查询 回填展示
       // 扫码扫到新数据,查询 回填展示
       if(flag){
       if(flag){
          // repostCurd('select','{"tableName": "t_mjypdjb","paramWhere":{"yang_pin_bian_hao":"S220909-1053"}}').then(response => {
          // repostCurd('select','{"tableName": "t_mjypdjb","paramWhere":{"yang_pin_bian_hao":"S220909-1053"}}').then(response => {
-         repostCurd('select','{"tableName": "t_mjypdjb","paramWhere":{"yang_pin_bian_hao":"' + id + '"}}').then(response => {
+         repostCurd('select','{"tableName": "t_mjypb","paramWhere":{"yang_pin_bian_hao":"' + id + '","jie_yang_zhuang_t":"待确认"}}').then(response => {
           if (response.variables.data && response.variables.data.length > 0) {
           if (response.variables.data && response.variables.data.length > 0) {
               // console.log(response.variables.data[0])
               // console.log(response.variables.data[0])
               response.variables.data[0].jie_yang_shu_lian = 1
               response.variables.data[0].jie_yang_shu_lian = 1
@@ -157,6 +157,8 @@ export default {
                 changeWeizhi = WZtem;
                 changeWeizhi = WZtem;
                 changesyWeizhi = LYWZtem;
                 changesyWeizhi = LYWZtem;
                 repostCurd('update','{"tableName":"t_mjypdjb","paramWhere":'+ypIdList[index]+',"paramCond":'+'{"shou_yang_wei_zhi":"'+WZtem+'","jie_yang_shu_lian":"'+saoMaNumList[index]+'","jie_yang_zhuang_t":"'+jieYangQueRenZTList[index]+'","liu_yang_wei_zhi_":"'+ LYWZtem + '"}}')
                 repostCurd('update','{"tableName":"t_mjypdjb","paramWhere":'+ypIdList[index]+',"paramCond":'+'{"shou_yang_wei_zhi":"'+WZtem+'","jie_yang_shu_lian":"'+saoMaNumList[index]+'","jie_yang_zhuang_t":"'+jieYangQueRenZTList[index]+'","liu_yang_wei_zhi_":"'+ LYWZtem + '"}}')
+
+                repostCurd('update','{"tableName":"t_mjypb","paramWhere":' + ypIdList[index] + ',"paramCond":' + '{"jie_yang_zhuang_t":"已确认","cun_fang_wei_zhi_":"'+WZtem+'","liu_yang_cun_fang":"'+LYWZtem+'"}}')
             }
             }
             for(let num in dWhere){
             for(let num in dWhere){
               if(this.OriginalPosition[num] != cfwzIdList[num]){
               if(this.OriginalPosition[num] != cfwzIdList[num]){
@@ -256,8 +258,12 @@ export default {
                let rwb = []
                let rwb = []
                let index = 0
                let index = 0
                if(mjypbList != null && mjypbList.length >= 1){
                if(mjypbList != null && mjypbList.length >= 1){
-                 index = mjypbList[0].jian_ce_xiang_mu2.split(",").length - 1
+                index = mjypbList[0].jian_ce_xiang_me_.split(",").length + mjypbList[0].jian_ce_xiang_mu2
+                .split(",").length + mjypbList[0].jian_ce_xiang_ms_
+                .split(",").length+ mjypbList[0].jian_ce_xiang_si_
+                .split(",").length -1 
                }
                }
+               console.log('final',mjypbList)
                for(var i in mjypbList){
                for(var i in mjypbList){
                 // console.log('坐标',i,p)
                 // console.log('坐标',i,p)
                 let rwzb = {}
                 let rwzb = {}
@@ -276,7 +282,7 @@ export default {
                 rwzb["bao_gao_jian_ce_s"] = this_.dateFormat()          // 检测时间
                 rwzb["bao_gao_jian_ce_s"] = this_.dateFormat()          // 检测时间
                 rwzb["zhan_shi_biao_wai"] = mjwtsqbAllResult[i].ye_mian_zong_zhua
                 rwzb["zhan_shi_biao_wai"] = mjwtsqbAllResult[i].ye_mian_zong_zhua
                 rwzb["zhuang_tai_"] = "任务待分配"                       //	状态
                 rwzb["zhuang_tai_"] = "任务待分配"                       //	状态
-                rwzb["gong_xian_zhi_"] = mjypbList[i].yang_pin_lei_xin			// 供限值
+                // rwzb["gong_xian_zhi_"] = mjypbList[i].yang_pin_lei_xin			// 供限值
                 rwzb["yang_pin_bei_zhu_"] = mjypbList[i].bei_zhu_			// 样品备注
                 rwzb["yang_pin_bei_zhu_"] = mjypbList[i].bei_zhu_			// 样品备注
                 rwb.push(rwzb)
                 rwb.push(rwzb)
                 // let str = mjypbList[i].jian_ce_xiang_mu2.split(",")
                 // let str = mjypbList[i].jian_ce_xiang_mu2.split(",")
@@ -307,6 +313,7 @@ export default {
                 // }
                 // }
                 // index += str.length
                 // index += str.length
                }
                }
+               console.log('任务表:',rwb)
                repostCurd('updates', '{"tableName":"t_mjwtsqb","paramWhere":['+mjwtsqbIdList+'],"paramCond":{"jian_ce_kai_shi_s":"' + this_.dateFormat() + '"}}')
                repostCurd('updates', '{"tableName":"t_mjwtsqb","paramWhere":['+mjwtsqbIdList+'],"paramCond":{"jian_ce_kai_shi_s":"' + this_.dateFormat() + '"}}')
                let uidList = []
                let uidList = []
                for(let item of mjwtsqbAllResult){
                for(let item of mjwtsqbAllResult){