Browse Source

客户管理页面,流转记录列表,采购计划列表,采购订单列表,PC端传pcFlag等于1

zxz 3 years ago
parent
commit
101719d972

+ 5 - 0
src/api/V2/customer/index.js

@@ -0,0 +1,5 @@
+
+//客户列表查看
+export const API_GET_CUSTOMERINFO_LOOK = '/customerInfo/selectCustomerInfo'
+
+

+ 2 - 0
src/lang/zh.js

@@ -503,6 +503,8 @@
     warehouseManagementPerfectput: '编辑',
     warehouseManagementPutOut:'任务',
     warehouseManagementPutOutLook:'查看',
+    //客户管理
+    customerList:'客户管理',
     //采购管理
     purchasingManagement:'采购业务管理',
     procurementPlanList:'采购计划',

+ 13 - 0
src/model/customer/index.js

@@ -0,0 +1,13 @@
+import { errorCatcher, errorHandle, filter } from 'base-core-lib'
+import { appRx } from '../defalutConfig/indexRx'
+import {
+    API_GET_CUSTOMERINFO_LOOK,
+    
+} from '@/api/V2/customer'
+// import { app } from 'electron'
+// 列表
+export const getList = appRx.get(API_GET_CUSTOMERINFO_LOOK, errorCatcher, errorHandle, filter)
+
+
+
+

+ 32 - 0
src/views/customer/component/router/route.js

@@ -0,0 +1,32 @@
+import Layout from '@/layout/index';
+
+const customerRouter = {
+    path: '/customer',
+    component: Layout,
+    redirect: { name: 'customerList' },
+    name: 'customerList',
+    alwaysShow: true, // will always show the root menu
+    meta: {
+      title: 'customerList',
+      module: 'warehouseManagement.warehouse.warehouseInfo',
+      icon: '-cangkubeifen'
+    },
+    children: [
+      {
+        path: 'customerList',
+        component: () =>
+          import(/* webpackChunkName: "applDetail" */ '@/views/customer/customerList'),
+        name: 'customerList',
+        meta: {
+          title: 'customerList',
+          shortcutEntrance: 'customerList',
+          module: 'warehouseManagement.warehouse.warehouseInfo',
+          permissicon: [],
+          keepAlive: true
+          // module: 'procurement.sparepart.applDetail'
+        },
+         hidden: true
+      },
+  ],
+};
+export default customerRouter;  

+ 641 - 0
src/views/customer/customerList.vue

