howie 3 anni fa
parent
commit
4cd7d34210

+ 9 - 0
src/api/common.js

@@ -105,3 +105,12 @@ export function getSalesmanList(params) {
     params,
   });
 }
+
+// 更新发票
+export function updateReceipt(params) {
+  return request({
+    url: '/stock/manager/receipt',
+    method: 'get',
+     params
+  })
+}

+ 0 - 7
src/api/supply/sales.js

@@ -93,13 +93,6 @@ export function addReturn(params) {
 
 
 
-export function updateReceipt(params) {
-  return request({
-    url: '/stock/manager/receipt',
-    method: 'get',
-     params
-  })
-}
 
 
 export function updateNum(params) {

+ 61 - 0
src/views/setting/other.vue

@@ -9,6 +9,8 @@
       <el-radio-button label="sixth">机型类别</el-radio-button>
       <el-radio-button label="seventh">登录类型</el-radio-button>
       <el-radio-button label="eigth">权限分类</el-radio-button>
+          <el-radio-button label="receipt"  v-if="$checkBtnRole('receipt', $route.meta.roles)">发票</el-radio-button>
+
     </el-radio-group>
 
     <div v-show="formType === 'first'">
@@ -158,6 +160,30 @@
       </div>
 
     </div>
+    <div  v-show="formType === 'receipt'" >
+      <div style="margin: 40px 0 30px;">
+         <el-date-picker
+              v-model="value1"
+              size="mini"
+              type="daterange"
+               value-format="yyyy-MM-dd HH:mm:ss"
+              range-separator="至"
+              :picker-options="setDisabled"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              style="margin:0 10px"
+            >
+            </el-date-picker>
+            <el-button
+              size="mini"
+
+              type="warning"
+              icon="el-icon-finished"
+              @click="updateReceipt"
+              >更新发票</el-button
+            >
+      </div>
+    </div>
 
     <!-- //弹窗 -->
     <el-dialog :title="title" :visible.sync="dialogForm" width="30%" :show-close="false" :close-on-click-modal="false">
@@ -184,6 +210,7 @@ import {
   editDictList,
   addDictList,
   deleDictList,
+  updateReceipt
 } from "@/api/common";
 
 export default {
@@ -223,6 +250,22 @@ export default {
       sixthForm: [],
       seventhForm: [],
       eigthForm: [],
+      value1:'',
+      choiceDate:'',
+      setDisabled: {
+        disabledDate: (time) => {
+          if (this.choiceDate) {
+            const res = 13 * 24 * 3600 * 1000;
+            const minTime = this.choiceDate - res;
+            const maxTime = this.choiceDate + res;
+            return time.getTime() < minTime || time.getTime() > maxTime;
+          }
+        },
+        onPick: ({ maxDate, minDate }) => {
+          this.choiceDate = minDate.getTime();
+          if (maxDate) this.choiceDate = "";
+        },
+      },
     };
   },
   created() {
@@ -311,6 +354,8 @@ export default {
     },
 
     changeType(val) {
+
+    if (this.formType === 'receipt') return
       this.getDetail(val);
     },
 
@@ -375,6 +420,22 @@ export default {
         this.getDetail(type);
       });
     },
+        updateReceipt() {
+
+    if (!this.value1) {
+      this.$errorMsg('请选择时间')
+      return
+    }
+      updateReceipt({
+      startTime:this.value1[0],
+      endTime:this.value1[1]
+      }).then(res=>{
+
+        this.$successMsg("已更新");
+         this.value1 = ''
+      })
+
+    },
   },
 };
 </script>

+ 23 - 14
src/views/stock/stock_list.vue

@@ -6,18 +6,18 @@
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="仓库" prop="warehouse">
-              <el-select v-model="screenForm.warehouse" placeholder="请选择仓库" @change="changeWarehouse" clearable>
+              <el-select v-model="screenForm.warehouse" placeholder="请选择仓库" @change="changeWarehouse" clearable   multiple >
                 <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
