Bladeren bron

Merge branch 'dev_v2' of ssh://gogs.zfire.top:2222/zfire-front/supply-front into dev_v2

aXin-0810 2 jaren geleden
bovenliggende
commit
7f41070dc1

+ 8 - 0
src/api/stock.js

@@ -135,6 +135,14 @@ export function getNoticeList(params) {
     params
   })
 }
+// 库存到货访问通知-列表
+export function getArrivalNotice(params) {
+  return request({
+    url: '/stock/visit/list',
+    method: 'get',
+    params
+  })
+}
 
 // 库存到货访问通知-数量
 export function getNoticeNum(params) {

+ 20 - 1
src/api/supply/deliver.js

@@ -1,4 +1,4 @@
-import request from '@/utils/request'
+import request, { postBlob, handleImport, getBlob } from '@/utils/request'
 
 // 获取列表 - 零售发货单
 export function getDeliverList(params) {
@@ -36,6 +36,25 @@ export function getPasswordRecord(params) {
   })
 }
 
+// 工程申请发货单-列表V2
+export function invoiceListProjectV2(data) {
+  return request({
+    url: `/invoice/listProjectV2?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+//工程申请发货单-列表V2导出
+export function invoiceListProjectV2Export(data, name) {
+  return postBlob({
+    url: '/invoice/listProjectV2/export',
+    method: 'post',
+    data,
+    name
+  })
+}
+
 // 获取列表 - 工程发货单
 export function getEnginList(params) {
   return request({

+ 38 - 0
src/api/supply/engin.js

@@ -172,6 +172,44 @@ export function overEngin(params) {
   })
 }
 
+// 家用工程订单-列表
+export function v2EnginOrderHomeList(data) {
+  return request({
+    url: `/v2/engin-order/home/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+//家用工程订单-导出
+export function v2EnginOrderHomeListExport(data, name) {
+  return postBlob({
+    url: '/v2/engin-order/home/list/export',
+    method: 'post',
+    data,
+    name
+  })
+}
+
+// 商用工程订单-列表
+export function v2EnginOrderTradeList(data) {
+  return request({
+    url: `/v2/engin-order/trade/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+//商用工程订单-导出
+export function v2EnginOrderTradeListExport(data, name) {
+  return postBlob({
+    url: '/v2/engin-order/trade/list/export',
+    method: 'post',
+    data,
+    name
+  })
+}
+
 // 工程订单 - 获取列表
 export function getOrderList(params) {
   return request({

+ 1 - 3
src/store/modules/user.js

@@ -65,13 +65,11 @@ const mutations = {
   showMessage: (state, value) => {
     if (value == 'yes') {
       state.showMessages = true
-    } else {
+    }else{
       state.showMessages = false
-      state.isNotice = true
     }
   },
   SET_MESSAGE(state, value) {
-    state.showMessages = value
     state.isNotice = value
   }
 }

+ 350 - 254
src/views/dashboard.vue

@@ -1,280 +1,350 @@
 <template>
   <popu>
-    <div class="app-container">
-    <div class="menu-list">
-      <div>
-        <div class="main-title">
-          <div class="title">常用菜单</div>
-          <div class="el-icon-setting" @click="dialogVisible = !dialogVisible" />
-        </div>
-        <div class="child">
-          <el-row :gutter="20">
-            <el-col
-              v-for="(it, idx) in normsMenuList"
-              :key="idx"
-              class="item"
-              :span="4"
-              style="margin-top: 16px; padding: 3px 20px"
-            >
-              <el-link class="link" :underline="false" @click="clickMenu(it.curUrl)">{{ it.moduleName }}</el-link>
-            </el-col>
-          </el-row>
-        </div>
-      </div>
-      <div v-for="(item, index) in menuList" :key="index" class="group">
-        <div v-if="item.moduleName != '首页'">
+    <div >
+      <div class="menu-list">
+        <div>
           <div class="main-title">
-            <div class="title">{{ item.moduleName }}</div>
+            <div class="title">常用菜单</div>
+            <div class="el-icon-setting" @click="dialogVisible = !dialogVisible" />
           </div>
-          <div v-if="item.children && item.children.length" class="child">
+          <div class="child">
             <el-row :gutter="20">
-              <el-col v-for="(it, idx) in item.children" :key="idx" class="item" :span="4">
+              <el-col
+                v-for="(it, idx) in normsMenuList"
+                :key="idx"
+                class="item"
+                :span="4"
+                style="margin-top: 16px; padding: 3px 20px"
+              >
                 <el-link class="link" :underline="false" @click="clickMenu(it.curUrl)">{{ it.moduleName }}</el-link>
               </el-col>
             </el-row>
           </div>
-          <div v-else class="child">
-            <div class="item">
-              <el-link class="link" :underline="false" @click="clickMenu(item.curUrl)">{{ item.moduleName }}</el-link>
-            </div>
-          </div>
         </div>
-      </div>
-    </div>
-    <!-- 弹窗 -->
-    <el-dialog title="菜单配置" :visible.sync="dialogVisible" width="70%">
-      <el-checkbox-group v-model="checkList" :max="10">
         <div v-for="(item, index) in menuList" :key="index" class="group">
           <div v-if="item.moduleName != '首页'">
-            <div v-if="item.children && item.children.length" class="dia-child">
-              <el-checkbox v-for="(it, idx) in item.children" :key="idx" :label="it.moduleId" class="dia-item">{{
-                it.moduleName
-              }}</el-checkbox>
+            <div class="main-title">
+              <div class="title">{{ item.moduleName }}</div>
+            </div>
+            <div v-if="item.children && item.children.length" class="child">
+              <el-row :gutter="20">
+                <el-col v-for="(it, idx) in item.children" :key="idx" class="item" :span="4">
+                  <el-link class="link" :underline="false" @click="clickMenu(it.curUrl)">{{ it.moduleName }}</el-link>
+                </el-col>
+              </el-row>
             </div>
             <div v-else class="child">
-              <el-checkbox class="dia-item" :label="item.moduleId">{{ item.moduleName }}</el-checkbox>
+              <div class="item">
+                <el-link class="link" :underline="false" @click="clickMenu(item.curUrl)">{{ item.moduleName }}</el-link>
+              </div>
             </div>
           </div>
         </div>
-      </el-checkbox-group>
-      <div class="dia-tip">( {{ checkList.length }} / 10 )注:最多选10个导航菜单</div>
-      <span slot="footer" class="dialog-footer">
-        <el-button
-          @click="
-            dialogVisible = false
-            checkList = []
-          "
-          >取 消</el-button
-        >
-        <el-button type="primary" @click="handleSaveMenu">确 定</el-button>
-      </span>
-    </el-dialog>
-
-    <el-dialog title="消息" :visible.sync="showMessages" width="50%" :show-close="false" :close-on-click-modal="false">
-      <el-radio-group v-model="type" size="mini" @change="checkFn">
-        <el-radio-button label="1">系统通知</el-radio-button>
-        <el-radio-button label="2">文件下发</el-radio-button>
-        <el-radio-button label="3">返利确认单</el-radio-button>
-        <el-radio-button label="4">物流通知</el-radio-button>
-      </el-radio-group>
-      <br />
-      <br />
-      <!-- 系统通知 -->
-      <div v-show="type == '1'" class="table">
-        <el-table
-          ref="table"
-          v-loading="listLoading"
-          class="cql"
-          :data="dataList"
-          element-loading-text="Loading"
-          border
-          fit
-          highlight-current-row
-          stripe
-        >
-          <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="标题" prop="title" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="来源" prop="source" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="时间" prop="issueTime" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <el-button type="text" class="textColor" @click="lookInDialog(scope.row.id)">查看</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <!-- 文件下发 -->
-      <div v-show="type == '2'" class="table">
-        <el-table
-          ref="table"
-          v-loading="listLoading"
-          :data="fileList"
-          element-loading-text="Loading"
-          border
-          fit
-          highlight-current-row
-          stripe
-        >
-          <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="标题" prop="title" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="来源" prop="operatorNickName" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="时间" prop="createTime" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <el-button type="text" class="textColor" @click="downloadFn(scope.row.id)">下载</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <!-- 返利确认单 -->
-      <div v-show="type == '3'" class="table">
-        <el-table
-          ref="table"
-          v-loading="listLoading"
-          :data="rebateList"
-          element-loading-text="Loading"
-          border
-          fit
-          highlight-current-row
-          stripe
-        >
-          <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
-          <el-table-column
-            align="center"
-            label="经销商名称"
-            prop="customerName"
-            min-width="160"
-            show-overflow-tooltip
-          />
-          <el-table-column align="center" label="确认人" prop="examineBy" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="确认时间" prop="examineTime" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <el-button type="text" class="textColor" @click="secondFn(scope.row.rebateOrderId)">{{
-                isCustomer ? '确认' : '复核'
-              }}</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </div>
-      <!-- 物流通知 -->
-      <div v-show="type == '4'" class="table">
-        <el-table
-          ref="table"
-          v-loading="listLoading"
-          :data="invoiceOrderList"
-          element-loading-text="Loading"
-          border
-          fit
-          highlight-current-row
-          stripe
-        >
-          <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="发货单" prop="id" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <el-link v-if="!isCustomer" type="primary" :underline="false" @click="handleJump(scope.row.id)">{{
-                scope.row.id
-              }}</el-link>
-              <template v-else>{{ scope.row.id }}</template>
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="内容" prop="orderTrackStatus" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="时间" prop="orderTrackTime" min-width="160" show-overflow-tooltip />
-          <el-table-column align="center" label="收货地址" prop="address" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">
-              {{ scope.row.address ? scope.row.address : '——' }}
-            </template>
-          </el-table-column>
-          <el-table-column align="center" label="收货客户" prop="receivingName" min-width="160" show-overflow-tooltip>
-            <template slot-scope="scope">{{ scope.row.receivingName ? scope.row.receivingName : '——' }}</template>
-          </el-table-column>
-          <el-table-column align="center" label="" min-width="80" show-overflow-tooltip fixed="right">
-            <template slot-scope="scope">
-              <el-button type="text" class="textColor" @click="handLogistics(scope.row)">查看</el-button>
-            </template>
-          </el-table-column>
-        </el-table>
       </div>
-      <br />
-      <br />
-      <!-- 分页 -->
-      <div class="fr">
-        <el-pagination
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        />
-      </div>
-      <br /><br />
-      <!-- 内层弹窗 -->
-      <el-dialog width="40%" title="消息标题" :visible.sync="inDialog" append-to-body>
-        <div class="detail-container">
-          <div class="title">{{ detailData.title }}</div>
-          <div class="text">
-            发布人:{{ detailData.issueNickName }}<el-divider direction="vertical" />发布时间:{{
-              detailData.issueTime
-            }}
+      <!-- 弹窗 -->
+      <el-dialog title="菜单配置" :visible.sync="dialogVisible" width="70%">
+        <el-checkbox-group v-model="checkList" :max="10">
+          <div v-for="(item, index) in menuList" :key="index" class="group">
+            <div v-if="item.moduleName != '首页'">
+              <div v-if="item.children && item.children.length" class="dia-child">
+                <el-checkbox v-for="(it, idx) in item.children" :key="idx" :label="it.moduleId" class="dia-item">{{
+                  it.moduleName
+                }}</el-checkbox>
+              </div>
+              <div v-else class="child">
+                <el-checkbox class="dia-item" :label="item.moduleId">{{ item.moduleName }}</el-checkbox>
+              </div>
+            </div>
           </div>
-          <el-divider />
-          <div class="content">{{ detailData.content }}</div>
-          <el-divider v-if="detailData.files && detailData.files.length > 0" />
-          <div v-if="detailData.files && detailData.files.length > 0" class="file">
-            <div>附件:</div>
-            <div class="file-list">
-              <div v-for="(item, index) in detailData.files" :key="index" class="item">
-                <el-image
-                  v-if="checkFileType(item.url) == 'image'"
-                  class="img"
-                  :src="imageURL + item.url"
-                  :preview-src-list="[imageURL + item.url]"
-                />
-                <div v-else class="box2" @click="openLink(item.url)">
-                  <img v-if="checkFileType(item.url) == 'word'" src="@/assets/common/word.png" />
-                  <img v-if="checkFileType(item.url) == 'excel'" src="@/assets/common/excel.png" />
-                  <img v-if="checkFileType(item.url) == 'ppt'" src="@/assets/common/ppt.png" />
-                  <img v-if="checkFileType(item.url) == 'pdf'" src="@/assets/common/pdf.png" />
-                  <div class="name ellipsis-3">{{ item.name }}</div>
+        </el-checkbox-group>
+        <div class="dia-tip">( {{ checkList.length }} / 10 )注:最多选10个导航菜单</div>
+        <span slot="footer" class="dialog-footer">
+          <el-button
+            @click="
+              dialogVisible = false
+              checkList = []
+            "
+            >取 消</el-button
+          >
+          <el-button type="primary" @click="handleSaveMenu">确 定</el-button>
+        </span>
+      </el-dialog>
+
+      <el-dialog
+        title="消息"
+        :visible.sync="showMessages"
+        :append-to-body="true"
+        width="50%"
+        :show-close="false"
+        :close-on-click-modal="false"
+      >
+        <el-radio-group v-model="type" size="mini" @change="checkFn">
+          <el-radio-button label="1">系统通知</el-radio-button>
+          <el-radio-button label="2">文件下发</el-radio-button>
+          <el-radio-button label="3">返利确认单</el-radio-button>
+          <el-radio-button label="4">物流通知</el-radio-button>
+          <el-radio-button label="5">到货通知</el-radio-button>
+        </el-radio-group>
+        <br />
+        <br />
+        <!-- 系统通知 -->
+        <div v-show="type == '1'" class="table">
+          <el-table
+            ref="table"
+            v-loading="listLoading"
+            class="cql"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="标题" prop="title" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="来源" prop="source" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="时间" prop="issueTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="" min-width="160" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-button type="text" class="textColor" @click="lookInDialog(scope.row.id)">查看</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <!-- 文件下发 -->
+        <div v-show="type == '2'" class="table">
+          <el-table
+            ref="table"
+            v-loading="listLoading"
+            :data="fileList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="标题" prop="title" min-width="160" show-overflow-tooltip />
+            <el-table-column
+              align="center"
+              label="来源"
+              prop="operatorNickName"
+              min-width="160"
+              show-overflow-tooltip
+            />
+            <el-table-column align="center" label="时间" prop="createTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-button type="text" class="textColor" @click="downloadFn(scope.row.id)">下载</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <!-- 返利确认单 -->
+        <div v-show="type == '3'" class="table">
+          <el-table
+            ref="table"
+            v-loading="listLoading"
+            :data="rebateList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
+            <el-table-column
+              align="center"
+              label="经销商名称"
+              prop="customerName"
+              min-width="160"
+              show-overflow-tooltip
+            />
+            <el-table-column align="center" label="确认人" prop="examineBy" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="确认时间" prop="examineTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="" min-width="160" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-button type="text" class="textColor" @click="secondFn(scope.row.rebateOrderId)">{{
+                  isCustomer ? '确认' : '复核'
+                }}</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <!-- 物流通知 -->
+        <div v-show="type == '4'" class="table">
+          <el-table
+            ref="table"
+            v-loading="listLoading"
+            :data="invoiceOrderList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="发货单" prop="id" min-width="160" show-overflow-tooltip>
+              <template slot-scope="scope">
+                <el-link v-if="!isCustomer" type="primary" :underline="false" @click="handleJump(scope.row.id)">{{
+                  scope.row.id
+                }}</el-link>
+                <template v-else>{{ scope.row.id }}</template>
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="内容"
+              prop="orderTrackStatus"
+              min-width="160"
+              show-overflow-tooltip
+            />
+            <el-table-column align="center" label="时间" prop="orderTrackTime" min-width="160" show-overflow-tooltip />
+            <el-table-column align="center" label="收货地址" prop="address" min-width="160" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{ scope.row.address ? scope.row.address : '——' }}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="收货客户" prop="receivingName" min-width="160" show-overflow-tooltip>
+              <template slot-scope="scope">{{ scope.row.receivingName ? scope.row.receivingName : '——' }}</template>
+            </el-table-column>
+            <el-table-column align="center" label="" min-width="80" show-overflow-tooltip fixed="right">
+              <template slot-scope="scope">
+                <el-button type="text" class="textColor" @click="handLogistics(scope.row)">查看</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <!-- 到货通知 -->
+        <div v-show="type == '5'" class="table">
+          <el-table
+            ref="table"
+            v-loading="listLoading"
+            :data="arrivalNoticeList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              property="materialOldNumber"
+              align="left"
+              min-width="120"
+              label="产品编号"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              property="materialNumber"
+              align="left"
+              min-width="100"
+              label="物料编码"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              property="materialName"
+              align="left"
+              min-width="250"
+              label="产品名称"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              property="specification"
+              align="left"
+              min-width="350"
+              label="规格型号"
+              show-overflow-tooltip
+            />
+            <el-table-column property="stockName" align="left" min-width="100" label="到货仓库" show-overflow-tooltip />
+            <el-table-column
+              property="updateTime"
+              align="left"
+              min-width="200"
+              label="到货通知时间"
+              show-overflow-tooltip
+            />
+          </el-table>
+        </div>
+        <br />
+        <br />
+        <!-- 分页 -->
+        <div class="fr">
+          <el-pagination
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+          />
+        </div>
+        <br /><br />
+        <!-- 内层弹窗 -->
+        <el-dialog width="40%" title="消息标题" :visible.sync="inDialog" append-to-body>
+          <div class="detail-container">
+            <div class="title">{{ detailData.title }}</div>
+            <div class="text">
+              发布人:{{ detailData.issueNickName }}<el-divider direction="vertical" />发布时间:{{
+                detailData.issueTime
+              }}
+            </div>
+            <el-divider />
+            <div class="content">{{ detailData.content }}</div>
+            <el-divider v-if="detailData.files && detailData.files.length > 0" />
+            <div v-if="detailData.files && detailData.files.length > 0" class="file">
+              <div>附件:</div>
+              <div class="file-list">
+                <div v-for="(item, index) in detailData.files" :key="index" class="item">
+                  <el-image
+                    v-if="checkFileType(item.url) == 'image'"
+                    class="img"
+                    :src="imageURL + item.url"
+                    :preview-src-list="[imageURL + item.url]"
+                  />
+                  <div v-else class="box2" @click="openLink(item.url)">
+                    <img v-if="checkFileType(item.url) == 'word'" src="@/assets/common/word.png" />
+                    <img v-if="checkFileType(item.url) == 'excel'" src="@/assets/common/excel.png" />
+                    <img v-if="checkFileType(item.url) == 'ppt'" src="@/assets/common/ppt.png" />
+                    <img v-if="checkFileType(item.url) == 'pdf'" src="@/assets/common/pdf.png" />
+                    <div class="name ellipsis-3">{{ item.name }}</div>
+                  </div>
                 </div>
               </div>
             </div>
           </div>
-        </div>
+          <div slot="footer" class="dialog-footer">
+            <el-button size="mini" type="primary" @click="confirmCheck(detailData.noticeId)">确认接收</el-button>
+            <el-button size="mini" @click="inDialog = false">关 闭</el-button>
+          </div>
+        </el-dialog>
         <div slot="footer" class="dialog-footer">
-          <el-button size="mini" type="primary" @click="confirmCheck(detailData.noticeId)">确认接收</el-button>
-          <el-button size="mini" @click="inDialog = false">关 闭</el-button>
+          <el-button type="primary" size="mini" @click="closeFn">关闭</el-button>
         </div>
       </el-dialog>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" size="mini" @click="closeFn">关闭</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog title="物流信息" :visible.sync="visible" width="60%" @close="onClose" :close-on-click-modal="false">
-      <el-timeline class="logistics" :reverse="false" v-if="logisticsDetail.length">
-        <el-timeline-item
-          placement="top"
-          type="success"
-          v-for="(item, index) in logisticsDetail"
-          :key="index"
-          :timestamp="item.time"
-        >
-          <el-row :gutter="20">
-            <el-col class="logistics-title"> {{ item.status }} </el-col>
-            <el-col>
-              <div class="flex">
-                <div>{{ item.context }}</div>
-                <!-- <div>{{ item.createTime }}</div> -->
-              </div>
-            </el-col>
-          </el-row>
-        </el-timeline-item>
-      </el-timeline>
-      <div v-else class="tip">暂无物流信息</div>
-    </el-dialog>
-  </div>
+      <el-dialog title="物流信息" :visible.sync="visible" width="60%" @close="onClose" :close-on-click-modal="false">
+        <el-timeline class="logistics" :reverse="false" v-if="logisticsDetail.length">
+          <el-timeline-item
+            placement="top"
+            type="success"
+            v-for="(item, index) in logisticsDetail"
+            :key="index"
+            :timestamp="item.time"
+          >
+            <el-row :gutter="20">
+              <el-col class="logistics-title"> {{ item.status }} </el-col>
+              <el-col>
+                <div class="flex">
+                  <div>{{ item.context }}</div>
+                  <!-- <div>{{ item.createTime }}</div> -->
+                </div>
+              </el-col>
+            </el-row>
+          </el-timeline-item>
+        </el-timeline>
+        <div v-else class="tip">暂无物流信息</div>
+      </el-dialog>
+    </div>
   </popu>
 </template>
 
@@ -291,14 +361,16 @@ import {
   setMenuList,
   getListInvoiceOrder
 } from '@/api/dashboard'
+import { getArrivalNotice } from '@/api/stock'
+
 import { getListOrderTrack } from '@/api/supply/pickup'
 import { getFileUrl } from '@/api/common'
 import { mapGetters } from 'vuex'
-import popu from '@/components/template/popu.vue';
+import popu from '@/components/template/popu.vue'
 export default {
   name: 'Dashboard',
   components: {
-    popu,
+    popu
   },
   created() {
     this.getDataList({
@@ -341,7 +413,8 @@ export default {
       bol: true,
       visible: false,
       orderId: '',
-      logisticsDetail: []
+      logisticsDetail: [],
+      arrivalNoticeList:[]
     }
   },
 
@@ -465,6 +538,12 @@ export default {
           pageNum: this.currentPage
         })
       }
+      if (this.type == 5) {
+        this.getArrivalNotice({
+          pageSize: this.pageSize,
+          pageNum: this.currentPage
+        })
+      }
     },
     // 更改当前页
     handleCurrentChange(val) {
@@ -496,6 +575,12 @@ export default {
           pageNum: this.currentPage
         })
       }
+      if (this.type == 5) {
+        this.getArrivalNotice({
+          pageSize: this.pageSize,
+          pageNum: this.currentPage
+        })
+      }
     },
     // 获取返利确认单数据
     async getRebateList(data) {
@@ -516,6 +601,11 @@ export default {
       this.invoiceOrderList = res.data.records
       this.listTotal = res.data.total
     },
+    async getArrivalNotice(data) {
+      const res = await getArrivalNotice(data)
+      this.arrivalNoticeList = res.data.records
+      this.listTotal = res.data.total
+    },
     // 选择
     checkFn(v) {
       this.$refs.table.doLayout()
@@ -547,6 +637,12 @@ export default {
           pageNum: this.currentPage
         })
       }
+      if (this.type == 5) {
+        this.getArrivalNotice({
+          pageSize: this.pageSize,
+          pageNum: this.currentPage
+        })
+      }
     },
     // 关闭
     closeFn() {

+ 34 - 35
src/views/finance/change_apply.vue

@@ -63,19 +63,19 @@
             <template slot-scope="scope">
               <div v-if="scope.$index == 0">
                 <div v-if="isCustomer">{{ searchForm.customerNumber }}</div>
-              <div v-else>
-                <el-select
-                  size="mini"
-                  class="dateStyle"
-                  @change="changeCustomerNumber($event,0)"
-                  filterable
-                  v-model.trim="scope.row.customerNumber"
-                  placeholder="请选择"
-                >
-                  <el-option v-for="item in customerData" :key="item.id" :label="item.number" :value="item.number"> </el-option>
-                </el-select>
-
-              </div>
+                <div v-else>
+                  <el-select
+                    size="mini"
+                    class="dateStyle"
+                    @change="changeCustomerNumber($event, 0)"
+                    filterable
+                    v-model.trim="scope.row.customerNumber"
+                    placeholder="请选择"
+                  >
+                    <el-option v-for="item in customerData" :key="item.id" :label="item.number" :value="item.number">
+                    </el-option>
+                  </el-select>
+                </div>
               </div>
               <div v-if="scope.$index == 1">
                 <div v-if="isCustomer">{{ scope.row.customerNumber }}</div>
@@ -83,17 +83,16 @@
                   <el-select
                     size="mini"
                     class="dateStyle"
-                    @change="changeCustomerNumber($event,1)"
-
+                    @change="changeCustomerNumber($event, 1)"
                     filterable
                     v-model.trim="scope.row.customerNumber"
                     placeholder="请选择"
                   >
-                    <el-option v-for="item in customerData" :key="item.id" :label="item.number" :value="item.number"> </el-option>
+                    <el-option v-for="item in customerData" :key="item.id" :label="item.number" :value="item.number">
+                    </el-option>
                   </el-select>
-
-                </div>
                 </div>
+              </div>
             </template>
           </el-table-column>
           <el-table-column align="left" label="经销商名称" prop="customerName" min-width="260" show-overflow-tooltip>
@@ -258,22 +257,20 @@ export default {
     //   }
     //   return null;
     // },
-    changeCustomerNumber(e,index){
+    changeCustomerNumber(e, index) {
       if (!index) {
-      const customerData  = this.customerData.find(k=>{
-       return  k.number === e
-      })
-      this.searchForm.customerName  = customerData.name
-      this.$set(this.dataList[index],'customerId',customerData.id)
-
-      }else{
-        const id = this.customerData.find(k=>{
-       return  k.number === e
-      }).id
-      this.$set(this.dataList[index],'customerId',id)
-
+        const customerData = this.customerData.find(k => {
+          return k.number === e
+        })
+        this.searchForm.customerName = customerData.name
+        this.$set(this.dataList[index], 'customerId', customerData.id)
+      } else {
+        const id = this.customerData.find(k => {
+          return k.number === e
+        }).id
+        this.$set(this.dataList[index], 'customerId', id)
       }
-      this.$set(this.dataList[index],'customerNumber',e)
+      this.$set(this.dataList[index], 'customerNumber', e)
     },
     resetFn() {
       this.searchForm.theTime = null
@@ -294,8 +291,8 @@ export default {
 
     // //返利类型数据
     async changeCustomerFn(v, index) {
-      console.log(v);
-      if (v.customerId == '' ) {
+      console.log(v)
+      if (v.customerId == '') {
         return
       }
 
@@ -403,7 +400,9 @@ export default {
 
       await getTransferAdd(params)
       this.resetFn()
-      this.$router.push('/finance/rebate/change_list')
+      this.$router.push('/finance/change_list')
+      // this.$router.push('/rebate/change_list')
+
       this.$message.success('申请成功')
     },
     async getUserInfoFn() {

+ 10 - 10
src/views/supply/deliver/home_list.vue

@@ -50,7 +50,7 @@
                     <el-date-picker
                       v-model="screenForm.date"
                       type="datetimerange"
-:default-time="['00:00:00','23:59:59']"
+                      :default-time="['00:00:00', '23:59:59']"
                       range-separator="至"
                       value-format="yyyy-MM-dd HH:mm:ss"
                       start-placeholder="开始日期"
@@ -240,13 +240,7 @@
                 {{ scope.row.takeDeposit ? '不扣' : '扣' }}
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="第几申报"
-              prop="refDeclareNo"
-              min-width="100"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="第几申报" prop="refDeclareNo" min-width="100" show-overflow-tooltip />
             <el-table-column align="left" label="备注信息" prop="headerRemark" min-width="200" show-overflow-tooltip />
             <el-table-column
               align="left"
@@ -379,7 +373,13 @@
 </template>
 
 <script>
-import { getEnginList, getPassword, getPasswordRecord } from '@/api/supply/deliver'
+import {
+  getEnginList,
+  getPassword,
+  getPasswordRecord,
+  invoiceListProjectV2,
+  invoiceListProjectV2Export
+} from '@/api/supply/deliver'
 import { getCategoryList, getSalesmanList } from '@/api/common'
 import HomeDetail from '@/views/supply/deliver/components/home_detail'
 
@@ -520,7 +520,7 @@ export default {
 
     // 重置筛选表单
     resetScreenForm() {
-        this.$refs.screenForm.resetFields()
+      this.$refs.screenForm.resetFields()
       this.currentPage = 1
       this.getList()
     },

+ 251 - 550
src/views/supply/engin/commerce_list.vue

@@ -1,516 +1,39 @@
 <template>
-  <div class="app-container">
-    <div v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn">
-      <!-- 筛选条件 -->
-      <div class="screen-container">
-        <Collapse :screen-form="screenForm">
-          <template #right_btn>
-            <el-button size="mini" @click="resetScreenForm">清空</el-button>
-            <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
-          </template>
-          <template #left_btn>
-            <el-radio-group size="mini" v-model="screenForm.status" @change="getList()">
-              <el-radio-button label="">全部</el-radio-button>
-              <el-radio-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{
-                item.label
-              }}</el-radio-button>
-            </el-radio-group>
-          </template>
-          <template #search>
-            <el-form ref="screenForm" :model="screenForm" label-width="100px" size="mini" label-position="left">
-              <el-row :gutter="20">
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="工程订单号" prop="orderNum">
-                    <el-input v-model="screenForm.orderNum" placeholder="请输入工程订单号"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="工程编号" prop="enginNum">
-                    <el-input v-model="screenForm.enginNum" placeholder="请输入工程编号"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="工程登录编号" prop="loginNum">
-                    <el-input v-model="screenForm.loginNum" placeholder="请输入工程登录编号"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="项目名称" prop="enginName">
-                    <el-input v-model="screenForm.enginName" placeholder="请输入项目名称"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="单据日期" prop="date">
-                    <el-date-picker
-                      v-model="screenForm.date"
-                      type="datetimerange"
-:default-time="['00:00:00','23:59:59']"
-                      range-separator="至"
-                      style="width: 100%"
-                      value-format="yyyy-MM-dd HH:mm:ss"
-                      start-placeholder="开始日期"
-                      end-placeholder="结束日期"
-                    >
-                    </el-date-picker>
-                  </el-form-item>
-                </el-col>
-
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="经销商" prop="dealer">
-                    <el-input v-model="screenForm.dealer" placeholder="请输入经销商"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="制表人" prop="createMan">
-                    <el-input v-model="screenForm.createMan" placeholder="请输入制表人"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="审核人" prop="examineMan">
-                    <el-input v-model="screenForm.examineMan" placeholder="请输入审核人"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="表头业务员" prop="salesMan">
-                    <el-select
-                      v-model="screenForm.salesMan"
-                      placeholder="选择表头业务员"
-                      clearable
-                      filterable
-                      style="width: 100%"
-                    >
-                      <el-option
-                        v-for="item in salesmanList"
-                        :key="item.adminUserId"
-                        :label="item.nickName"
-                        :value="item.adminUserId"
-                      >
-                      </el-option>
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="规格型号" prop="model">
-                    <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="是否直调" prop="isDirectTransfer">
-                    <el-select v-model="screenForm.isDirectTransfer" placeholder="选择是否直" style="width: 100%">
-                      <el-option :value="null" label="默认"></el-option>
-                      <el-option v-for="item in transfer" :key="item.value" :label="item.label" :value="item.value">
-                      </el-option>
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="钱包" prop="customerWalletId">
-                    <el-select
-                      v-model="screenForm.customerWalletId"
-                      placeholder="选择钱包"
-                      clearable
-                      filterable
-                      style="width: 100%"
-                    >
-                      <el-option v-for="item in NoRebateWalletList" :key="item.id" :label="item.name" :value="item.id">
-                      </el-option>
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-                <el-col :xs="24" :sm="12" :lg="6">
-                  <el-form-item label="销售类型" prop="saleTypeId">
-                    <el-select
-                      v-model="screenForm.saleTypeId"
-                      placeholder="选择销售类型"
-                      clearable
-                      filterable
-                      style="width: 100%"
-                    >
-                      <el-option v-for="item in typeList" :key="item.id" :label="item.saleName" :value="item.id">
-                      </el-option>
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-            </el-form>
-          </template>
-        </Collapse>
-      </div>
-
-      <div class="mymain-container">
-        <div class="btn-group clearfix">
-          <div class="fl">
-            <el-button
-              size="mini"
-              type="primary"
-              icon="el-icon-plus"
-              @click="toForm()"
-              v-if="$checkBtnRole('add', $route.meta.roles)"
-              >新增</el-button
-            >
-            <el-button
-              size="mini"
-              type="danger"
-              icon="el-icon-minus"
-              :disabled="multipleSelection.length < 1"
-              @click="batchDelete()"
-              v-if="$checkBtnRole('del', $route.meta.roles)"
-              >批量删除</el-button
-            >
-          </div>
-          <div class="fr">
-            <ExportButton :exUrl="'engin-order/export'" :exParams="exParams" />
-          </div>
-        </div>
-        <div class="table">
-          <el-table
-            v-loading="listLoading"
-            :data="dataList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-            @selection-change="handleSelectionChange"
-            show-summary
-            :summary-method="$getSummaries"
-          >
-            <el-table-column align="center" type="selection" width="55"></el-table-column>
-            <el-table-column align="left" label="审核状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.examineStatus | statusFilter }}
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="工程订单号" prop="enginOrderNo" min-width="140" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.enginOrderNo" />
-                <span>{{ scope.row.enginOrderNo }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="订单日期" prop="orderDate" min-width="120" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <div>
-                  <span>{{ scope.row.orderDate | dateToDayFilter }}</span>
-                  <el-button
-                    type="text"
-                    icon="el-icon-edit"
-                    style="padding: 0; margin-left: 6px"
-                    @click="editDate(scope.row)"
-                    v-if="$checkBtnRole('date', $route.meta.roles) && !isCustomer && scope.row.examineStatus !== 'SAVE'"
-                  ></el-button>
-                </div>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="工程编号"
-              prop="refProjectNo"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="工程登录编号"
-              prop="refEnginRecordNo"
-              min-width="200"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.refEnginRecordNo" />
-                <span>{{ scope.row.refEnginRecordNo }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="仓库"
-              prop="correspondName"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-
-            <el-table-column align="left" label="订单类型" prop="enginOrderType" min-width="100" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.enginOrderType | typeFilter }}
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.customerName" />
-                <span>{{ scope.row.customerName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="使用单位"
-              prop="refUseUnit"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="项目名称"
-              prop="refProjectName"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <!--            <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>-->
-            <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialNumber" />
-                <span>{{ scope.row.materialNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="产品编码"
-              prop="materialOldNumber"
-              min-width="140"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialOldNumber" />
-                <span>{{ scope.row.materialOldNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialName" />
-                <span>{{ scope.row.materialName }}</span>
-              </template>
-            </el-table-column>
-
-            <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.specification" />
-                <span>{{ scope.row.specification }}</span>
-              </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="right"
-              label="总数量"
-              prop="qty"
-              min-width="100"
-              sortable
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="是否直调"
-              prop="isDirectTransfer"
-              min-width="100"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                {{ scope.row.isDirectTransfer ? '是' : '否' }}
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="right"
-              label="直调数量"
-              prop="directTransferQty"
-              min-width="110"
-              sortable
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="right"
-              label="出库数量"
-              prop="hasSendQty"
-              min-width="110"
-              sortable
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column align="right" label="单价" prop="price" min-width="100" sortable show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.price | numToFixed }}
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="right"
-              label="实付金额"
-              prop="payAmount"
-              min-width="110"
-              sortable
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                {{ scope.row.payAmount | numToFixed }}
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="返利钱包"
-              prop="customerWalletName2"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="right"
-              label="使用返利金额"
-              prop="rebateAmount"
-              min-width="120"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                <div v-if="scope.row.examineStatus === 'OK'">
-                  {{ scope.row.payRebateAmount | numToFixed }}
-                </div>
-                <div v-else>{{ scope.row.rebateAmount | numToFixed }}</div>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="right"
-              label="格力折扣"
-              prop="discAmount"
-              min-width="110"
-              sortable
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                {{ scope.row.discAmount | numToFixed }}
-              </template>
-            </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="serviceName"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="表体业务员"
-              prop="itemServiceName"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-
-            <el-table-column
-              align="left"
-              label="制表人"
-              prop="createName"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="制表日期"
-              prop="createTime"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="审核人"
-              prop="confirmName"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="审核日期"
-              prop="confirmTime"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column align="center" label="操作" width="220" fixed="right">
-              <template slot-scope="scope">
-                <el-popconfirm
-                  style="margin-right: 10px"
-                  title="确定申请吗?"
-                  @onConfirm="handleSubmit(scope.row.parentId, scope.row)"
-                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'"
-                >
-                  <el-button slot="reference" type="text">申请</el-button>
-                </el-popconfirm>
-                <el-popconfirm
-                  style="margin-right: 10px"
-                  title="确定撤回吗?"
-                  @onConfirm="handleWithdraw(scope.row.parentId, scope.row)"
-                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
-                >
-                  <el-button slot="reference" type="text">撤回</el-button>
-                </el-popconfirm>
-                <el-popconfirm
-                  style="margin-right: 10px"
-                  title="确定弃审吗?"
-                  @onConfirm="handleAbandon(scope.row.parentId, scope.row)"
-                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'"
-                >
-                  <el-button slot="reference" type="text">弃审</el-button>
-                </el-popconfirm>
-                <el-button
-                  type="text"
-                  @click="toForm(scope.row)"
-                  v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'"
-                >
-                  编辑
-                </el-button>
-                <el-button
-                  type="text"
-                  @click="toExamine(scope.row)"
-                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
-                >
-                  审批
-                </el-button>
-                <el-button type="text" @click="toReturn(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles)">
-                  退订
-                </el-button>
-                <el-button type="text" @click="toDetail(scope.row)"> 详情 </el-button>
-                <el-popconfirm
-                  style="margin-left: 10px"
-                  title="确定删除吗?"
-                  @onConfirm="handleDelete(scope.row.parentId, scope.row)"
-                  v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus !== 'OK'"
-                >
-                  <el-button slot="reference" type="text" style="color: #f56c6c">删除</el-button>
-                </el-popconfirm>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-      </div>
-      <div class="pagination clearfix">
-        <div class="fr">
-          <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="currentPage"
-            :page-sizes="[10, 20, 30, 50]"
-            :page-size="10"
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="listTotal"
-          >
-          </el-pagination>
-        </div>
-      </div>
-    </div>
-
-    <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
-
-    <CommerceDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
-    <CommerceForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
-    <CommerceExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
-    <CommerceReturn :listItem="queryItem" v-if="isShowReturn" @backListFormDetail="backList" />
-  </div>
+  <template-page
+    ref="pageRef"
+    :getList="getList"
+    :operation="operation()"
+    :optionsEvensGroup="optionsEvensGroup"
+    :exportList="exportList"
+    :columnParsing="columnParsing"
+    :tableAttributes="tableAttributes"
+    :tableEvents="tableEvents"
+  >
+    <!-- <EditDateDialog :is-show.sync="isShowEditDateDialog" :date-form.sync="dateForm" /> -->
+    <Popu v-if="isShowDetail || isShowForm || isShowExamine || isShowReturn">
+      <CommerceDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
+      <CommerceForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
+      <CommerceExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
+      <CommerceReturn :listItem="queryItem" v-if="isShowReturn" @backListFormDetail="backList" />
+    </Popu>
+  </template-page>
 </template>
 
 <script>
-import { getOrderList, applyCom, withdrawCom, deleteCom, editDateCom, abandonCom } from '@/api/supply/engin'
+import TemplatePage from '@/components/template/template-page-1.vue'
+import Popu from '@/components/template/popu.vue'
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
+
+import {
+  getOrderList,
+  applyCom,
+  withdrawCom,
+  deleteCom,
+  editDateCom,
+  abandonCom,
+  v2EnginOrderTradeList,
+  v2EnginOrderTradeListExport
+} from '@/api/supply/engin'
 import { getSalesmanList, getTypeList } from '@/api/common'
 import CommerceDetail from '@/views/supply/engin/components/commerce_detail'
 import CommerceForm from '@/views/supply/engin/components/commerce_form'
@@ -521,12 +44,15 @@ import { getNoRebateWalletList } from '@/api/policy_list'
 
 let that
 export default {
+  mixins: [add_callback_mixin],
   components: {
     CommerceDetail,
     CommerceForm,
     CommerceExamine,
     CommerceReturn,
-    EditDateDialog
+    EditDateDialog,
+    TemplatePage,
+    Popu
   },
   filters: {
     statusFilter(val) {
@@ -543,6 +69,46 @@ export default {
   },
   data() {
     return {
+      // 事件组合
+      optionsEvensGroup: [
+        [
+          [
+            {
+              name: '新增',
+              click: this.addOn(() => {
+                this.toForm()
+              }),
+              isRole: this.$checkBtnRole('add', this.$route.meta.roles)
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '批量删除',
+              click: async () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.error('请选择需要删除的数据')
+                  return
+                }
+                this.batchDelete()
+              },
+              isRole: this.$checkBtnRole('del', this.$route.meta.roles)
+            }
+          ]
+        ]
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: [],
+
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
@@ -630,12 +196,146 @@ export default {
   },
 
   created() {
-    this.getSalesTypeList()
-    this.getSalesmanList()
-    this.getList()
+    // this.getSalesTypeList()
+    // this.getSalesmanList()
+    // this.getList()
   },
 
   methods: {
+    // 列表请求函数
+    getList: v2EnginOrderTradeList,
+    // 列表导出函数
+    exportList: v2EnginOrderTradeListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class="operation-btns">
+            <div class="operation-btns">
+              {this.$checkBtnRole('apply', this.$route.meta.roles) && row.examineStatus == '保存' ? (
+                <el-popconfirm
+                  onOnConfirm={async () => {
+                    this.handleSubmit(row.parentId, row)
+                  }}
+                  title="是否确定需要申请该项内容?"
+                >
+                  <el-button slot="reference" size="mini" type="text">
+                    申请
+                  </el-button>
+                </el-popconfirm>
+              ) : (
+                ''
+              )}
+
+              {this.$checkBtnRole('apply', this.$route.meta.roles) && row.examineStatus == '待审核' ? (
+                <el-popconfirm
+                  onOnConfirm={async () => {
+                    this.handleWithdraw(row.parentId, row)
+                  }}
+                  title="是否确定需要撤回该项内容?"
+                >
+                  <el-button slot="reference" size="mini" type="text">
+                    撤回
+                  </el-button>
+                </el-popconfirm>
+              ) : (
+                ''
+              )}
+
+              {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === '审核通过' ? (
+                <el-popconfirm
+                  onOnConfirm={async () => {
+                    this.handleAbandon(row.parentId, row)
+                  }}
+                  title="是否确定需要弃审该项内容?"
+                >
+                  <el-button slot="reference" size="mini" type="text">
+                    弃审
+                  </el-button>
+                </el-popconfirm>
+              ) : (
+                ''
+              )}
+
+              {this.$checkBtnRole('edit', this.$route.meta.roles) && row.examineStatus === '保存' ? (
+                <el-button
+                  size="mini"
+                  type="text"
+                  onClick={async () => {
+                    this.toForm(row)
+                  }}
+                >
+                  编辑
+                </el-button>
+              ) : (
+                ''
+              )}
+
+              {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === '待审核' ? (
+                <el-button
+                  size="mini"
+                  type="text"
+                  onClick={async () => {
+                    this.toExamine(row)
+                  }}
+                >
+                  审批
+                </el-button>
+              ) : (
+                ''
+              )}
+
+              {this.$checkBtnRole('examine', this.$route.meta.roles) ? (
+                <el-button
+                  size="mini"
+                  type="text"
+                  onClick={async () => {
+                    this.toReturn(row)
+                  }}
+                >
+                  退订
+                </el-button>
+              ) : (
+                ''
+              )}
+
+              <el-button
+                size="mini"
+                type="text"
+                onClick={async () => {
+                  this.toDetail(row)
+                }}
+              >
+                详情
+              </el-button>
+
+              {this.$checkBtnRole('del', this.$route.meta.roles) && row.examineStatus !== '审核通过' ? (
+                <el-popconfirm
+                  onOnConfirm={async () => {
+                    this.handleDelete(row.parentId, row)
+                  }}
+                  title="是否确定需要删除该项内容?"
+                >
+                  <el-button slot="reference" size="mini" type="text">
+                    删除
+                  </el-button>
+                </el-popconfirm>
+              ) : (
+                ''
+              )}
+            </div>
+          </div>
+        )
+      }
+    },
+
     // 获取业务员列表
     getSalesmanList() {
       getSalesmanList({
@@ -670,40 +370,40 @@ export default {
     },
 
     // 查询列表
-    getList() {
-      this.listLoading = true
-
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        examineStatus: this.screenForm.status,
-        enginOrderNo: this.screenForm.orderNum,
-        refProjectNo: this.screenForm.enginNum,
-        refEnginRecordNo: this.screenForm.loginNum,
-        refProjectName: this.screenForm.enginName,
-        startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
-        saleTypeId: this.screenForm.saleType,
-        createName: this.screenForm.createMan,
-        confirmName: this.screenForm.examineMan,
-        customerWalletId: this.screenForm.customerWalletId,
-        serviceId: this.screenForm.salesMan,
-        customerKeyword: this.screenForm.dealer,
-        isDirectTransfer: this.screenForm.isDirectTransfer,
-
-        specification: this.screenForm.model,
-        enginOrderType: 'TRADE' // TRADE=商用 HOME=家用
-      }
-      getOrderList(params).then(res => {
-        res.data.records.forEach(item => {
-          item.sums1 = ['qty', 'directTransferQty', 'hasSendQty']
-          item.sums2 = ['price', 'payAmount', 'discAmount']
-        })
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
-    },
+    // getList() {
+    //   this.listLoading = true
+
+    //   let params = {
+    //     pageNum: this.currentPage,
+    //     pageSize: this.pageSize,
+    //     examineStatus: this.screenForm.status,
+    //     enginOrderNo: this.screenForm.orderNum,
+    //     refProjectNo: this.screenForm.enginNum,
+    //     refEnginRecordNo: this.screenForm.loginNum,
+    //     refProjectName: this.screenForm.enginName,
+    //     startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
+    //     endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
+    //     saleTypeId: this.screenForm.saleType,
+    //     createName: this.screenForm.createMan,
+    //     confirmName: this.screenForm.examineMan,
+    //     customerWalletId: this.screenForm.customerWalletId,
+    //     serviceId: this.screenForm.salesMan,
+    //     customerKeyword: this.screenForm.dealer,
+    //     isDirectTransfer: this.screenForm.isDirectTransfer,
+
+    //     specification: this.screenForm.model,
+    //     enginOrderType: 'TRADE' // TRADE=商用 HOME=家用
+    //   }
+    //   getOrderList(params).then(res => {
+    //     res.data.records.forEach(item => {
+    //       item.sums1 = ['qty', 'directTransferQty', 'hasSendQty']
+    //       item.sums2 = ['price', 'payAmount', 'discAmount']
+    //     })
+    //     this.dataList = res.data.records
+    //     this.listTotal = res.data.total
+    //     this.listLoading = false
+    //   })
+    // },
 
     // 提交筛选表单
     submitScreenForm() {
@@ -713,7 +413,7 @@ export default {
 
     // 重置筛选表单
     resetScreenForm() {
-        this.$refs.screenForm.resetFields()
+      this.$refs.screenForm.resetFields()
       this.currentPage = 1
       this.getList()
     },
@@ -803,12 +503,13 @@ export default {
         type: 'warning'
       })
         .then(() => {
-          let ids = this.multipleSelection.map(item => {
+          let ids = this.recordSelected.map(item => {
             return item.parentId
           })
           deleteCom({ ids: ids.join(',') }).then(res => {
             this.$successMsg()
-            this.getList()
+            // this.getList()
+            this.$refs.pageRef.refreshList()
           })
         })
         .catch(() => {})

+ 9 - 24
src/views/supply/engin/components/home_detail.vue

@@ -5,7 +5,9 @@
 
       <div id="printData">
         <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">
@@ -383,7 +385,7 @@
             ></el-table-column>
           </el-table>
         </div>
-        <div class="table" style="margin-top: 20px" v-if="detailData.examineStatus =='OK'">
+        <div class="table" style="margin-top: 20px" v-if="detailData.examineStatus == 'OK'">
           <el-table
             :data="detailData.refundNoteList"
             element-loading-text="Loading"
@@ -396,28 +398,11 @@
             :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="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>
         </div>
-
       </div>
 
       <div class="page-footer">
@@ -445,7 +430,7 @@
       </div>
     </div>
 
-    <el-dialog title="直调发货" :visible.sync="isShowDeliverDialog" width="80%">
+    <el-dialog title="直调发货" append-to-body :visible.sync="isShowDeliverDialog" width="80%">
       <el-form
         ref="deliverForm"
         :model="deliverForm"
@@ -595,7 +580,7 @@
       </span>
     </el-dialog>
 
-    <el-dialog title="直接调拨单(提前开票)" :visible.sync="isShowDirectDialog" width="80%">
+    <el-dialog title="直接调拨单(提前开票)" append-to-body :visible.sync="isShowDirectDialog" width="80%">
       <el-form
         ref="directForm"
         :model="directForm"

+ 27 - 18
src/views/supply/engin/components/home_form.vue

@@ -213,14 +213,14 @@
             />
           </el-form-item>
         </el-col>
-<!--        <el-col :span="24" :sm="12" :lg="8">-->
-<!--          <el-form-item label="计划单" prop="isPlanOrder">-->
-<!--            <el-radio-group v-model="mainForm.isPlanOrder">-->
-<!--              <el-radio :label="true">是</el-radio>-->
-<!--              <el-radio :label="false">否</el-radio>-->
-<!--            </el-radio-group>-->
-<!--          </el-form-item>-->
-<!--        </el-col>-->
+        <!--        <el-col :span="24" :sm="12" :lg="8">-->
+        <!--          <el-form-item label="计划单" prop="isPlanOrder">-->
+        <!--            <el-radio-group v-model="mainForm.isPlanOrder">-->
+        <!--              <el-radio :label="true">是</el-radio>-->
+        <!--              <el-radio :label="false">否</el-radio>-->
+        <!--            </el-radio-group>-->
+        <!--          </el-form-item>-->
+        <!--        </el-col>-->
 
         <el-col v-if="mainForm.examineRemark" :xs="24" :sm="24" :lg="24">
           <el-form-item label="审批说明" prop="examineRemark">
@@ -233,8 +233,12 @@
     <div class="main-title">
       <div class="title">货品信息</div>
       <div>
-        <el-select v-model="warehouseValue" placeholder="请选择发货仓库" @change="handleWarehouseValue"
-                   size="small" style="margin-right: 10px"
+        <el-select
+          v-model="warehouseValue"
+          placeholder="请选择发货仓库"
+          @change="handleWarehouseValue"
+          size="small"
+          style="margin-right: 10px"
         >
           <el-option v-for="(item, index) in warehouseList" :key="index" :label="item.name" :value="item.id" />
         </el-select>
@@ -460,7 +464,13 @@
     </div>
 
     <!-- 工程登录列表 -->
-    <el-dialog title="工程登录列表" :visible.sync="isShowDialog" width="70%" :close-on-click-modal="false">
+    <el-dialog
+      title="工程登录列表"
+      append-to-body
+      :visible.sync="isShowDialog"
+      width="70%"
+      :close-on-click-modal="false"
+    >
       <el-form
         ref="screenForm"
         :model="screenForm"
@@ -506,9 +516,8 @@
           <el-table-column align="center" label="" width="100">
             <template slot-scope="scope">
               <el-button type="primary" size="small" @click="chooseItem(scope.row.recordNo, scope.row.userid)"
-              >选择
-              </el-button
-              >
+                >选择
+              </el-button>
             </template>
           </el-table-column>
           <el-table-column align="center" prop="checkTime" label="工程登录日期" show-overflow-tooltip />
@@ -536,7 +545,7 @@
       </div>
     </el-dialog>
 
-    <el-dialog title="添加产品" :visible.sync="isShowGoodsDialog" width="80%">
+    <el-dialog title="添加产品" append-to-body :visible.sync="isShowGoodsDialog" width="80%">
       <el-form ref="goodsScreenForm" :model="goodsScreenForm" size="small" label-position="left">
         <el-row :gutter="20">
           <el-col :xs="12" :sm="6" :lg="6">
@@ -646,7 +655,7 @@
         <el-button type="primary" @click="submitAddGoods">确 定</el-button>
       </span>
     </el-dialog>
-    <el-dialog title="添加产品" :visible.sync="isSetMaterial" width="80%">
+    <el-dialog title="添加产品" append-to-body :visible.sync="isSetMaterial" width="80%">
       <el-form ref="goodsScreenForm" :model="goodsScreenForm" size="small" label-position="left">
         <el-row :gutter="20">
           <el-col :xs="12" :sm="6" :lg="6">
@@ -932,7 +941,7 @@ export default {
       immediate: true,
       deep: true
     },
-    'mainForm.saleType': function(newValue, oldValue) {
+    'mainForm.saleType': function (newValue, oldValue) {
       this.oldSaleType = oldValue
     }
   },
@@ -1061,7 +1070,7 @@ export default {
 
     // 重置筛选表单
     resetScreenForm() {
-        this.$refs.screenForm.resetFields()
+      this.$refs.screenForm.resetFields()
       this.dialogTable_currentPage = 1
       this.getHomeLoginList()
     },

File diff suppressed because it is too large
+ 231 - 718
src/views/supply/engin/home_list.vue


Some files were not shown because too many files changed in this diff