@@ -0,0 +1,641 @@
+//客户管理
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="8">
+      <template slot="left"> </template>
+      <!-- 接单开始 -->
+      <template slot="left">
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按客户名称、电话查找"
+          clearable
+          maxlength="500"
+          type="input"
+          class="findValue"
+        ></ws-input>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button class="find" type="primary" @click="find()"
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -2px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+        <el-button class="bg-bottom" type="primary" size="small" @click="installDepositRatio()"
+        >默认定金比例</el-button
+      >
+      <WinseaContentModal
+      v-model="outerVisible"
+      title="设置默认定金比例"
+      @on-cancel="handleClose"
+    >
+    
+    <div style="width:90%">
+      <div class="dingjin">定金比例(元/吨)</div> 
+      <el-input
+        type="textarea"
+        :rows="2"
+        maxlength="30"
+        placeholder="请输入定金比例"
+        v-model="auditMind"
+      >
+      </el-input>
+      </div>
+      <div class="dialog-footer">
+        <el-button @click="outerVisible = false">取 消</el-button>
+        <el-button type="primaryone" @click="editDepositRatio()">确定</el-button>
+      </div>
+    </WinseaContentModal>
+
+<!--增加定金-->
+    <el-button class="bg-bottom" type="primary" size="small" @click="addPrice()"
+        >增加定金</el-button>
+      <WinseaContentModal
+      v-model="outerVisibleAdd"
+      title="增加定金"
+      @on-cancel="handleClose"
+    >
+    <div class="addprice">已付定金</div> 
+     <div class="addpricejine">增加金额</div>
+    <div style="width:90%" class="zengjia">
+     
+      <el-input
+        type="textarea"
+        :rows="2"
+        maxlength="30"
+        placeholder="请输入本次增加定金金额"
+        v-model="auditMindAdd"
+      >
+      </el-input>
+    <div class="yuan">元</div>
+      </div>
+     
+      <div class="dialog-footer">
+        <el-button @click="outerVisibleAdd = false">取 消</el-button>
+        <el-button type="primaryadd" @click="editPriceAdd()">确定</el-button>
+      </div>
+    </WinseaContentModal>
+
+    <!--退回定金-->
+    <el-button class="bg-bottom" type="primary" size="small" @click="returnPrice()"
+        >退回定金</el-button>
+      <WinseaContentModal
+      v-model="outerVisibleReturn"
+      title="退回定金"
+      @on-cancel="handleClose"
+    >
+    <div class="returnprice">可退定金</div> 
+     <div class="returnpricejine">退回金额</div>
+    <div style="width:90%" class="tuihui">
+      <el-input
+        type="textarea"
+        :rows="2"
+        maxlength="30"
+        placeholder="请输入本次退回定金金额"
+        v-model="auditMindReturn"
+      >
+      </el-input>
+    <div class="yuan">元</div>
+      </div>
+     
+      <div class="dialog-footer">
+        <el-button @click="outerVisibleReturn = false">取 消</el-button>
+        <el-button type="primaryreturn" @click="editPriceReturn()">确定</el-button>
+      </div>
+    </WinseaContentModal>
+      </template>
+
+    </BaseHeaderLayout>
+    <div>
+      <el-table
+        class="wenzi"
+        :data="warehouseList.records"
+        style="width: 100%"
+        height="780"
+      >
+        <el-table-column prop="index" label="序号" width="80">
+          <template scope="scope">
+            <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+            <span v-else>{{ scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="customerName" label="客户名称">
+        </el-table-column>
+        <el-table-column prop="compAddress" label="地址">
+            <template>asddddddd</template>
+        </el-table-column>
+        <el-table-column prop="customerPhone" label="电话"> </el-table-column>
+        <el-table-column prop="payTaxesCard" label="纳税人识别号"> </el-table-column>
+        <el-table-column prop="bankDeposit" label="开户行"> </el-table-column>
+        <el-table-column prop="bankCard" label="银行卡号"> </el-table-column>
+        <el-table-column prop="totalDeposit" label="总定金(元)"> </el-table-column>
+        <el-table-column prop="freezingDeposit" label="冻结定金(元)"> </el-table-column>
+        <el-table-column prop="processStatus" label="定金比例(元/吨)">
+          <template slot-scope="scope">
+            <img
+              width="17"
+              height="18"
+              style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png"
+              @click="editClick(scope.row)"
+              alt=""
+            />
+          </template>
+        </el-table-column>
+        <el-table-column prop="updateDate" label="更新时间"> </el-table-column>
+        <el-table-column prop="seller" label="操作" width="280" >
+          <template>
+            <el-button class="find" type="primary" @click="addPrice()"
+          >增加定金</el-button>
+            <el-button class="find" type="primary" @click="returnPrice()"
+          >退回定金</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"
+      >
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+import { automobileList, alsostate } from '@/model/transport/index'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+
+import { billoperatehis } from '@/model/contarct/index'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      currentPage: 1,
+      pageSize: 10,
+      deptBudgetTotal: 0,
+      searchTypeText: '执行中',
+      searchKeyWord: '',
+      outerVisible: false,
+      outerVisibleAdd: false,
+      outerVisibleReturn: false,
+      contractType: 2,
+      searchType: 1,
+      // 提交类型
+      submitType: true,
+      size: 10,
+      spanArr: [],
+      inOutDate: [],
+      auditMind: '',
+      auditMindAdd: '',
+      auditMindReturn: '',
+      tranTypeKey: '1',
+      warehouseName: '',
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      warehouseList: [],
+      deptBudgetList: {},
+      historyList: [],
+      taskTypeList: [
+        { value: '执行中', type: 1 },
+        { value: '已完成', type: 2 },
+        { value: '全部任务', type: '' },
+      ],
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+     
+    }
+  },
+  activated() {
+    this.getList()
+    this.showType = this.isShow
+  },
+  methods: {
+    //设置默认定金比例
+    installDepositRatio(){
+      this.outerVisible = true
+    },
+    editDepositRatio(){
+      
+      if (!this.auditMind) {
+        this.$message({
+          message: '默认定金比例不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      
+    },
+    //增加定金
+    addPrice(){
+        this.outerVisibleAdd = true
+    },
+    editPriceAdd(){
+      
+      if (!this.auditMindAdd) {
+        this.$message({
+          message: '增加金额不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      
+    },
+    //退回定金
+    returnPrice(){
+        this.outerVisibleReturn = true
+    },
+    editPriceReturn(){
+      if (!this.auditMindOneReturn) {
+        this.$message({
+          message: '退回金额不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+    },
+    //查看//传参
+    nocomplete(row) {
+      this.$router.push({
+        name: 'vehicleDispatchingview',
+        query: {
+          id: row.id,
+        },
+      })
+    },
+    dateFormat(fmt, date) {
+      let ret
+      const opt = {
+        'Y+': date.getFullYear().toString(), // 年
+        'm+': (date.getMonth() + 1).toString(), // 月
+        'd+': date.getDate().toString(), // 日
+        'H+': date.getHours().toString(), // 时
+        // "M+": date.getMinutes().toString(),         // 分
+        // "S+": date.getSeconds().toString()          // 秒
+        // 有其他格式化字符需求可以继续添加,必须转化成字符串
+      }
+      for (let k in opt) {
+        ret = new RegExp('(' + k + ')').exec(fmt)
+        if (ret) {
+          fmt = fmt.replace(
+            ret[1],
+            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+          )
+        }
+      }
+      return fmt
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    changestatus(state) {
+      this.searchType = state
+      this.getList()
+    },
+    getList() {
+      automobileList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        startDate: this.startDate,
+        endDate: this.endDate,
+        searchKeyWord: this.searchKeyWord,
+        tranTypeKey: this.tranTypeKey,
+      })
+        .toPromise()
+        .then((response) => {
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
+          this.warehouseList = response
+        })
+    },
+    editClick(row) {
+      var status = ''
+      if (row.processStatus == '待执行' || row.processStatus == '已完成') {
+        status = '执行中'
+      } else if (row.processStatus == '执行中') {
+        status = '已完成'
+      }
+      //cancelButtonClass: "btn-custom-cancel"
+      this.$confirm(`是否将状态改为${status}`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          alsostate({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    history(row) {
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      if (this.inOutDate != null) {
+        if (this.inOutDate.length > 0) {
+          this.startDate = this.dateFormat('YYYY-mm-dd', this.inOutDate[0])
+          this.endDate = this.dateFormat('YYYY-mm-dd', this.inOutDate[1])
+        } else {
+          this.startDate = ''
+          this.endDate = ''
+        }
+      }else{
+        this.startDate = ''
+          this.endDate = ''
+      }
+      this.currentPage = 1
+      this.getList()
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.connert {
+  width: 90%;
+  margin: 0 auto;
+}
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--primaryone {
+  background-color: #5878e8;
+  color: #fff;
+}
+.el-button--primaryadd {
+  background-color: #5878e8;
+  color: #fff;
+}
+.el-button--primaryreturn {
+  background-color: #5878e8;
+  color: #fff;
+}
+.el-button--default {
+  color: #8890b1;
+  border-color: #e8eaf1;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: 0;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
+//操作按钮
+.record,
+.adjustment {
+  display: inline-block;
+  color: #5878e8;
+  padding: 0 4px !important;
+  position: relative;
+  font-size: 14px;
+}
+.record:after {
+  position: absolute;
+  content: '';
+  display: block;
+  top: 5px;
+  right: -2px;
+  width: 1px;
+  height: 12px;
+  background: #e9ecf7;
+}
+//状态样式
+.executory,
+.inExecution,
+.done {
+  width: 6px;
+  height: 6px;
+  display: inline-block;
+  border-radius: 50%;
+  position: relative;
+  top: -1px;
+  font-size: 14px;
+}
+.executory {
+  background: #ff9f24;
+}
+.inExecution {
+  background: #5878e8;
+}
+.done {
+  background: #50cad4;
+}
+.putstorage.el-button--default,
+.deliverystorage.el-button--default {
+  border-color: #8890b1;
+  background-color: #fff;
+  color: #8890b1;
+}
+/deep/.el-table td,
+/deep/.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+}
+/deep/.el-table tr td:first-child,
+/deep/.el-table tr th.is-leaf:first-child {
+  border-left: 1px solid #e9ecf7;
+}
+.record,
+.adjustment {
+  display: inline-block;
+  color: #5878e8;
+  padding: 0 4px !important;
+  position: relative;
+}
+.record:after {
+  position: absolute;
+  content: '';
+  display: block;
+  top: 5px;
+  right: -2px;
+  width: 1px;
+  height: 12px;
+  background: #e9ecf7;
+}
+.el-row {
+  height: 60px;
+}
+.base_header_layout .grid-content {
+  margin-top: 80px;
+}
+.el-input--small .el-input__inner {
+  margin-left: 20px;
+  
+}
+.dialog-footer{
+  margin-top: 21px;
+}
+.el-range-editor--small.el-input__inner {
+  height: 32px;
+  margin: 0 10px;
+}
+/deep/.el-pagination {
+  text-align: center;
+  white-space: nowrap;
+  padding: 2px 5px;
+  color: #303133;
+  font-weight: 700;
+  margin-bottom: 20px;
+}
+.el-select {
+  width: 30%;
+  margin-right: 10px;
+}
+
+
+/deep/.zengjia .el-textarea__inner{
+display: block;
+    padding: 13px 17px;
+    line-height: 0.5;
+    box-sizing: border-box;
+    width: 80%;
+    font-size: inherit;
+    color: #606266;
+    background-color: #fff;
+    background-image: none;
+    border: 1px solid #dcdfe6;
+    border-radius: 4px;
+    transition: border-color .2s cubic-bezier(.645,.045,.355,1);
+    margin-left: 180px;
+}
+
+/deep/.tuihui .el-textarea__inner{
+display: block;
+    padding: 13px 17px;
+    line-height: 0.5;
+    box-sizing: border-box;
+    width: 80%;
+    font-size: inherit;
+    color: #606266;
+    background-color: #fff;
+    background-image: none;
+    border: 1px solid #dcdfe6;
+    border-radius: 4px;
+    transition: border-color .2s cubic-bezier(.645,.045,.355,1);
+    margin-left: 180px;
+}
+/deep/.dingjin{
+  width: 98px;
+  margin-left: 30px;
+}
+/deep/.el-textarea__inner{
+display: block;
+    padding: 13px 17px;
+    line-height: 0.5;
+    box-sizing: border-box;
+    width: 90%;
+    font-size: inherit;
+    color: #606266;
+    background-color: #fff;
+    background-image: none;
+    border: 1px solid #dcdfe6;
+    border-radius: 4px;
+    transition: border-color .2s cubic-bezier(.645,.045,.355,1);
+    margin-left: 180px;
+}
+/deep/.addprice{
+  width: 98px;
+  margin-left: 50px;
+}
+/deep/.returnprice{
+  width: 98px;
+  margin-left: 50px;
+}
+/deep/.yuan{
+    width: 10px;
+    margin-left: 1400px;
+    margin-top: -36px;
+}
+/deep/.addpricejine{
+  width: 98px;
+  margin-left: 50px;
+}
+/deep/.returnpricejine{
+  width: 98px;
+  margin-left: 50px;
+}
+/deep/.typeselect .el-input__inner {
+  color: #8890b1;
+}
+
+</style>

+ 2 - 0
src/views/purchasingManagement/procurementPlanList.vue

@@ -166,6 +166,7 @@ export default {
       deptCircularPage: {},
       warehouseList: [],
       deptBudgetList: {},
+      pcFlag:1,
       historyList: [],
       pickerBeginDateBefore: {
         disabledDate: time => {
@@ -190,6 +191,7 @@ export default {
         tranTypeKey: this.tranTypeKey,
         searchType: this.searchType,
         contractNo: this.contractNo,
+        pcFlag: this.pcFlag,
         inOutTaskNo: this.inOutTaskNo
       })
         .toPromise()

+ 2 - 0
src/views/purchasingManagement/purchaseOrderList.vue

@@ -968,6 +968,7 @@ export default {
       deptCircularPage: {},
       warehouseList: [],
       deptBudgetList: {},
+      pcFlag:1,
       historyList: [],
       pickerBeginDateBefore: {
         disabledDate: time => {
@@ -1056,6 +1057,7 @@ export default {
         id :this.id,
         currentPage: this.currentPage,
         pageSize: this.pageSize,
+        pcFlag: this.pcFlag,
         contractNo: this.contractNo
       })
         .toPromise()

+ 2 - 0
src/views/tranManagement/tranManagementDriver.vue

@@ -393,6 +393,7 @@ export default {
       submitType: true,
       size: 10,
       spanArr: [],
+      pcFlag:1,
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       date: {
@@ -552,6 +553,7 @@ export default {
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchType: this.searchType,
+        pcFlag:this.pcFlag,
         residentCityProvincial: this.residentCityProvincial,
         residentCityMunicipal: this.residentCityMunicipal,
         searchKeyWord: this.searchKeyWord,

+ 3 - 3
src/views/warehouse/warehouseManagementRecord.vue

@@ -416,8 +416,7 @@ export default {
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       packtypeList: {},
-      currentPage: 1,
-      pageSize: 10,
+      pcFlag: 1,
       date: {
         year: dayjs().format('YYYY'),
         month: dayjs().format('MM'),
@@ -526,7 +525,8 @@ export default {
         warehouseName: this.deptBudgetList.warehouseName,
         searchType: this.searchType,
         currentPage: this.currentPage,
-        pageSize: this.pageSize,
+        pcFlag: this.pcFlag,
+        pageSize: this.pageSize
       })
         .toPromise()
         .then((response) => {