瀏覽代碼

feat: 家用工程订单

zh 2 年之前
父節點
當前提交
8bf92eae1a

+ 118 - 274
src/views/supply/engin/components/home_detail.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="detail-container">
     <div v-show="!isShowCheckOrder">
-      <el-page-header @back="goBack" content="详情"></el-page-header>
+      <el-page-header content="详情" @back="goBack" />
 
       <div id="printData">
         <div class="main-title">
@@ -65,6 +65,10 @@
               <div class="value">{{ detailData.refBuyUnitName }}</div>
             </el-col>
             <el-col :span="8" class="item">
+              <div class="label">购买单位</div>
+              <div class="value">{{ detailData.refBuyUnitName }}</div>
+            </el-col>
+            <el-col :span="8" class="item">
               <div class="label">区域</div>
               <div class="value">{{ detailData.refRegionWork }}</div>
             </el-col>
@@ -110,6 +114,14 @@
               <div class="label">业务员</div>
               <div class="value">{{ detailData.serviceName }}</div>
             </el-col>
+            <el-col :span="8" class="item">
+              <div class="label">登录有效期</div>
+              <div class="value">{{ detailData.refBillsExpireDate }}</div>
+            </el-col>
+            <el-col :span="8" class="item">
+              <div class="label">项目编号</div>
+              <div class="value">{{ detailData.refProjectNo }}</div>
+            </el-col>
             <!-- <el-col :span="24" class="item">
               <div class="label">格力回复</div>
               <div class="value">{{detailData.note1}}</div>
@@ -123,14 +135,26 @@
               <div class="value">{{ detailData.refProjectType }}</div>
             </el-col>
             <el-col :span="24" class="item">
+              <div class="label">工程机转零售批复意见</div>
+              <div class="value">{{ detailData.refToRetailIdea }}</div>
+            </el-col>
+            <el-col :span="24" class="item">
+              <div class="label">合同变更批复意见</div>
+              <div class="value">{{ detailData.refContractIdea }}</div>
+            </el-col>
+            <el-col :span="24" class="item">
+              <div class="label">资料延期批复意见</div>
+              <div class="value">{{ detailData.refDataDelayIdea }}</div>
+            </el-col>
+            <el-col :span="24" class="item">
               <div class="label">其他附件审批意见</div>
               <div class="value">{{ detailData.refOtherAnnexIdea }}</div>
             </el-col>
-            <el-col :span="24" class="item" v-if="!isDealer">
+            <el-col v-if="!isDealer" :span="24" class="item">
               <div class="label">格力内部备注</div>
               <div class="value">
-                <el-input v-model="detailData.geLiInerNote" placeholder="请输入格力内部备注"></el-input>
-                <el-divider direction="vertical"></el-divider>
+                <el-input v-model="detailData.geLiInerNote" placeholder="请输入格力内部备注" />
+                <el-divider direction="vertical" />
                 <el-button type="text" @click="saveRemark">保存备注</el-button>
               </div>
             </el-col>
@@ -174,7 +198,7 @@
               <div class="label">审批说明</div>
               <div class="value">{{ detailData.examineNote }}</div>
             </el-col>
-            <el-col :span="24" class="item" v-if="!isDealer">
+            <el-col v-if="!isDealer" :span="24" class="item">
               <div class="label">引用记录</div>
               <div class="value">
                 {{ detailData.items[0] && detailData.items[0].useRefCount }}
@@ -199,42 +223,24 @@
             show-summary
             :summary-method="$getSummaries"
           >
-            <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-            <el-table-column
-              align="left"
-              label="销售类型"
-              prop="saleTypeName"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
+            <el-table-column align="center" label="序号" type="index" width="50" />
+            <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="物料编码"
               prop="materialNumber"
               min-width="120"
               show-overflow-tooltip
-            ></el-table-column>
+            />
             <el-table-column
               align="left"
               label="产品编码"
               prop="materialOldNumber"
               min-width="120"
               show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="产品名称"
-              prop="materialName"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="规格型号"
-              prop="specification"
-              min-width="350"
-              show-overflow-tooltip
-            ></el-table-column>
+            />
+            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
+            <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="实装规格型号"
@@ -248,13 +254,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column
-              align="right"
-              label="数量"
-              prop="qty"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
+            <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip />
             <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.price | numToFixed }}
