Procházet zdrojové kódy

采购订单受理出库 字段修改

liumy před 1 rokem
rodič
revize
6954c4ef0a

+ 1 - 1
src/components/yl-upload/index.vue

@@ -93,7 +93,7 @@ export default {
     },
     index:{
       type: Number,
-      default: 9,
+      default: 0,
     }
   },
   data() {

+ 4 - 4
src/views/page/consumCataManage-sup/catalogdetails.vue

@@ -281,8 +281,8 @@
         <h3>商品包装资料</h3>
         <div class="form-body">
           <div class="flex-css">
-            <el-form-item label="最小单位" prop="purcUnt" :rules="rules.selectRequired">
-              <el-select v-model="infoData.purcUnt" placeholder="请选择最小单位" clearable>
+            <el-form-item label="最小单位" prop="prcUnt" :rules="rules.selectRequired">
+              <el-select v-model="infoData.prcUnt" placeholder="请选择最小单位" clearable>
                 <el-option
                   v-for="item in purcUntData"
                   :key="item.value"
@@ -297,9 +297,9 @@
             </el-form-item>
           </div>
           <div class="flex-css">
-            <el-form-item label="采购单位" prop="prcUnt" :rules="rules.selectRequired">
+            <el-form-item label="采购单位" prop="purcUnt" :rules="rules.selectRequired">
                 
-              <el-select v-model="infoData.prcUnt" placeholder="请选择采购单位" clearable>
+              <el-select v-model="infoData.purcUnt" placeholder="请选择采购单位" clearable>
                 <el-option
                   v-for="item in prcUntData"
                   :key="item.value"

+ 4 - 4
src/views/page/consumCataManage-sup/catalogdetailsadd.vue

@@ -208,8 +208,8 @@
         <h3>商品包装资料</h3>
         <div class="form-body">
           <div class="flex-css">
-            <el-form-item label="最小单位" prop="purcUnt" :rules="rules.selectRequired">
-              <el-select v-model="infoData.purcUnt" placeholder="请选择最小单位" clearable>
+            <el-form-item label="最小单位" prop="prcUnt" :rules="rules.selectRequired">
+              <el-select v-model="infoData.prcUnt" placeholder="请选择最小单位" clearable>
                 <el-option
                   v-for="item in purcUntData"
                   :key="item.value"
@@ -223,8 +223,8 @@
             </el-form-item>
           </div>
           <div class="flex-css">
-            <el-form-item label="采购单位" prop="prcUnt" :rules="rules.selectRequired">
-                <el-select v-model="infoData.prcUnt" placeholder="请选择采购单位" clearable>
+            <el-form-item label="采购单位" prop="purcUnt" :rules="rules.selectRequired">
+                <el-select v-model="infoData.purcUnt" placeholder="请选择采购单位" clearable>
                   <el-option
                     v-for="item in prcUntData"
                     :key="item.value"

+ 1 - 1
src/views/page/consumCataManage-sup/distributionmanage.vue

@@ -146,7 +146,7 @@
             <span v-if="row.isFas == '0'">是</span>
           </template>
         </el-table-column>
-        <el-table-column label="采购单位" prop="prcUnt" width="80" />
+        <el-table-column label="采购单位" prop="purcUnt" width="80" />
         <el-table-column label="采购价" prop="purcPric" width="80" />
         <!-- <el-table-column label="驳回原因" prop="rejtRea" width="80" /> -->
         <el-table-column label="目录来源" prop="isPub" width="80" fixed="right">

+ 1 - 1
src/views/page/consumCataManage-sup/index.vue

@@ -133,7 +133,7 @@
             <span v-if="row.isFas == '0'">是</span>
           </template>
         </el-table-column>
-        <el-table-column label="采购单位" prop="prcUnt" width="80" />
+        <el-table-column label="采购单位" prop="purcUnt" width="80" />
         <el-table-column label="采购价" prop="purcPric" width="80" />
         <el-table-column label="驳回原因" prop="rejtRea" width="80" />
         <el-table-column label="目录来源" prop="isPub" width="80" fixed="right">

+ 12 - 17
src/views/page/orderManage-sup/alreadyDelivery/alreadyDetail.vue

@@ -37,14 +37,14 @@
                         {{ listForm.docmkDate }}
                     </div>
                 </el-form-item>
-                <el-form-item label="部门名称" prop="deptName">
+                <el-form-item label="来源部门" prop="deptName">
               <div class="content">
                 {{ listForm.deptName }}
               </div>
             </el-form-item>
             </div>
             <div  class="flex-css">
-                <el-form-item label="医院名称" prop="branchName">
+                <el-form-item label="客户名称" prop="branchName">
               <div class="content">
                 {{ listForm.branchName }}
               </div>
@@ -97,16 +97,14 @@
                 </template>
                 <el-table-column fixed type="index" label="序号" width="60"/>
                 <el-table-column label="耗材编码" prop="materialId" />
-                <el-table-column label="医保编码" prop="ybbm" />
-                <el-table-column label="耗材名称" >
+                <el-table-column label="医保编码" prop="hiCode" />
+                <el-table-column label="耗材名称" width="300">
                     <template slot-scope="scope">
                         <mcs-info :info="scope.row"></mcs-info>
                     </template>
                 </el-table-column>
-                <el-table-column label="商品类别" prop="prodType" />
-                <el-table-column label="商品分类" prop="" />
                 <el-table-column label="规格" prop="spec" />
-                <el-table-column label="型号" prop="model" />
+                <el-table-column label="型号" prop="mol" />
                 <el-table-column label="材质" prop="matl" />
                 <el-table-column label="是否集采" prop="isFas" >
             <template #default="{ row }">
@@ -114,20 +112,17 @@
               <span v-if="row.isFas == '0'">是</span>
             </template>
           </el-table-column>
-          <el-table-column label="计价单位" prop="matl" />
-          <el-table-column label="采购单位" prop="prcUnt" />
-          <el-table-column label="包装内数量" prop="convart" />
+          <el-table-column label="计价单位" prop="prcUnt" />
+          <el-table-column label="采购单位" prop="purcUnt" />
+          <el-table-column label="包装内数量" prop="convrat" width="90px"/>
                 <el-table-column label="批次号" prop="lotNum" />
                 <el-table-column label="生产日期" prop="manuDate" />
                 <el-table-column label="有效期至" prop="prodExpy" />
-                <!-- <el-table-column label="生产来源" prop="source" />
-                <el-table-column label="注册证号" prop="approveNo" />
-                <el-table-column label="生产企业" prop="factory" /> -->
                 <el-table-column label="需求数量" prop="purcCnt" />
-                <el-table-column label="剩余出库量" prop="toDelvCnt" />
-                <el-table-column label="本次出库量" prop="delvCnt" />
-                <el-table-column label="客户验收数量" prop="shppCnt" />
-                <el-table-column label="客户拒收数量" prop="returnCnt" />
+                <el-table-column label="剩余出库量" prop="toDelvCnt" width="90px"/>
+                <el-table-column label="本次出库量" prop="delvCnt" width="90px"/>
+                <el-table-column label="客户验收数量" prop="shppCnt" width="100px"/>
+                <el-table-column label="客户拒收数量" prop="returnCnt" width="100px"/>
                 <el-table-column label="报关单" prop="invoFileId" >
                     <template slot-scope="scope">
                     <yl-upload

+ 31 - 58
src/views/page/orderManage-sup/purOrderAccept/acceptDetail.vue

@@ -43,18 +43,13 @@
               </div>
             </el-form-item>
             
-            <el-form-item label="部门名称" prop="deptName">
+            <el-form-item label="来源部门" prop="deptName">
               <div class="content">
                 {{ listForm.deptName }}
               </div>
             </el-form-item>
           </div>
           <div class="flex-css">
-            <el-form-item label="采购员" prop="docmker">
-              <div class="content">
-                {{ listForm.docmker }}
-              </div>
-            </el-form-item>
             <el-form-item label="当前状态" prop="stas">
               <div class="content">
                 {{ listForm.stas }}
@@ -64,7 +59,13 @@
               <div class="content">
                 {{ listForm.docmkDate }}
               </div>
+            </el-form-item> 
+            <el-form-item label=" " prop="">
+              <div class="content">
+                <!-- {{ listForm.docmker }} -->
+              </div>
             </el-form-item>
+            
           </div>
         </div>
       </el-form>
@@ -86,14 +87,14 @@
           </template>
           <el-table-column fixed type="index" label="序号" width="60" />
           <el-table-column label="耗材编码" prop="materialId" />
-          <el-table-column label="医保编码" prop="ybbm" />
+          <el-table-column label="医保编码" prop="hiCode" />
           <el-table-column label="耗材名称" width="300">
             <template slot-scope="scope">
               <mcs-info :info="scope.row"></mcs-info>
             </template>
           </el-table-column>
           <el-table-column label="规格" prop="spec" />
-          <el-table-column label="型号" prop="model" />
+          <el-table-column label="型号" prop="mol" />
           <el-table-column label="材质" prop="matl" />
 
           <el-table-column label="是否集采" prop="isFas" >
@@ -102,18 +103,13 @@
               <span v-if="row.isFas == '0'">是</span>
             </template>
           </el-table-column>
-          <el-table-column label="计价单位" prop="matl" />
-          <el-table-column label="采购单位" prop="prcUnt" />
-          <el-table-column label="包装内数量" prop="convart" />
+          <el-table-column label="计价单位" prop="prcUnt" />
+          <el-table-column label="采购单位" prop="purcUnt" />
+          <el-table-column label="包装内数量" prop="convrat" />
 
           <el-table-column label="采购数量" prop="purcCnt" />
           <el-table-column label="采购价" prop="purcPric" />
           <el-table-column label="总金额" prop="purcAmt" />
-
-          <el-table-column label="来源部门" prop="deptName" />
-          <el-table-column label="采购时间" prop="docmkDate" />
-
-          <el-table-column label="订单发起人" prop="docmker" width="100" />
           <el-table-column label="备注" prop="memo" />
           <el-table-column label="驳回原因" prop="rejtRea" width="200">
                     <template slot-scope="scope">
@@ -131,42 +127,6 @@
                         <el-switch v-model="scope.row.flag" @change="handleSwitch(scope.$index,scope.row)" :disabled="!isShow"></el-switch>
                     </template>
                 </el-table-column>
-          <!-- <el-table-column label="操作" width="100">
-                    <template slot-scope="scope">
-                        <el-popconfirm
-                            title="是否驳回?"
-                            @confirm="handleReject(scope.row)"
-                            confirm-button-text="确定"
-                            cancel-button-text="取消"
-                            icon="el-icon-info"
-                            icon-color="red"
-                            v-if="scope.row.stas == '0'"
-                        >
-                            <el-button
-                                class="red"
-                                type="text"
-                                slot="reference"
-                                >驳回</el-button
-                            >
-                        </el-popconfirm>
-                        <el-popconfirm
-                            title="是否取消驳回?"
-                            @confirm="handleNoReject(scope.row)"
-                            confirm-button-text="确定"
-                            cancel-button-text="取消"
-                            icon="el-icon-info"
-                            icon-color="red"
-                            v-else
-                        >
-                            <el-button
-                                class="red"
-                                type="text"
-                                slot="reference"
-                                >取消驳回</el-button
-                            >
-                        </el-popconfirm>
-                    </template>
-                </el-table-column> -->
         </el-table>
       </el-form>
 
@@ -295,16 +255,29 @@ export default {
         cancelButtonText: "取消",
         type: "warning",
       }).then(() => {
-        let data = this.list.filter((i) => {
+        // let data = this.list.filter((i) => {
+        //   if (i.flag == true) {
+        //     return i;
+        //   }
+        // });
+        // let data2 = data.map((i) => {
+        //   if(i.flag == true){
+        //     return { id: i.id, rejtRea: i.rejtRea };
+        //   }
+        // });
+        let arr =[]
+        let arr1 =[]
+        this.list.forEach((i)=>{
           if (i.flag == true) {
-            return i;
+            arr.push({ id: i.id, rejtRea: i.rejtRea, stas:"R" })
+            }
+          else{ arr1.push({ id: i.id, stas:"B" })
           }
-        });
-        let data2 = data.map((i) => {
-          return { id: i.id, rejtRea: i.rejtRea };
-        });
+        })
+        let data2 =  arr.concat(arr1);
         let data3 = {
           id: this.$route.query.id,
+          spdId: this.$route.query.spdId,
           rejtList: data2,
         };
         this.aaLoad = true;

+ 18 - 15
src/views/page/orderManage-sup/purOrderAccept/index.vue

@@ -22,16 +22,16 @@
             <el-form-item label="采购单号" prop="id" class="long">
               <el-input v-model="listQuery.id" placeholder="请输入采购单号"></el-input>
             </el-form-item>
-            <el-form-item label="医院名称" prop="branchName" class="long">
+            <el-form-item label="客户名称" prop="branchName" class="long">
               <el-input
                 v-model="listQuery.branchName"
-                placeholder="请输入医院名称"
+                placeholder="请输入客户名称"
               ></el-input>
             </el-form-item>
-            <el-form-item label="部门名称" prop="deptName" class="long">
+            <el-form-item label="来源部门" prop="deptName" class="long">
               <el-input
                 v-model="listQuery.deptName"
-                placeholder="请输入部门名称"
+                placeholder="请输入来源部门"
               ></el-input>
             </el-form-item>
             <el-form-item label="采购时间" prop="docmkDate" class="long">
@@ -56,6 +56,7 @@
             element-loading-text="加载中"
             :data="list"
             fit
+            height="500px"
             stripe
             border
           >
@@ -68,9 +69,9 @@
             <el-table-column label="采购品种" prop="detlCnt" />
             <el-table-column label="采购总数量" prop="qtySum" />
             <el-table-column label="采购总金额" prop="purcAmt" />
-            <el-table-column label="医院名称" prop="branchName" />
-            <el-table-column label="部门名称" prop="deptName" />
-            <el-table-column label="采购员" prop="docmker" />
+            <el-table-column label="客户名称" prop="branchName" />
+            <el-table-column label="来源部门" prop="deptName" />
+            <!-- <el-table-column label="采购员" prop="docmker" /> -->
             <el-table-column label="采购时间" prop="docmkDate" width="140" />
             <el-table-column label="当前状态" prop="stas">
               <template #default="{ row }">
@@ -103,16 +104,16 @@
             <el-form-item label="采购单号" prop="id"  class="long">
               <el-input v-model="listQueryC.id" placeholder="请输入采购单号"></el-input>
             </el-form-item>
-            <el-form-item label="医院名称" prop="branchName"  class="long">
+            <el-form-item label="客户名称" prop="branchName"  class="long">
               <el-input
                 v-model="listQueryC.branchName"
-                placeholder="请输入医院名称"
+                placeholder="请输入客户名称"
               ></el-input>
             </el-form-item>
-            <el-form-item label="部门名称" prop="deptName" class="long">
+            <el-form-item label="来源部门" prop="deptName" class="long">
               <el-input
                 v-model="listQuery.deptName"
-                placeholder="请输入部门名称"
+                placeholder="请输入来源部门"
               ></el-input>
             </el-form-item>
             <el-form-item label="采购时间" prop="docmkDate"  class="long">
@@ -139,6 +140,7 @@
             fit
             stripe
             border
+            height="500px"
           >
             <template slot="empty">
               <img src="@/assets/nopage.png" alt />
@@ -150,10 +152,11 @@
             <el-table-column label="订单总数量" prop="qtySum" />
             <el-table-column label="出库数量" prop="delvCnt" />
             <el-table-column label="订单总金额" prop="purcAmt" />
-            <el-table-column label="医院名称" prop="branchName" />
-            <el-table-column label="部门名称" prop="deptName" />
+            <el-table-column label="客户名称" prop="branchName" />
+            <el-table-column label="来源部门" prop="deptName" />
             <el-table-column label="发起时间" prop="docmkDate" width="140" />
-            <el-table-column label="发起人" prop="docmker" />
+            <el-table-column label="受理人" prop="docmker" />
+            <el-table-column label="受理时间" prop="docmkDate"  width="140" />
             <el-table-column label="状态" prop="stas">
               <template #default="{ row }">
                 <span v-if="row.stas == 'A'">未受理</span>
@@ -165,7 +168,7 @@
                 <span v-if="row.stas == 'P'">部分入库</span>
               </template>
             </el-table-column>
-            <el-table-column label="操作" width="100">
+            <el-table-column label="操作" width="100" fixed="right">
               <template slot-scope="scope">
                 <el-button type="text" @click="handleDetail1(scope.row)">详情</el-button>
               </template>

+ 12 - 55
src/views/page/orderManage-sup/purOrderConfirmed/confirmDetail.vue

@@ -37,23 +37,18 @@
                 {{ listForm.purcAmt }}
               </div>
             </el-form-item>
-            <el-form-item label="采购员" prop="docmker">
-              <div class="content">
-                {{ listForm.docmker }}
-              </div>
-            </el-form-item>
             <el-form-item label="部门名称" prop="deptName">
               <div class="content">
                 {{ listForm.deptName }}
               </div>
             </el-form-item>
-          </div>
-          <div class="flex-css">
             <el-form-item label="医院名称" prop="branchName">
               <div class="content">
                 {{ listForm.branchName }}
               </div>
             </el-form-item>
+          </div>
+          <div class="flex-css">
             <el-form-item label="采购时间" prop="docmkDate">
               <div class="content">
                 {{ listForm.docmkDate }}
@@ -64,6 +59,11 @@
                 {{ listForm.stas }}
               </div>
             </el-form-item>
+            <el-form-item label="  " prop="">
+              <div class="content">
+                <!-- {{ listForm.branchName }} -->
+              </div>
+            </el-form-item>
           </div>
         </div>
       </el-form>
@@ -85,15 +85,14 @@
           </template>
           <el-table-column fixed type="index" label="序号" width="60" />
           <el-table-column label="耗材编码" prop="materialId" />
-          <el-table-column label="医保编码" prop="ybbm" />
+          <el-table-column label="医保编码" prop="hiCode" />
           <el-table-column label="耗材名称" width="300">
             <template slot-scope="scope">
                 <mcs-info :info="scope.row"></mcs-info>
             </template>
           </el-table-column>
-          <el-table-column label="商品类别" prop="prodType" />
           <el-table-column label="规格" prop="spec" />
-          <el-table-column label="型号" prop="model" />
+          <el-table-column label="型号" prop="mol" />
           <el-table-column label="材质" prop="matl" />
           <el-table-column label="是否集采" prop="isFas" >
             <template #default="{ row }">
@@ -101,19 +100,13 @@
               <span v-if="row.isFas == '0'">是</span>
             </template>
           </el-table-column>
-          <el-table-column label="计价单位" prop="matl" />
-          <el-table-column label="采购单位" prop="prcUnt" />
-          <el-table-column label="包装内数量" prop="convart" />
-          <el-table-column label="生产来源" prop="matl" />
-          <el-table-column label="注册证号" prop="approveNo" width="150" />
-          <el-table-column label="生产企业" prop="factory" width="200" />
+          <el-table-column label="计价单位" prop="prcUnt" />
+          <el-table-column label="采购单位" prop="purcUnt" />
+          <el-table-column label="包装内数量" prop="convrat" />
           <el-table-column label="采购数量" prop="purcCnt" />
           <el-table-column label="采购价" prop="purcPric" />
           <el-table-column label="总金额" prop="purcAmt" />
-          <el-table-column label="来源部门" prop="deptName" />
-          <el-table-column label="采购时间" prop="docmkDate" />
 
-          <el-table-column label="订单发起人" prop="docmker" width="100" />
           <el-table-column label="备注" prop="memo" />
           <el-table-column label="驳回原因" prop="rejtRea" width="200">
                       <template slot-scope="scope">
@@ -131,42 +124,6 @@
                           <el-switch v-model="scope.row.flag" @change="handleSwitch(scope.$index,scope.row)" :disabled="!isShow"></el-switch>
                       </template>
                   </el-table-column>
-          <!-- <el-table-column label="操作" width="100">
-                      <template slot-scope="scope">
-                          <el-popconfirm
-                              title="是否驳回?"
-                              @confirm="handleReject(scope.row)"
-                              confirm-button-text="确定"
-                              cancel-button-text="取消"
-                              icon="el-icon-info"
-                              icon-color="red"
-                              v-if="scope.row.stas == '0'"
-                          >
-                              <el-button
-                                  class="red"
-                                  type="text"
-                                  slot="reference"
-                                  >驳回</el-button
-                              >
-                          </el-popconfirm>
-                          <el-popconfirm
-                              title="是否取消驳回?"
-                              @confirm="handleNoReject(scope.row)"
-                              confirm-button-text="确定"
-                              cancel-button-text="取消"
-                              icon="el-icon-info"
-                              icon-color="red"
-                              v-else
-                          >
-                              <el-button
-                                  class="red"
-                                  type="text"
-                                  slot="reference"
-                                  >取消驳回</el-button
-                              >
-                          </el-popconfirm>
-                      </template>
-                  </el-table-column> -->
         </el-table>
       </el-form>
 

+ 49 - 50
src/views/page/orderManage-sup/purOrderDelivery/deliveryDetail.vue

@@ -41,23 +41,21 @@
                 {{ listForm.purcAmt }}
               </div>
             </el-form-item>
-            <el-form-item label="采购员" prop="docmker">
-              <div class="content">
-                {{ listForm.docmker }}
-              </div>
-            </el-form-item>
+           
             <el-form-item label="部门名称" prop="deptName">
               <div class="content">
                 {{ listForm.deptName }}
               </div>
             </el-form-item>
-          </div>
-          <div class="flex-css">
-          <el-form-item label="医院名称" prop="branchName">
+            <el-form-item label="医院名称" prop="branchName">
               <div class="content">
                 {{ listForm.branchName }}
               </div>
             </el-form-item> 
+          </div>
+          <div class="flex-css">
+           
+          
             <el-form-item label="当前状态" prop="stas">
               <div class="content">
                 {{ listForm.stas }}
@@ -68,6 +66,11 @@
                 {{ listForm.docmkDate }}
               </div>
             </el-form-item>
+            <el-form-item label=" " prop="">
+              <div class="content">
+                <!-- {{ listForm.docmker }} -->
+              </div>
+            </el-form-item>
           </div>
         </div>
       </el-form>
@@ -88,16 +91,14 @@
           </template>
           <el-table-column fixed type="index" label="序号" width="60" />
           <el-table-column label="耗材编码" prop="materialId" />
-          <el-table-column label="医保编码" prop="ybbm" />
-          <el-table-column label="耗材名称" >
+          <el-table-column label="医保编码" prop="hiCode" />
+          <el-table-column label="耗材名称" width="300">
             <template slot-scope="scope">
                 <mcs-info :info="scope.row"></mcs-info>
             </template>
           </el-table-column>
-          <el-table-column label="商品类别" prop="prodType" />
-          <el-table-column label="商品分类" prop="drugListId" />
           <el-table-column label="规格" prop="spec" />
-          <el-table-column label="型号" prop="model" />
+          <el-table-column label="型号" prop="mol" />
           <el-table-column label="材质" prop="matl" />
           <el-table-column label="是否集采" prop="isFas" >
             <template #default="{ row }">
@@ -105,35 +106,10 @@
               <span v-if="row.isFas == '0'">是</span>
             </template>
           </el-table-column>
-          <el-table-column label="计价单位" prop="matl" />
-          <el-table-column label="采购单位" prop="prcUnt" />
-          <el-table-column label="包装内数量" prop="convart" />
-          <!-- <el-table-column label="生产来源" prop="source" />
-          <el-table-column label="注册证号" prop="approveNo" />
-          <el-table-column label="生产企业" prop="factory" />
-          <el-table-column label="单价" prop="purcPric" /> -->
-          <el-table-column label="需求数量" prop="purcCnt" />
-          <el-table-column label="已出库数量" prop="delvCntYck" width="90px" />
-          <el-table-column label="剩余出库量" prop="toDelvCnt" width="90px" />
-          <el-table-column label="出库数量" prop="delvCnt" width="150">
-              <template slot-scope="scope">
-                  <el-form-item
-                      label-width="0"
-                      class="item"
-                      :prop="scope.$index + '.delvCnt'"
-                      :rules="[
-                      {
-                          required: true,
-                          pattern: /^[0-9]\d*$/,
-                          message: '请输入正整数',
-                          trigger: 'blur',
-                      },
-                      ]"
-                  >
-                      <el-input-number v-model="scope.row.delvCnt" controls-position="right" @change="updateNum(scope.row,scope.$index)" :min="0"></el-input-number>
-                  </el-form-item>
-              </template>
-          </el-table-column>
+          <el-table-column label="计价单位" prop="prcUnt" />
+          <el-table-column label="采购单位" prop="purcUnt" />
+          <el-table-column label="包装内数量" prop="convrat" />
+          <el-table-column label="单价" prop="purcPric" />
           <el-table-column label="批号" prop="lotNum" width="120">
             <template slot-scope="scope">
               <el-form-item
@@ -200,6 +176,29 @@
               </el-form-item>
             </template>
           </el-table-column>
+          <el-table-column label="需求数量" prop="purcCnt" />
+          <el-table-column label="已出库数量" prop="delvCntYck" width="90px" />
+          <el-table-column label="剩余出库量" prop="toDelvCnt" width="90px" />
+          <el-table-column label="本次出库数量" prop="delvCnt" width="150">
+              <template slot-scope="scope">
+                  <el-form-item
+                      label-width="0"
+                      class="item"
+                      :prop="scope.$index + '.delvCnt'"
+                      :rules="[
+                      {
+                          required: true,
+                          pattern: /^[0-9]\d*$/,
+                          message: '请输入正整数',
+                          trigger: 'blur',
+                      },
+                      ]"
+                  >
+                      <el-input-number v-model="scope.row.delvCnt" controls-position="right" @change="updateNum(scope.row,scope.$index)" :min="0"></el-input-number>
+                  </el-form-item>
+              </template>
+          </el-table-column>
+          
           <el-table-column label="报关单" prop="invoFileId" width="200">
             <template slot-scope="scope">
               <yl-upload
@@ -903,7 +902,6 @@ export default {
         lotNum: "",
         manuDate: "",
         prodExpy: "",
-        invoFileId: "",
         dyntFileId: "",
       };
       this.tableData.splice(index + 1, 0, list);
@@ -1116,14 +1114,14 @@ export default {
       this.tableData.forEach((item) => {
         console.log(item, "item");
         // if (!item.invoFileId || !item.dyntFileId) {
-        //  if (!item.invoFileId) {
-          // this.$message({
+         if (item.source=="进口" && !item.invoFileId) {
+          this.$message({
             // message: "请填写相应信息,并选择报关单和随货单",
-            // message: "请填写相应信息,并选择报关单",
-        //     type: "warning",
-        //   });
-        //   throw new Error("请填写相应信息,并选择报关单和随货单");
-        // }
+            message: "请填写相应信息,并选择报关单",
+            type: "warning",
+          });
+          throw new Error("请填写相应信息,并选择报关单");
+        }
       });
       this.$refs.tabledata.validate((valid) => {
         if (valid) {
@@ -1170,6 +1168,7 @@ export default {
           purcOrdId: this.$route.query.id,
           detlList: data,
           deptId: this.$route.query.deptId,
+          spdId: this.$route.query.spdId,
           deptName: this.$route.query.deptName,
         };
         console.log(data, "data");

+ 32 - 18
src/views/page/orderManage-sup/purOrderDelivery/index.vue

@@ -22,9 +22,15 @@
           <el-form-item label="采购单号" prop="id">
             <el-input v-model="listQuery.id" placeholder="请输入采购单号"></el-input>
           </el-form-item>
-          <el-form-item label="医院名称" prop="branchName">
-            <el-input v-model="listQuery.branchName" placeholder="请输入医院名称"></el-input>
+          <el-form-item label="客户名称" prop="branchName">
+            <el-input v-model="listQuery.branchName" placeholder="请输入客户名称"></el-input>
           </el-form-item>
+          <el-form-item label="来源部门" prop="deptName">
+              <el-input
+                v-model="listQuery.deptName"
+                placeholder="请输入来源部门"
+              ></el-input>
+            </el-form-item>
           <el-form-item label="采购时间" prop="docmkDate">
             <el-date-picker
               v-model="listQuery.docmkDate"
@@ -63,6 +69,7 @@
           fit
           stripe
           border
+          height="500px"
         >
           <template slot="empty">
             <img src="@/assets/nopage.png" alt />
@@ -71,12 +78,12 @@
           <el-table-column fixed type="index" label="序号" width="60" />
           <el-table-column label="订单编号" prop="id" />
           <el-table-column label="订单种类" prop="detlCnt" />
-          <el-table-column label="订单总数量" prop="qtySum" />
-          <el-table-column label="剩余出库量" prop="delvCnt" />
-          <el-table-column label="订单总金额" prop="purcAmt" />
-          <el-table-column label="医院名称" prop="branchName" />
-          <el-table-column label="部门名称" prop="deptName" />
-          <el-table-column label="采购员" prop="docmker" />
+          <el-table-column label="订单总数量" prop="qtySum" width="90px"/>
+          <el-table-column label="剩余出库量" prop="delvCnt" width="90px"/>
+          <el-table-column label="订单总金额" prop="purcAmt" width="90px"/>
+          <el-table-column label="客户名称" prop="branchName" />
+          <el-table-column label="来源部门" prop="deptName" />
+          <!-- <el-table-column label="采购员" prop="docmker" /> -->
           <el-table-column label="采购时间" prop="docmkDate" width="140" />
           <el-table-column label="状态" prop="stas">
             <!-- <template #default="{ row }">
@@ -118,12 +125,18 @@
               placeholder="请输入关联采购单"
             ></el-input>
           </el-form-item>
-          <el-form-item label="医院名称" prop="branchName">
+          <el-form-item label="客户名称" prop="branchName">
             <el-input
               v-model="listQueryC.branchName"
-              placeholder="请输入医院名称"
+              placeholder="请输入客户名称"
             ></el-input>
           </el-form-item>
+          <el-form-item label="来源部门" prop="deptName">
+              <el-input
+                v-model="listQueryC.deptName"
+                placeholder="请输入来源部门"
+              ></el-input>
+            </el-form-item>
           <el-form-item label="出库时间" prop="docmkDate">
             <el-date-picker
               v-model="listQueryC.docmkDate"
@@ -162,6 +175,7 @@
           fit
           stripe
           border
+          height="500px"
         >
           <template slot="empty">
             <img src="@/assets/nopage.png" alt />
@@ -169,14 +183,14 @@
           </template>
           <el-table-column fixed type="index" label="序号" width="60" />
           <el-table-column label="出库单号" prop="delvOrdId" />
-          <el-table-column label="关联采购单" prop="purcOrdId" />
-          <el-table-column label="采购品种数" prop="detlCnt" />
-          <el-table-column label="采购总数量" prop="qtySum" />
-          <el-table-column label="本次出库量" prop="bcckl" />
-          <el-table-column label="客户验收数量" prop="shppCnt" width="80" />
-          <el-table-column label="剩余出库量" prop="toDelvCnt" />
-          <el-table-column label="医院名称" prop="branchName" />
-          <el-table-column label="部门名称" prop="deptName" />
+          <el-table-column label="关联采购单" prop="purcOrdId" width="90px"/>
+          <el-table-column label="采购品种数" prop="detlCnt" width="90px"/>
+          <el-table-column label="采购总数量" prop="qtySum" width="90px"/>
+          <el-table-column label="本次出库量" prop="bcckl"width="90px" />
+          <el-table-column label="客户验收数量" prop="shppCnt" width="100px"/>
+          <el-table-column label="剩余出库量" prop="toDelvCnt" width="100px"/>
+          <el-table-column label="客户名称" prop="branchName" />
+          <el-table-column label="来源部门" prop="deptName" />
           <el-table-column label="出库员" prop="docmker" />
           <el-table-column label="出库时间" prop="docmkDate" width="140" />
           <el-table-column label="状态" prop="delvOrdStas" width="100">

+ 158 - 57
src/views/page/orderManage-sup/purOrderDelivery/purchaseDetails.vue

@@ -33,7 +33,7 @@
           <el-table-column label="商品类别" prop="prodType" />
           <el-table-column label="商品分类" prop="drugListId" />
           <el-table-column label="规格" prop="spec" />
-          <el-table-column label="型号" prop="model" />
+          <el-table-column label="型号" prop="mol" />
           <el-table-column label="材质" prop="matl" />
           <el-table-column label="生产来源" prop="source" />
           <el-table-column label="注册证号" prop="approveNo" />
@@ -181,22 +181,18 @@
         </el-table>
       </el-form>
     </div>
+    <div class="foot-button" style="margin-top: 30px">
+      <!-- <el-button type="success" @click="handleSave">保存</el-button> -->
+      <el-button type="primary" @click="handleDelivery">出库</el-button>
+    </div>
     <el-dialog title="提取采购单" :visible.sync="dialog" width="70%">
       <template>
-        <el-form
-          :model="listQuery"
-          ref="listQuery"
-          :inline="true"
-          label-width="90px"
-        >
-        <el-form-item size="mini" label="采购单号" prop="id" class="long">
+        <el-form :model="listQuery" ref="listQuery" :inline="true" label-width="90px">
+          <el-form-item size="mini" label="采购单号" prop="id" class="long">
             <el-input v-model="listQuery.id" placeholder="请输入采购单号"></el-input>
           </el-form-item>
-        <el-form-item size="mini" label="采购员" prop="docmker" class="long">
-            <el-input
-              v-model="listQuery.docmker"
-              placeholder="请输入采购员"
-            ></el-input>
+          <el-form-item size="mini" label="采购员" prop="docmker" class="long">
+            <el-input v-model="listQuery.docmker" placeholder="请输入采购员"></el-input>
           </el-form-item>
           <el-form-item size="mini" label="耗材名称" prop="prodName" class="long">
             <el-input
@@ -205,13 +201,9 @@
             ></el-input>
           </el-form-item>
           <el-form-item size="mini" label="医保编码" prop="hiCode" class="long">
-            <el-input
-              v-model="listQuery.hiCode"
-              placeholder="请输入医保编码"
-            ></el-input>
+            <el-input v-model="listQuery.hiCode" placeholder="请输入医保编码"></el-input>
           </el-form-item>
-          
-         
+
           <el-form-item>
             <el-button type="primary" @click="getdialog('search')">查询</el-button>
             <el-button @click="resetdialog('consumableData')">重置</el-button>
@@ -219,7 +211,7 @@
         </el-form>
         <el-table
           ref="multipleTable"
-          v-loading="listdialogLoading"
+          v-loading="dialogLoading"
           element-loading-text="加载中"
           fit
           stripe
@@ -231,10 +223,10 @@
           height="500"
           @selection-change="handleSelectionChange"
           highlight-current-row
+          :default-sort="{ prop: 'hiCode', order: 'descending' }"
         >
           <el-table-column
             type="selection"
-            :selectable="selected"
             :reserve-selection="true"
             width="55"
           ></el-table-column>
@@ -249,10 +241,6 @@
             </template>
           </el-table-column>
           <el-table-column prop="fasBtch" label="集采批次"> </el-table-column>
-          <!-- <el-table-column prop="splb" label="商品类别">
-            </el-table-column>
-            <el-table-column prop="spfl" label="商品分类">
-            </el-table-column> -->
           <el-table-column prop="spec" label="规格"> </el-table-column>
           <el-table-column prop="mol" label="型号"> </el-table-column>
           <el-table-column prop="matl" label="材质"> </el-table-column>
@@ -269,13 +257,12 @@
           <el-table-column prop="agnt" label="代理企业" width="150"> </el-table-column>
         </el-table>
         <div slot="footer" class="dialog-footer">
-          <el-button type="primary" @click="handleConfirm">确认</el-button
-          >
+          <el-button type="primary" @click="handleConfirm">确认</el-button>
         </div>
         <!--分页-->
         <yl-pagination
-          v-show="totalC > 0"
-          :total="totalC"
+          v-show="total > 0"
+          :total="total"
           :page.sync="listQuery.current"
           :limit.sync="listQuery.size"
           @pagination="getdialog"
@@ -294,40 +281,75 @@ export default {
       listForm: {
         aa: "",
       },
-      planForm:{},
-    // 表格数据
-      loding:false,
-      tableData:[],
-    // 弹框表格数据
-      dialog:false,
-      listQuery:{
-        hiCode:"",
-        prodName:"",
-        id:"",
-        docmker:"",
+      planForm: {},
+      // 表格数据
+      loding: false,
+      tableData: [],
+      // 弹框表格数据
+      dialog: false,
+      listQuery: {
+        hiCode: "",
+        prodName: "",
+        id: "",
+        docmker: "",
       },
-      consumableData:[]
+      consumableData: [],
+      selectData: [],
+      dialogLoading:false,
+      Loading:false,
     };
   },
   methods: {
     getDetails() {
       this.$refs["planForm"].validate((valid) => {
         if (valid) {
-            this.dialog=true;
-        //   this.$confirm("确认提交", "提示", {
-        //     confirmButtonText: "确定",
-        //     cancelButtonText: "取消",
-        //     type: "warning",
-        //   }).then(() => {
-
-        //   });
+          this.dialog = true;
+          this.getdialog();
+          this.$nextTick(() => {
+            this.$refs.tidata.clearSelection();
+            this.tableData.forEach((i) => {
+              this.consumableData.forEach((row) => {
+                if (i.id == row.id) {
+                  this.$refs.tidata.toggleRowSelection(row, true);
+                }
+              });
+            });
+          });
         }
-        // else{
-            // this.$message.warning("请输入随货同行单号")
-        // }
       });
     },
-     // 合并列
+    // 列表数据
+    getData() {
+      this.Loading = true;
+      getPurcOrdDrugList(this.listForm)
+        .then((res) => {
+          this.tableData = res.data.records;
+          this.Loading = false;
+        })
+        .catch((err) => {
+          this.Loading = false;
+        });
+    },
+    // 采购明细数据
+    getdialog() {
+      if (type == "search") {
+        this.listQuery.current = 1;
+      }
+      this.dialogLoading = true;
+      getPurcOrdDrugList(this.listQuery)
+        .then((res) => {
+          this.consumableData = res.data.records;
+          this.consumableData.forEach((i) => {
+            i.docmkDate = moment(i.docmkDate).format("YYYY-MM-DD HH:mm:ss");
+          });
+          this.total = res.data.total;
+          this.dialogLoading = false;
+        })
+        .catch((err) => {
+          this.dialogLoading = false;
+        });
+    },
+    // 合并列
     handleSpan({ row, column, rowIndex, columnIndex }) {
       if (
         columnIndex === 1 ||
@@ -343,7 +365,7 @@ export default {
         columnIndex === 11 ||
         columnIndex === 12 ||
         columnIndex === 13 ||
-        columnIndex === 14 
+        columnIndex === 14
       ) {
         // console.log("单元格数组,若下一项为0,则代表合并上一项", this.cellList);
         const rowCell = this.cellList[rowIndex];
@@ -381,9 +403,88 @@ export default {
       // }
     },
     //弹框选择
-    handleSelectionChange(){
-        
-    }
+    handleSelectionChange() {
+      this.selectData = e;
+    },
+    // 出库
+    handleDelivery() {
+      if (this.tableData.length != 0) {
+        this.$refs.tabledata.validate((valid) => {
+          if (valid) {
+            let data = this.tableData.map((i) => {
+              return i.purcOrdId;
+            });
+            let data2 = data.slice(1);
+            let qwe = data2.some((item) => {
+              if (item != data[0]) {
+                return true;
+              }
+            });
+            if (qwe == true) {
+              this.$message.info("请勾选同一采购单明细");
+            } else {
+              this.$confirm("确认出库", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+              }).then(() => {
+                let data = this.tableData.map((i) => {
+                  return {
+                    drugListId: i.drugListId,
+                    delvCnt: i.delvCnt,
+                    lotNum: i.lotNum,
+                    manuDate: i.manuDate,
+                    prodExpy: i.prodExpy,
+                    invoFileId: i.invoFileId,
+                    dyntFileId: i.dyntFileId,
+                    delvPric: i.purcPric,
+                  };
+                });
+                let data2 = {
+                  delvOrdId: "",
+                  spdId: "",
+                  dyntNo: this.listForm.dyntNo,
+                  purcOrdId: this.tableData[0].purcOrdId,
+                  detlList: data,
+                };
+                this.confirmLoadLoad = true;
+                submitDelvOrd(data2)
+                  .then((res) => {
+                    this.confirmLoadLoad = false;
+                    this.getTiData();
+                    this.tableData = [];
+                    this.selectData = [];
+                    this.$message({
+                      message: "出库成功",
+                      type: "success",
+                    });
+                    this.listForm.dyntNo = "";
+                  })
+                  .catch((err) => {
+                    this.confirmLoadLoad = false;
+                  });
+              });
+            }
+          } else {
+            this.$message({
+              type: "info",
+              message: "请填写必填项信息",
+            });
+          }
+        });
+        // }else{
+        //     this.$message({
+        //         type: "info",
+        //         message: "随货同行单号不能为空",
+        //     });
+        // }
+      } else {
+        this.$message({
+          type: "info",
+          message: "出库数据不能为空",
+        });
+      }
+    },
   },
 };
 </script>