+          <!-- <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="仓位" prop="position">
               <el-select v-model="screenForm.position" placeholder="请选择仓位" clearable>
                 <el-option :label="item.name" :value="item.id" v-for="(item, index) in positionList" :key="index"></el-option>
               </el-select>
             </el-form-item>
-          </el-col>
+          </el-col> -->
           <!-- <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="产品大类" prop="type">
               <el-select v-model="screenForm.type" placeholder="请选择产品大类" @change="changeType" clearable>
@@ -53,7 +53,7 @@
             </el-form-item>
           </el-col>
 
-          <el-col :xs="24" :sm="24" :lg="24" class="tr">
+          <el-col :xs="24" :sm="24" :lg="12" class="tr">
             <el-form-item label="">
               <el-button @click="resetScreenForm">清空</el-button>
               <el-button type="primary" @click="submitScreenForm">搜索</el-button>
@@ -137,7 +137,7 @@ export default {
       dataList: null, // 列表数据
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
-        warehouse: '',
+        warehouse: [],
         position: '',
         goodsName: '',
         goodsNum: '',
@@ -215,23 +215,32 @@ export default {
 
     // 更改仓库
     changeWarehouse() {
-      this.screenForm.position = '';
-      if(this.screenForm.warehouse) {
-        let obj = this.warehouseList.find(o => o.id == this.screenForm.warehouse);
-        this.positionList = obj.kingDeeStocks;
-      }else {
-        this.positionList = [];
-      }
+      // this.screenForm.position = '';
+      // if(this.screenForm.warehouse) {
+      //   let obj = this.warehouseList.find(o => o.id == this.screenForm.warehouse);
+      //   this.positionList = obj.kingDeeStocks;
+      // }else {
+      //   this.positionList = [];
+      // }
     },
 
     // 查询列表
     getList() {
       this.listLoading = true;
-
+          const correspondNameS = []
+        if( this.screenForm.warehouse &&  this.screenForm.warehouse.length)
+         this.screenForm.warehouse.forEach(e=>{
+           this.warehouseList.filter(k=>{
+               if(e === k.id){
+                correspondNameS.push(k.name)
+              }
+           })
+        })
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        correspondId: this.screenForm.warehouse,
+        correspondId:  this.screenForm.warehouse.join(),
+        correspondNameS:correspondNameS.join('/'),
         stockId: this.screenForm.position,
         materialName: this.screenForm.goodsName,
         materialNumber: this.screenForm.goodsCode,

+ 8 - 6
src/views/supply/apply/components/apply_detail.vue

@@ -29,14 +29,14 @@
             <div class="label">经销商名称</div>
             <div class="value">{{detailData.customerName}}</div>
           </el-col>
-          <el-col :span="8" class="item">
+          <el-col :span="24" class="item">
             <div class="label">仓库</div>
             <div class="value">{{detailData.correspondName}}</div>
           </el-col>
-            <el-col :span="16" class="item">
+            <!-- <el-col :span="16" class="item">
             <div class="label">文件编号</div>
             <div class="value">{{detailData.fileNo}}</div>
-          </el-col>
+          </el-col> -->
           <el-col :span="24" class="item">
             <div class="label">备注</div>
             <div class="value">
@@ -108,7 +108,9 @@
           <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip></el-table-column>
           <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="right" label="含税单价" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
+                     <el-table-column align="left" label="文件编号" prop="fileNo" min-width="100" show-overflow-tooltip></el-table-column>
+
+        <el-table-column align="right" label="含税单价" prop="singlePayPrice" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{scope.row.singlePayPrice | numToFixed}}
             </template>
@@ -133,8 +135,8 @@
           <el-table-column align="right" label="申请数量" prop="invoiceNum" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="right" label="审批数量" prop="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="right" label="已退数量" prop="retiredQty" min-width="100" show-overflow-tooltip v-if="detailData.type !== 2"></el-table-column>
-          <el-table-column align="left" label="订单备注" prop="headerRemark" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="left" label="表头备注" prop="headerRemark" min-width="160" show-overflow-tooltip></el-table-column>
+          <!-- <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column> -->
           <el-table-column align="left" label="表体备注" prop="invoiceRemark" 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="k3ServiceName" min-width="100" show-overflow-tooltip></el-table-column>

+ 11 - 8
src/views/supply/apply/components/apply_examine.vue

@@ -37,10 +37,10 @@
           <div class="value">{{detailData.remark}}</div>
         </el-col>
 
-            <el-col :span="24" class="item">
+            <!-- <el-col :span="24" class="item">
             <div class="label">文件编号</div>
             <div class="value">{{detailData.fileNo}}</div>
-          </el-col>
+          </el-col> -->
         <el-col :span="24" class="item file">
           <div class="label">附件</div>
           <div class="value">
@@ -87,7 +87,11 @@
         <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip></el-table-column>
         <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
+
+             <el-table-column align="left" label="文件编号" prop="fileNo" min-width="100" show-overflow-tooltip></el-table-column>
+
+
+     <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
           </template>
@@ -104,23 +108,22 @@
           </template>
         </el-table-column>
         <el-table-column align="right" label="已退数量" prop="retiredQty" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="left" label="订单备注" prop="headerRemark" min-width="160" show-overflow-tooltip>
+        <el-table-column align="left" label="表头备注" prop="headerRemark" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.headerRemark" size="small"></el-input>
           </template>
         </el-table-column>
-        <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip>
+        <!-- <el-table-column align="left" label="表头备注" prop="remark" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.remark" size="small"></el-input>
           </template>
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column align="left" label="表体备注" prop="invoiceRemark" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.invoiceRemark" size="small"></el-input>
           </template>
         </el-table-column>
-                  <el-table-column align="right" label="销售政策名称" prop="policyTitle" min-width="100" show-overflow-tooltip></el-table-column>
-
+    <el-table-column align="right" label="销售政策名称" prop="policyTitle" min-width="100" 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="k3ServiceName" min-width="100" show-overflow-tooltip></el-table-column>
       </el-table>

+ 6 - 1
src/views/supply/apply/components/apply_form.vue

@@ -85,11 +85,16 @@
         </el-table-column>
         <el-table-column align="center" label="已申请数量" prop="alreadyInvoiceNum" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="未申请数量" prop="canApply" min-width="100" show-overflow-tooltip> </el-table-column>
-        <el-table-column align="center" label="备注" prop="headerRemark" min-width="160" show-overflow-tooltip>
+          <el-table-column align="left" label="表头备注" prop="headerRemark" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.headerRemark" size="small"></el-input>
           </template>
         </el-table-column>
+            <el-table-column align="left" label="表体备注" prop="invoiceRemark" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.invoiceRemark" size="small"></el-input>
+          </template>
+        </el-table-column>
         <el-table-column align="center" label="操作" width="100" fixed="right">
           <template slot-scope="scope">
             <el-button type="text" @click="deleteItem(scope.$index)">删除</el-button>

+ 13 - 4
src/views/supply/apply/components/apply_return_form.vue

@@ -100,11 +100,18 @@
             </el-select>
           </template>
         </el-table-column> -->
-        <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip>
+        <el-table-column align="left" label="表头备注" prop="headerRemark" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-input v-model="scope.row.remark" size="small"></el-input>
+            <el-input v-model="scope.row.headerRemark" size="small"></el-input>
           </template>
         </el-table-column>
+            <el-table-column align="left" label="表体备注" prop="invoiceRemark" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.invoiceRemark" size="small"></el-input>
+          </template>
+        </el-table-column>
+
+
         <el-table-column align="center" label="操作" width="100" fixed="right">
           <template slot-scope="scope">
             <el-button type="text" @click="deleteItem(scope.$index)">删除</el-button>
@@ -483,7 +490,7 @@ export default {
     submitAddGoods() {
       let tableSelection = [];
       this.tableGoodsList.forEach(item => {
-        if((item.invoiceNum || item.invoiceNum === 0) && !item.selected) {
+        if((item.invoiceNum ) && !item.selected) {
           tableSelection.push(item);
         }
       });
@@ -498,6 +505,7 @@ export default {
       this.isShowDialog = false;
       this.tableGoodsList = [];
 
+      this.mainForm.remark = tableSelection[0].headerRemark
       this.goodsList = this.goodsList.concat(tableSelection);
     },
 
@@ -532,7 +540,8 @@ export default {
               correspondId: item.correspondId,
               correspondName: item.correspondName,
               refundableQty: item.invoiceNum,
-              remark: item.remark,
+              headerRemark: item.headerRemark,
+              invoiceRemark:item.invoiceRemark,
               salesOrderId: item.id,
               salesOrderItemId: item.salesOrderItemId
             }

+ 7 - 2
src/views/supply/apply/components/engin_form.vue

@@ -170,9 +170,14 @@
             <el-input v-model="scope.row.invoiceNum" size="small"></el-input>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip>
+        <el-table-column align="center" label="表头备注" prop="headerRemark" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-input v-model="scope.row.remark" size="small"></el-input>
+            <el-input v-model="scope.row.headerRemark" size="small"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="表体备注" prop="invoiceRemark" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.invoiceRemark" size="small"></el-input>
           </template>
         </el-table-column>
         <el-table-column align="center" label="操作" width="100" fixed="right">

+ 1 - 1
src/views/supply/implement/components/sales_detail.vue

@@ -76,7 +76,7 @@
             </template>
           </el-table-column>
           <el-table-column align="left" label="订单备注" prop="headerRemark" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+          <!-- <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column> -->
           <el-table-column align="left" label="表体备注" prop="invoiceRemark" 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>

+ 20 - 7
src/views/supply/sales/components/sales_detail.vue

@@ -69,12 +69,13 @@
             <template slot-scope="scope">
                   <template v-if="edit">
                    <el-input
+                        size="mini"
+                    class="input"
                     v-model="scope.row.refundableQty"
-                  placeholder="请输入数量"
+                      placeholder="请输入数量"
               ></el-input>
-
-                  </template>
-                 <template>
+              </template>
+                 <template v-else>
                   {{scope.row.refundableQty}}
                  </template>
             </template>
@@ -90,10 +91,13 @@
               {{ scope.row.payAmount | numToFixed }}
             </template>
           </el-table-column>
-          <el-table-column align="left" label="订单备注" prop="headerRemark" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="left" label="表头备注" prop="headerRemark" min-width="160" show-overflow-tooltip></el-table-column>
+          <!-- <el-table-column align="left" label="发货申请备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column> -->
           <el-table-column align="left" label="表体备注" prop="invoiceRemark" 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="k3ServiceName" min-width="100" 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>
       </div>
 
@@ -168,6 +172,7 @@ export default {
     // 返回列表
     goBack() {
       this.$emit('backListFormDetail');
+       this.$parent.edit = false
     },
      updateNum(){
       this.detailData.saleOrderData.forEach(item => {
@@ -204,5 +209,13 @@ export default {
   .detail-container {
     width: 100%;
     height: 100%;
+   .input{
+    ::v-deep .el-input__inner{
+ text-align: right !important;
+    }
+
+  }
   }
+
+
 </style>

+ 15 - 2
src/views/supply/sales/components/sales_return_form.vue

@@ -88,11 +88,24 @@
             </el-select>
           </template>
         </el-table-column>
-        <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip>
+        <!-- <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.remark" size="small"></el-input>
           </template>
-        </el-table-column>
+        </el-table-column> -->
+
+<el-table-column align="left" label="表头备注" prop="headerRemark" min-width="160" show-overflow-tooltip>
+   <template slot-scope="scope">
+            <el-input v-model="scope.row.headerRemark" size="small"></el-input>
+          </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="invoiceRemark" min-width="160" show-overflow-tooltip>
+               <template slot-scope="scope">
+            <el-input v-model="scope.row.invoiceRemark" size="small"></el-input>
+          </template>
+          </el-table-column>
+
         <el-table-column align="center" label="操作" width="100" fixed="right">
           <template slot-scope="scope">
             <el-button type="text" @click="deleteItem(scope.$index)">删除</el-button>

+ 15 - 36
src/views/supply/sales/sales_list.vue

@@ -156,28 +156,7 @@
               v-if="$checkBtnRole('examine', $route.meta.roles)"
               >批量审批</el-button
             >
-              <template       v-if="$checkBtnRole('receipt', $route.meta.roles)">
-            <el-date-picker
-              v-model="value1"
-              size="mini"
-              type="daterange"
-               value-format="yyyy-MM-dd HH:mm:ss"
-              range-separator="至"
-              :picker-options="setDisabled"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-              style="margin:0 10px"
-            >
-            </el-date-picker>
-            <el-button
-              size="mini"
 
-              type="warning"
-              icon="el-icon-finished"
-              @click="updateReceipt"
-              >更新发票</el-button
-            >
-              </template>
           </div>
           <div class="fr">
             <ExportButton :exUrl="'sale/order/export'" :exParams="exParams" />
@@ -212,7 +191,7 @@
                 {{ scope.row.examineStatus | statusFilter }}
               </template>
             </el-table-column>
-            <el-table-column
+            <!-- <el-table-column
               align="left"
               label="发票号"
               prop="billReceipt"
@@ -222,8 +201,8 @@
               <template slot-scope="scope">
                 {{ scope.row.billReceipt }}
               </template>
-            </el-table-column>
-            <el-table-column
+            </el-table-column> -->
+            <!-- <el-table-column
               align="left"
               label="出库单号"
               prop="id"
@@ -234,13 +213,13 @@
                 <CopyButton :copyText="scope.row.id" />
                 <span>{{ scope.row.id }}</span>
               </template>
-            </el-table-column>
-                       <!-- <el-table-column align="left" label="发货单号" prop="orderNo" min-width="130" show-overflow-tooltip>
+            </el-table-column> -->
+                       <el-table-column align="left" label="发货单号" prop="orderNo" min-width="130" show-overflow-tooltip>
                           <template slot-scope="scope">
                            <CopyButton :copyText="scope.row.orderNo" />
                            <span>{{scope.row.orderNo}}</span>
                           </template>
-                      </el-table-column> -->
+                      </el-table-column>
             <!--            <el-table-column align="left" label="订单号" prop="orderNo" min-width="140" show-overflow-tooltip>-->
             <!--              <template slot-scope="scope">-->
             <!--                <CopyButton :copyText="scope.row.orderType === 'TRADE' ? scope.row.enginOrderNo : scope.row.mainOrderId" />-->
@@ -443,7 +422,7 @@ import {
   examineJudge,
   getList,
   updateNum,
-  updateReceipt,
+
 } from "@/api/supply/sales";
 import SalesDetail from "@/views/supply/sales/components/sales_detail";
 import SalesExamine from "@/views/supply/sales/components/sales_examine";
@@ -604,14 +583,14 @@ cid:'',
       this.$errorMsg('请选择时间')
       return
     }
-      updateReceipt({
-      startTime:this.value1[0],
-      endTime:this.value1[1]
-      }).then(res=>{
-         this.getList();
-        this.$successMsg("已更新");
-         this.value1 = ''
-      })
+      // updateReceipt({
+      // startTime:this.value1[0],
+      // endTime:this.value1[1]
+      // }).then(res=>{
+      //    this.getList();
+      //   this.$successMsg("已更新");
+      //    this.value1 = ''
+      // })
 
     },
     // 提交筛选表单