@@ -266,20 +266,14 @@
               </template>
             </el-table-column>
 
-            <el-table-column
-              align="right"
-              label="工程登录数量"
-              prop="enginNum"
-              min-width="120"
-              show-overflow-tooltip
-            ></el-table-column>
+            <el-table-column align="right" label="工程登录数量" prop="enginNum" min-width="120" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="现金钱包"
               prop="customerWalletName"
               min-width="100"
               show-overflow-tooltip
-            ></el-table-column>
+            />
 
             <el-table-column
               align="right"
@@ -287,7 +281,7 @@
               prop="customerWalletName2"
               min-width="100"
               show-overflow-tooltip
-            ></el-table-column>
+            />
             <el-table-column
               align="right"
               label="实付返利金额"
@@ -310,6 +304,15 @@
               </template>
             </el-table-column>
             <el-table-column
+              align="right"
+              label="退订数量"
+              prop="tdQty"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column align="right" label="销售数量" prop="salesQty" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="销售金额" prop="salesAmount" min-width="100" show-overflow-tooltip />
+            <el-table-column
               align="left"
               label="是否直调"
               prop="isDirectTransfer"
@@ -326,23 +329,11 @@
               prop="directTransferQty"
               min-width="100"
               show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="right"
-              label="已发货数量"
-              prop="hasSendQty"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
+            />
+            <el-table-column align="right" label="已发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip />
 
             <!-- <el-table-column align="right" label="原订单数量" prop="oldQty" min-width="100" show-overflow-tooltip></el-table-column> -->
-            <el-table-column
-              align="left"
-              label="备注"
-              prop="remark"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
+            <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
             <el-table-column
               align="left"
               label="实装物料编号"
@@ -369,23 +360,11 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="税率"
-              prop="tax"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="单位"
-              prop="unit"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
+            <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
           </el-table>
         </div>
-        <div class="table" style="margin-top: 20px" v-if="detailData.examineStatus == 'OK'">
+        <div v-if="detailData.examineStatus == 'OK'" class="table" style="margin-top: 20px">
           <el-table
             :data="detailData.refundNoteList"
             element-loading-text="Loading"
@@ -397,10 +376,10 @@
             show-summary
             :summary-method="$getSummaries"
           >
-            <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-            <el-table-column align="left" label="创建人" prop="createBy" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="创建时间" prop="createTime" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="退订说明" prop="refundNote" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="序号" type="index" width="50" />
+            <el-table-column align="left" label="创建人" prop="createBy" show-overflow-tooltip />
+            <el-table-column align="left" label="创建时间" prop="createTime" show-overflow-tooltip />
+            <el-table-column align="left" label="退订说明" prop="refundNote" show-overflow-tooltip />
           </el-table>
         </div>
       </div>
@@ -409,22 +388,23 @@
         <div class="footer">
           <el-button type="success" @click="toCheckOrder">联查单据</el-button>
           <el-button
+            v-if="!isDealer && (detailData.examineStatus === 'SAVE' || detailData.examineStatus === 'WAIT')"
             type="danger"
             @click="closeData"
-            v-if="!isDealer && (detailData.examineStatus === 'SAVE' || detailData.examineStatus === 'WAIT')"
-            >关闭订单</el-button
-          >
+          >关闭订单</el-button>
           <!-- <el-button type="primary" @click="openDirectDialog" v-if="!isDealer">提前开票</el-button> -->
-          <el-button type="primary" @click="overData" :disabled="detailData.directTransferStatus" v-if="!isDealer"
-            >直调完结</el-button
-          >
           <el-button
+            v-if="!isDealer"
             type="primary"
-            @click="openDeliverDialog"
             :disabled="detailData.directTransferStatus"
+            @click="overData"
+          >直调完结</el-button>
+          <el-button
             v-if="!isDealer"
-            >直调发货</el-button
-          >
+            type="primary"
+            :disabled="detailData.directTransferStatus"
+            @click="openDeliverDialog"
+          >直调发货</el-button>
           <el-button @click="goBack">返回列表</el-button>
         </div>
       </div>
@@ -455,13 +435,13 @@
           <el-col :xs="8" :sm="8" :lg="8">
             <el-form-item label="选择仓位" prop="position">
               <el-select v-model="deliverForm.position" placeholder="请选择仓位" style="width: 100%" filterable>
-                <el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                <el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="8" :sm="8" :lg="8">
             <el-form-item label="发货申请备注" prop="remark">
-              <el-input v-model="deliverForm.remark" placeholder="请输入发货申请备注" clearable></el-input>
+              <el-input v-model="deliverForm.remark" placeholder="请输入发货申请备注" clearable />
             </el-form-item>
           </el-col>
         </el-row>
@@ -477,56 +457,20 @@
           stripe
           max-height="400"
         >
-          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-          <el-table-column
-            align="center"
-            label="销售类型"
-            prop="saleTypeName"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
+          <el-table-column align="center" label="序号" type="index" width="50" />
+          <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
           <el-table-column
             align="center"
             label="物料编码"
             prop="materialNumber"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="产品名称"
-            prop="materialName"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="规格型号"
-            prop="specification"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="单位"
-            prop="unit"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="right"
-            label="订单数量"
-            prop="qty"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="right"
-            label="发货数量"
-            prop="hasSendQty"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
+          />
+          <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
+          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip />
+          <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
+          <el-table-column align="right" label="订单数量" prop="qty" min-width="100" show-overflow-tooltip />
+          <el-table-column align="right" label="发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip />
           <el-table-column
             align="right"
             label="直调数量"
@@ -541,42 +485,24 @@
                 size="small"
                 type="number"
                 @mousewheel.native.prevent
-              ></el-input>
+              />
             </template>
           </el-table-column>
-          <el-table-column
-            align="right"
-            label="单价"
-            prop="price"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="right"
-            label="金额"
-            prop="totalAmount"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
+          <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip />
+          <el-table-column align="right" label="金额" prop="totalAmount" min-width="100" show-overflow-tooltip />
           <el-table-column
             align="right"
             label="实际返利金额"
             prop="payRebateAmount"
             min-width="110"
             show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="备注"
-            prop="remark"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
+          />
+          <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
         </el-table>
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeDeliverDialog">取 消</el-button>
-        <el-button type="primary" @click="submitDeliverForm" :loading="formLoading">确 定</el-button>
+        <el-button type="primary" :loading="formLoading" @click="submitDeliverForm">确 定</el-button>
       </span>
     </el-dialog>
 
@@ -599,12 +525,7 @@
                 filterable
                 @change="changeWarehouse1"
               >
-                <el-option
-                  v-for="item in warehouseList1"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                ></el-option>
+                <el-option v-for="item in warehouseList1" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -617,7 +538,7 @@
                 filterable
                 @change="changePosition1"
               >
-                <el-option v-for="item in positionList1" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                <el-option v-for="item in positionList1" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -630,12 +551,7 @@
                 filterable
                 @change="changeWarehouse2"
               >
-                <el-option
-                  v-for="item in warehouseList2"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                ></el-option>
+                <el-option v-for="item in warehouseList2" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -648,7 +564,7 @@
                 filterable
                 @change="changePosition2"
               >
-                <el-option v-for="item in positionList2" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                <el-option v-for="item in positionList2" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
           </el-col>
@@ -665,120 +581,48 @@
           stripe
           max-height="400"
         >
-          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-          <el-table-column
-            align="center"
-            label="销售类型"
-            prop="saleTypeName"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
+          <el-table-column align="center" label="序号" type="index" width="50" />
+          <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
           <el-table-column
             align="center"
             label="物料代码"
             prop="materialNumber"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
+          />
           <el-table-column
             align="center"
             label="产品编码"
             prop="materialOldNumber"
             min-width="160"
             show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="产品名称"
-            prop="materialName"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="规格型号"
-            prop="specification"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="单位"
-            prop="unit"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="数量"
-            prop="qty"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="调出仓库"
-            prop="warehouse1"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="调出仓位"
-            prop="position1"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="调入仓库"
-            prop="warehouse2"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="调入仓位"
-            prop="position2"
-            min-width="100"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="调出库存状态"
-            prop="status1"
-            min-width="110"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="调入库存状态"
-            prop="status2"
-            min-width="110"
-            show-overflow-tooltip
-          ></el-table-column>
+          />
+          <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
+          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip />
+          <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
+          <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip />
+          <el-table-column align="center" label="调出仓库" prop="warehouse1" min-width="100" show-overflow-tooltip />
+          <el-table-column align="center" label="调出仓位" prop="position1" min-width="100" show-overflow-tooltip />
+          <el-table-column align="center" label="调入仓库" prop="warehouse2" min-width="100" show-overflow-tooltip />
+          <el-table-column align="center" label="调入仓位" prop="position2" min-width="100" show-overflow-tooltip />
+          <el-table-column align="center" label="调出库存状态" prop="status1" min-width="110" show-overflow-tooltip />
+          <el-table-column align="center" label="调入库存状态" prop="status2" min-width="110" show-overflow-tooltip />
           <el-table-column align="center" label="调出货主" min-width="100" show-overflow-tooltip>
             <template slot-scope="">弘格</template>
           </el-table-column>
           <el-table-column align="center" label="调入货主" min-width="100" show-overflow-tooltip>
             <template slot-="scope">弘格</template>
           </el-table-column>
-          <el-table-column
-            align="center"
-            label="备注"
-            prop="remark"
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
+          <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
         </el-table>
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeDirectDialog">取 消</el-button>
-        <el-button type="primary" @click="submitDirectForm" :loading="formLoading">确 定</el-button>
+        <el-button type="primary" :loading="formLoading" @click="submitDirectForm">确 定</el-button>
       </span>
     </el-dialog>
 
-    <CheckOrder :checkOrderId="checkOrderId" v-if="isShowCheckOrder" @backDetail="backDetail" />
+    <CheckOrder v-if="isShowCheckOrder" :check-order-id="checkOrderId" @backDetail="backDetail" />
   </div>
 </template>
 
@@ -801,7 +645,6 @@ export default {
   components: {
     CheckOrder
   },
-  props: ['listItem'],
   filters: {
     statusFilter(val) {
       const statusList = [
@@ -811,10 +654,11 @@ export default {
         // { label: '审核驳回', value: 'FAIL' },,
         { label: '已关闭', value: 'CLOSE' }
       ]
-      let obj = statusList.find(o => o.value == val)
+      const obj = statusList.find(o => o.value == val)
       return obj ? obj.label : ''
     }
   },
+  props: ['listItem'],
   data() {
     return {
       detailData: {},
@@ -957,7 +801,7 @@ export default {
     // 更改仓库
     changeWarehouse() {
       this.deliverForm.position = ''
-      let obj = this.warehouseList.find(o => o.id == this.deliverForm.warehouse)
+      const obj = this.warehouseList.find(o => o.id == this.deliverForm.warehouse)
       this.positionList = obj.kingDeeStocks
     },
 
@@ -992,7 +836,7 @@ export default {
               return
             }
           }
-          let params = {
+          const params = {
             enginOrderId: this.detailData.enginOrderId,
             enginOrderType: 'HOME', // TRADE=商用 HOME=家用
             deliverDate: '',
@@ -1018,7 +862,7 @@ export default {
     // 更改调出仓库
     changeWarehouse1() {
       this.directForm.position1 = ''
-      let obj = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
+      const obj = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
       this.positionList1 = obj.kingDeeStocks
       this.directGoodsList.forEach(item => {
         item.warehouse1 = obj.name
@@ -1028,7 +872,7 @@ export default {
     // 更改调入仓库
     changeWarehouse2() {
       this.directForm.position2 = ''
-      let obj = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
+      const obj = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
       this.positionList2 = obj.kingDeeStocks
       this.directGoodsList.forEach(item => {
         item.warehouse2 = obj.name
@@ -1037,7 +881,7 @@ export default {
 
     // 更改调出仓位
     changePosition1() {
-      let obj = this.positionList1.find(o => o.id == this.directForm.position1)
+      const obj = this.positionList1.find(o => o.id == this.directForm.position1)
       this.directGoodsList.forEach(item => {
         item.position1 = obj.name
         item.status1 = obj.defStockStatusName
@@ -1046,7 +890,7 @@ export default {
 
     // 更改调入仓位
     changePosition2() {
-      let obj = this.positionList2.find(o => o.id == this.directForm.position2)
+      const obj = this.positionList2.find(o => o.id == this.directForm.position2)
       this.directGoodsList.forEach(item => {
         item.position2 = obj.name
         item.status2 = obj.defStockStatusName
@@ -1069,11 +913,11 @@ export default {
     submitDirectForm() {
       this.$refs.directForm.validate(valid => {
         if (valid) {
-          let warehouseItem1 = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
-          let positionItem1 = this.positionList1.find(o => o.id == this.directForm.position1)
-          let warehouseItem2 = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
-          let positionItem2 = this.positionList2.find(o => o.id == this.directForm.position2)
-          let params = {
+          const warehouseItem1 = this.warehouseList1.find(o => o.id == this.directForm.warehouse1)
+          const positionItem1 = this.positionList1.find(o => o.id == this.directForm.position1)
+          const warehouseItem2 = this.warehouseList2.find(o => o.id == this.directForm.warehouse2)
+          const positionItem2 = this.positionList2.find(o => o.id == this.directForm.position2)
+          const params = {
             orderNo: this.detailData.enginOrderId,
             orderType: 'HOME', // TRADE=商用 HOME=家用 RETAIL=零售单 RETAIL_POLICY 销售政策单
             correspondId: this.directForm.warehouse1,

+ 33 - 4
src/views/supply/engin/components/home_examine.vue

@@ -3,7 +3,9 @@
     <el-page-header content="审批" @back="goBack" />
 
     <div class="main-title">
-      <div class="title">工程订单 <span style="margin-left: 20px">经销商名称:{{detailData.customerName}}</span></div>
+      <div class="title">
+        工程订单 <span style="margin-left: 20px">经销商名称:{{ detailData.customerName }}</span>
+      </div>
     </div>
 
     <div class="diy-table-1">
@@ -77,7 +79,7 @@
               :disabled="detailData.examineStatus == 'OK' && isDealer"
               clearable
             >
-              <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id" >
+              <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id">
                 <span>{{ item.saleName }}</span> <span style="color: #f00">{{ item.saleCode }}</span>
               </el-option>
             </el-select>
@@ -173,6 +175,14 @@
             <el-input v-model="detailData.note2" placeholder="请输入格力内部备注"></el-input>
           </div>
         </el-col> -->
+        <el-col :span="8" class="item">
+          <div class="label">登录有效期</div>
+          <div class="value">{{ detailData.refBillsExpireDate }}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">项目编号</div>
+          <div class="value">{{ detailData.refProjectNo }}</div>
+        </el-col>
         <el-col :span="16" class="item">
           <div class="label">项目说明</div>
           <div class="value">
@@ -186,6 +196,18 @@
           </div>
         </el-col>
         <el-col :span="24" class="item">
+          <div class="label">工程机转零售批复意见</div>
+          <div class="value">{{ detailData.refToRetailIdea }}</div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">合同变更批复意见</div>
+          <div class="value">{{ detailData.refContractIdea }}</div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">资料延期批复意见</div>
+          <div class="value">{{ detailData.refDataDelayIdea }}</div>
+        </el-col>
+        <el-col :span="24" class="item">
           <div class="label">其他附件审批意见</div>
           <div class="value">{{ detailData.refOtherAnnexIdea }}</div>
         </el-col>
@@ -348,6 +370,15 @@
             }}
           </template>
         </el-table-column>
+        <el-table-column
+              align="right"
+              label="退订数量"
+              prop="tdQty"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column align="right" label="销售数量" prop="salesQty" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="销售金额" prop="salesAmount" min-width="100" show-overflow-tooltip />
         <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.isDirectTransfer ? '是' : '否' }}
@@ -625,7 +656,6 @@ export default {
               if (!res.data) {
                 this.$successMsg()
                 this.goBack()
-                
               } else {
                 this.$confirm('审批成功!是否跳转下一张待审批订单?', '提示', {
                   confirmButtonText: '跳转',
@@ -640,7 +670,6 @@ export default {
                   })
                   .catch(() => {
                     this.goBack()
-                    
                   })
               }
             })

+ 22 - 4
src/views/supply/engin/components/home_form.vue

@@ -170,6 +170,12 @@
             </el-select>
           </el-form-item>
         </el-col>
+
+        <el-col :xs="24" :sm="24" :lg="24">
+          <el-form-item label="项目编号" prop="refProjectNo">
+            <el-input v-model="mainForm.refProjectNo" placeholder="请输入项目编号" :disabled="isDealer" />
+          </el-form-item>
+        </el-col>
         <el-col :xs="24" :sm="24" :lg="24">
           <el-form-item label="项目说明" prop="projectRemark">
             <el-input v-model="mainForm.projectRemark" placeholder="请输入项目说明" :disabled="isDealer" />
@@ -370,6 +376,15 @@
             }}
           </template>
         </el-table-column>
+        <!-- <el-table-column
+              align="center"
+              label="退订数量"
+              prop="tdQty"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column align="center" label="销售数量" prop="salesQty" min-width="100" show-overflow-tooltip />
+            <el-table-column align="center" label="销售金额" prop="salesAmount" min-width="100" show-overflow-tooltip /> -->
         <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100">
           <template slot-scope="scope">
             <el-checkbox v-model="scope.row.isDirectTransfer" />
@@ -807,6 +822,7 @@ export default {
         refBuyUnitName: '',
         refPromiseProvide: '',
         refOtherAnnexIdea: '',
+        refProjectNo: '',
         isPlanOrder: this.listItem ? '' : true
       },
       mainFormRules: {
@@ -1228,6 +1244,7 @@ export default {
         this.mainForm.examineStatus = data.examineStatus
         this.mainForm.refBuyUnitName = data.refBuyUnitName
         this.mainForm.refPromiseProvide = data.refPromiseProvide
+        this.mainForm.refProjectNo = data.refProjectNo
         this.correspondName = data.correspondName
         this.warehouseValue = data.correspondId
         this.mainForm.isPlanOrder = data.isPlanOrder
@@ -1564,6 +1581,7 @@ export default {
             refBuyUnitName: this.mainForm.refBuyUnitName,
             refPromiseProvide: this.mainForm.refPromiseProvide,
             refOtherAnnexIdea: this.mainForm.refOtherAnnexIdea,
+            refProjectNo: this.mainForm.refProjectNo,
             items: goodsList
           }
           if (this.mainForm.examineStatus === 'WAIT') {
@@ -1577,7 +1595,6 @@ export default {
                 .then(res => {
                   this.$successMsg('编辑成功')
                   this.goBack()
-                  
                 })
                 .finally(res => {
                   this.formLoading = false
@@ -1587,7 +1604,6 @@ export default {
                 .then(res => {
                   this.$successMsg('新增成功')
                   this.goBack()
-                  
                 })
                 .finally(res => {
                   this.formLoading = false
@@ -1598,7 +1614,6 @@ export default {
               .then(res => {
                 this.$successMsg('提交审核成功')
                 this.goBack()
-                
               })
               .finally(res => {
                 this.formLoading = false
@@ -1631,7 +1646,7 @@ export default {
       this.mainForm.refBuyUnitName = data.buyUnitName
       this.mainForm.refPromiseProvide = data.promiseProvide === 1 ? '已保证' : '未保证'
       this.mainForm.refOtherAnnexIdea = data.otherAnnexIdea
-
+      this.mainForm.refProjectNo = data.refProjectNo
       const saleTypeItem = this.salesTypeList.find(o => o.id === this.mainForm.saleType)
 
       this.goodsList = data.items.map(item => {
@@ -1659,6 +1674,9 @@ export default {
           isDirectTransfer: false,
           directTransferQty: '',
           hasSendQty: '',
+          tdQty:0,
+          salesQty:0,
+          salesAmount:0,
           remark: item.discri,
           tax: '',
           status1: '',

+ 56 - 27
src/views/supply/engin/components/home_return.vue

@@ -1,9 +1,11 @@
 <template>
   <div class="detail-container">
-    <el-page-header @back="goBack" content="退订"></el-page-header>
+    <el-page-header content="退订" @back="goBack" />
 
     <div class="main-title">
-      <div class="title">工程订单 <span style="margin-left: 20px">经销商名称:{{detailData.customerName}}</span></div>
+      <div class="title">
+        工程订单 <span style="margin-left: 20px">经销商名称:{{ detailData.customerName }}</span>
+      </div>
     </div>
 
     <div class="diy-table-1">
@@ -106,7 +108,14 @@
           <div class="label">格力内部备注</div>
           <div class="value">{{detailData.note2}}</div>
         </el-col> -->
-
+        <el-col :span="8" class="item">
+          <div class="label">登录有效期</div>
+          <div class="value">{{ detailData.refBillsExpireDate }}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">项目编号</div>
+          <div class="value">{{ detailData.refProjectNo }}</div>
+        </el-col>
         <el-col :span="16" class="item">
           <div class="label">项目说明</div>
           <div class="value">{{ detailData.refProjectNote }}</div>
@@ -116,6 +125,18 @@
           <div class="value">{{ detailData.refProjectType }}</div>
         </el-col>
         <el-col :span="24" class="item">
+          <div class="label">工程机转零售批复意见</div>
+          <div class="value">{{ detailData.refToRetailIdea }}</div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">合同变更批复意见</div>
+          <div class="value">{{ detailData.refContractIdea }}</div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">资料延期批复意见</div>
+          <div class="value">{{ detailData.refDataDelayIdea }}</div>
+        </el-col>
+        <el-col :span="24" class="item">
           <div class="label">其他附件审批意见</div>
           <div class="value">{{ detailData.refOtherAnnexIdea }}</div>
         </el-col>
@@ -162,49 +183,49 @@
         show-summary
         :summary-method="$getSummaries"
       >
-        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="序号" type="index" width="50" />
         <el-table-column
           align="left"
           label="引用记录"
           prop="useRefCount"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="left"
           label="销售类型"
           prop="saleTypeName"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="left"
           label="物料编码"
           prop="materialNumber"
           min-width="120"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="left"
           label="产品编码"
           prop="materialOldNumber"
           min-width="120"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="left"
           label="产品名称"
           prop="materialName"
           min-width="160"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="left"
           label="规格型号"
           prop="specification"
           min-width="350"
           show-overflow-tooltip
-        ></el-table-column>
+        />
 
         <el-table-column
           align="left"
@@ -219,7 +240,7 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
         <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
@@ -231,8 +252,8 @@
           prop="enginNum"
           min-width="120"
           show-overflow-tooltip
-        ></el-table-column>
-        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        />
+        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip />
         <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.totalAmount | numToFixed }}
@@ -244,7 +265,7 @@
           prop="customerWalletName2"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column align="right" label="使用返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.rebateAmount | numToFixed }}
@@ -261,12 +282,21 @@
           prop="customerWalletName"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.payAmount | numToFixed }}
           </template>
         </el-table-column>
+        <el-table-column
+              align="right"
+              label="退订数量"
+              prop="tdQty"
+              min-width="100"
+              show-overflow-tooltip
+            />
+            <el-table-column align="right" label="销售数量" prop="salesQty" min-width="100" show-overflow-tooltip />
+            <el-table-column align="right" label="销售金额" prop="salesAmount" min-width="100" show-overflow-tooltip />
         <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.isDirectTransfer ? '是' : '否' }}
@@ -278,23 +308,23 @@
           prop="directTransferQty"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="right"
           label="可退数量"
           prop="refundableQty"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column align="right" label="退订数量" prop="tdQty" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input
               v-model="scope.row.tdQty"
               size="mini"
-              @blur="hasTdQty(scope.row)"
               type="number"
+              @blur="hasTdQty(scope.row)"
               @mousewheel.native.prevent
-            ></el-input>
+            />
           </template>
         </el-table-column>
         <el-table-column
@@ -303,7 +333,7 @@
           prop="remark"
           min-width="160"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="left"
           label="实装物料编号"
@@ -330,7 +360,7 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip />
       </el-table>
     </div>
 
@@ -350,7 +380,7 @@
         <el-col :span="24" class="item">
           <div class="label">退订说明</div>
           <div class="value">
-            <el-input v-model="returnForm.remark" placeholder="请输入退订说明"></el-input>
+            <el-input v-model="returnForm.remark" placeholder="请输入退订说明" />
           </div>
         </el-col>
       </el-row>
@@ -359,7 +389,7 @@
     <div class="page-footer">
       <div class="footer">
         <el-button type="primary" @click="clickSubmitForm()">确定退订</el-button>
-        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px" v-if="!isDealer">
+        <el-popconfirm v-if="!isDealer" title="确定关闭吗?" style="margin-left: 10px" @onConfirm="goBack">
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
       </div>
@@ -373,7 +403,6 @@ import { getOrderDetail, returnHome } from '@/api/supply/engin'
 export default {
   name: 'HomeReturn',
   componentName: 'HomeReturn',
-  props: ['listItem'],
   filters: {
     statusFilter(val) {
       const statusList = [
@@ -383,10 +412,11 @@ export default {
         // { label: '审核驳回', value: 'FAIL' },,
         { label: '已关闭', value: 'CLOSE' }
       ]
-      let obj = statusList.find(o => o.value == val)
+      const obj = statusList.find(o => o.value == val)
       return obj ? obj.label : ''
     }
   },
+  props: ['listItem'],
   data() {
     return {
       userName: JSON.parse(localStorage.getItem('supply_user')).nickName,
@@ -455,7 +485,7 @@ export default {
         type: 'warning'
       })
         .then(() => {
-          let params = {
+          const params = {
             enginOrderId: this.detailData.enginOrderId,
             items: this.detailData.items,
             refundNote: this.returnForm.remark,
@@ -464,7 +494,6 @@ export default {
           returnHome(params).then(res => {
             this.$successMsg()
             this.goBack()
-            
           })
         })
         .catch(() => {})

+ 12 - 12
src/views/supply/engin/home_list.vue

@@ -1,15 +1,15 @@
 <template>
   <template-page
     ref="pageRef"
-    :getList="getList"
+    :get-list="getList"
     :operation="operation()"
-    :optionsEvensGroup="optionsEvensGroup"
-    :exportList="exportList"
-    :columnParsing="columnParsing"
-    :tableAttributes="tableAttributes"
-    :tableEvents="tableEvents"
-    :fieldBeansHook="fieldBeansHook"
-    :operationColumnWidth="200"
+    :options-evens-group="optionsEvensGroup"
+    :export-list="exportList"
+    :column-parsing="columnParsing"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :field-beans-hook="fieldBeansHook"
+    :operation-column-width="200"
   >
     <div slot="moreSearch">
       <ul class="ulStyle">
@@ -28,8 +28,8 @@
             v-for="(item, index) in workerState"
             :key="index"
             :type="orderStatusParam == item.value ? 'primary' : null"
-            @click="handleOrderStatusParam(item.value, index)"
             size="mini"
+            @click="handleOrderStatusParam(item.value, index)"
             >{{ item.label }}</el-button
           >
         </div>
@@ -72,7 +72,6 @@ import { getNoRebateWalletList } from '@/api/policy_list'
 
 let that
 export default {
-  mixins: [add_callback_mixin],
   components: {
     HomeDetail,
     HomeForm,
@@ -95,6 +94,7 @@ export default {
       return MAP[val]
     }
   },
+  mixins: [add_callback_mixin],
   data() {
     return {
       orderStatusParam: '',
@@ -311,7 +311,7 @@ export default {
     async getList(...p) {
       this.$refs.pageRef.showTable = false
       try {
-        let res = await v2EnginOrderHomeCountList(...p)
+        const res = await v2EnginOrderHomeCountList(...p)
         this.numSum.totalC = res.data.totalC
         this.numSum.amountC = res.data.amountC
       } catch (error) {
@@ -357,7 +357,7 @@ export default {
         }
       })
       if (this.isCustomer !== '') {
-        let res = val.filter(
+        const res = val.filter(
           v => v.jname !== 'refPowerCategory' && v.jname !== 'geLiInerNote' && v.jname !== 'geLiNote'
         )
         return res