qukaidi 3 lat temu
rodzic
commit
534ed58c1d

+ 8 - 0
src/api/warehouseBusiness/warehouseInStock.js

@@ -39,6 +39,14 @@ export function deleteCode(fId) {
     method: 'get'
   })
 }
+//导入查询条码
+export function importQueryBarcode(params) {
+  return request({
+    url: '/warehouseBusiness/label/in-list',
+    method: 'get',
+    params
+  })
+}
 
 // 新增仓库主(出入库保存)
 export function addWarehousebills(data) {

+ 18 - 9
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -1461,7 +1461,6 @@
                     type="text"
                     size="small"
                     @click="showElabel(scope)"
-                    :disabled="browseStatus"
                     v-if="showDataElabel == '0'"
                 >条码
                 </el-button>
@@ -1470,7 +1469,6 @@
           </el-table>
         </div>
       </el-collapse-item>
-
       <el-collapse-item>
         <template slot="title">
           <i class="el-icon-s-order" style="font-size: 16px"></i>
@@ -6279,11 +6277,11 @@
                width="40%"
     >
     <span>
-      <el-button type="primary" @click="elabelList.push({
+      <el-button type="primary" v-if="eRow.fBillstatus < 40" @click="elabelList.push({
         fGPid:form.fId,
         fPid:eId,
         fType:'1',
-      })">录入明细</el-button>
+      })">录入条码</el-button>
       <el-table :data="elabelList" element-loading-text="努力加载中">
       <el-table-column
         label="序号"
@@ -6298,21 +6296,21 @@
         label="条码"
       >
         <template slot-scope="scope">
-          <el-input v-model="scope.row.fContent" placeholder="请输入条码"></el-input>
+          <el-input v-model="scope.row.fContent" :disabled="eRow.fBillstatus == 40" placeholder="请输入条码"></el-input>
         </template>
       </el-table-column>
         <el-table-column
-            fixed="right"
             label="操作"
+            align="center"
             width="100">
         <template slot-scope="scope">
-          <el-button type="text" size="small" icon="el-icon-delete" @click="deleteBarcode(scope)">删除</el-button>
+          <el-button type="text" size="small" icon="el-icon-delete" @click="deleteBarcode(scope)" :disabled="eRow.fBillstatus == 40">删除</el-button>
         </template>
       </el-table-column>
     </el-table>
     </span>
       <span slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="saveBarcode">保 存</el-button>
+        <el-button type="primary" v-if="eRow.fBillstatus < 40" @click="saveBarcode">保 存</el-button>
         <el-button @click="showElabelDialog = false">取 消</el-button>
       </span>
     </el-dialog>
@@ -6899,7 +6897,8 @@ export default {
       showDataElabel: null,
       showElabelDialog: false,
       elabelList: [],
-      eId:''
+      eId:'',
+      eRow:{}
     }
   },
   async created() {
@@ -9251,6 +9250,7 @@ export default {
     },
     // 查看电子标签
     showElabel(scope) {
+      this.eRow = scope.row
       this.eId = scope.row.fId
       if (scope.row.fId){
         listElabelByfGPid({fPid:scope.row.fId}).then(res=>{
@@ -9263,6 +9263,15 @@ export default {
     },
     //条码保存
     saveBarcode(){
+      for (let item in this.elabelList){
+        for (let li in this.elabelList){
+          if(item !== li){
+            if (this.elabelList[item].fContent == this.elabelList[li].fContent){
+              return  this.$message.error('序号'+Number(Number(item)+1)+'和序号'+Number(Number(li)+1)+'重复');
+            }
+          }
+        }
+      }
       saveCode(this.elabelList).then(res=>{
         listElabelByfGPid({fPid:this.eId}).then(res=>{
           this.elabelList = res.data

Plik diff jest za duży
+ 313 - 313
src/views/Warehousing/outStock/AddOrUpdate.vue


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików