高敬炎 2 yıl önce
ebeveyn
işleme
5319f5defb

+ 7 - 7
src/global.js

@@ -16,14 +16,14 @@ export default {
     setWs: function(newWs) {
         this.ws = newWs
     },
-    async getNum(status){
-        var date = new Date()
-        var num=await getcount({compId:this.compId,noFlag:status}).toPromise()
-         num=('0000'+(num+1)).substr(-4)
-        console.log(num)
-        return status+date.getFullYear()+(date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1))+(date.getDate()>10?date.getDate():date.getDate())+num
+    // async getNum(status){
+    //     var date = new Date()
+    //     var num=await getcount({compId:this.compId,noFlag:status}).toPromise()
+    //      num=('0000'+(num+1)).substr(-4)
+    //     console.log(num)
+    //     return status+date.getFullYear()+(date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1))+(date.getDate()>10?date.getDate():date.getDate())+num
         
-    },
+    // },
     whetherWebSocket: function(type) {
         var that = this
         if ('WebSocket' in window) {

+ 29 - 25
src/views/boundManagement/outbound.vue

@@ -15,11 +15,10 @@
          
       </el-col>
       <el-col :span="16" >
-        <div style="margin:10px 0;font-weight:600;font-size:16px;">业务编号:{{this.form.businessNo}}</div>
+        <div v-if="this.form.businessNo" style="margin:10px 0;font-weight:600;font-size:16px;">业务编号:{{this.form.businessNo}}</div>
       </el-col> 
     </el-row>
     <div class="enterTextWrap">
-     
       <div class="flex-1">
         <div class="weign">
           <BalanceAlert ref="weightChild" :deptBudgetList="form" :information="information"
@@ -50,12 +49,9 @@
             <div class="form-title">基本信息</div>
             <el-form-item label="客户姓名">
               <el-select @change="customerChange" allow-create filterable clearable placeholder="输入客户姓名" v-model="form.customerName" >
-                <el-option v-for="item in customerOptions" :key="item.id" :label="item.customerName" :value="item.customerName"></el-option>
+                <el-option v-for="item in customerOptions" :key="item.id" :label="item.customerName+'('+item.customerPhone+')'" :value="item.customerName"></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item v-if="form.customerId" label="手机号">
-              <el-input placeholder="输入客户手机号" v-model="form.carNumber"></el-input>
-            </el-form-item>
             <el-form-item label="车牌号">
               <el-input maxlength="8" placeholder="输入毛重车牌号" v-model="form.carNumber"></el-input>
             </el-form-item>
@@ -139,7 +135,7 @@
         <el-table-column prop="carNumber" label="车牌号"></el-table-column>
         <el-table-column prop="customerName" label="客户">
           <template scope="scope">
-            <span v-if="scope.row.customerId">{{ scope.row.customerName }}</span>
+            <span v-if="!scope.row.customerId">{{ scope.row.customerName }}</span>
             <el-button v-else @click="lookCustomerName(scope.row)" type="text">{{ scope.row.customerName }}</el-button>
           </template>
         </el-table-column>
@@ -170,19 +166,19 @@
       :before-close="handleClose">
       <el-form ref="form" label-width="80px">
         <el-form-item label="姓名">
-          <el-input v-model="customerData.name"></el-input>
+          <el-input disabled v-model="customerData.customerName"></el-input>
         </el-form-item>
         <el-form-item label="手机号">
-          <el-input v-model="customerData.name"></el-input>
+          <el-input disabled v-model="customerData.customerPhone"></el-input>
         </el-form-item>
         <el-form-item label="银行卡号">
-          <el-input v-model="customerData.name"></el-input>
+          <el-input disabled v-model="customerData.bankCard"></el-input>
         </el-form-item>
         <el-form-item label="开户行">
-          <el-input v-model="customerData.name"></el-input>
+          <el-input disabled v-model="customerData.bankDeposit"></el-input>
         </el-form-item>
         <el-form-item label="开户支行">
-          <el-input v-model="customerData.name"></el-input>
+          <el-input disabled v-model="customerData.bankDepositBranch"></el-input>
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -219,7 +215,8 @@ export default {
       form:{
         inOutFlag:2,
         compId:localStorage.getItem('ws-pf_compId'),
-        goodsName:'玉米'
+        goodsName:'玉米',
+        noFlag:'CK'
       },
       information:'',
       checked:false,
@@ -249,9 +246,9 @@ export default {
   async mounted() {
     // getList().toPromise()
     var date = new Date()
-    var num=await global.default.getNum('CK')
-    console.log(num)
-    this.form.businessNo=num
+    // var num=await global.default.getNum('RK')
+    // console.log(num)
+    // this.form.businessNo=num
     speedPositionInfoList({compId:this.compId}).toPromise().then((res)=>{
       this.positionOptions=res
     })
@@ -300,6 +297,8 @@ export default {
       this.form={
         inOutFlag:2,
         compId:localStorage.getItem('ws-pf_compId'),
+        goodsName:'玉米',
+        noFlag:'CK'
       }
     },
     unitPriceInput(e){
@@ -307,10 +306,9 @@ export default {
         this.form.grainFund=e*this.form.netWeight
       }
     },
-    lookCustomerName(){
-      getcustomer({}).toPromise().then((res)=>{
-      this.customerData=res
-    })
+    async lookCustomerName(row){
+      this.customerData=await getcustomer({customerId:row.customerId}).toPromise()
+      this.dialogVisible=true
     },
     positionNoChange(e){
       for (let i = 0; i < this.positionOptions.length; i++) {
@@ -321,8 +319,9 @@ export default {
     },
     customerChange(e){
       for (let i = 0; i < this.customerOptions.length; i++) {
-        if(this.customerOptions[i].id==e){
-          this.form.customerName=this.customerOptions[i].customerName
+        if(this.customerOptions[i].customerName==e){
+          this.form.customerId=this.customerOptions[i].id
+          console.log(this.form.customerId)
         }
       }
     },
@@ -341,7 +340,7 @@ export default {
       this.getList()
     },
     getList(){
-      getList({compId:this.compId,startDate:this.startDate,endDate:this.endDate,pageSize:this.pageSize,currentPage:this.currentPage,searchType:2}).toPromise().then((res)=>{
+      getList({compId:this.compId,startDate:this.startDate,endDate:this.endDate,pageSize:this.pageSize,currentPage:this.currentPage,searchType:1}).toPromise().then((res)=>{
         if(res.records.length>0){
           for (let i = 0; i < res.records.length; i++) {
             res.records[i].select=false
@@ -359,8 +358,12 @@ export default {
       }
     },
     add(){
-      this.form={inOutFlag:2,
-        compId:localStorage.getItem('ws-pf_compId'),}
+      this.form={
+        inOutFlag:2,
+        compId:localStorage.getItem('ws-pf_compId'),
+        goodsName:'玉米',
+        noFlag:'CK'
+      }
     },
     save(){
       if(this.form.grossWeight&&this.form.grossWeight<0||typeof Number(this.form.grossWeight) === 'Number'){
@@ -460,6 +463,7 @@ export default {
               type: 'success',
               message: '删除成功!'
             });
+            this.getList()
           })
           
         }).catch(() => {

+ 29 - 25
src/views/warehousing/index.vue

@@ -15,11 +15,10 @@
         &nbsp;
       </el-col>
       <el-col :span="16" >
-        <div style="margin:10px 0;font-weight:600;font-size:16px;">业务编号:{{this.form.businessNo}}</div>
+        <div v-if="this.form.businessNo" style="margin:10px 0;font-weight:600;font-size:16px;">业务编号:{{this.form.businessNo}}</div>
       </el-col> 
     </el-row>
     <div class="enterTextWrap">
-     
       <div class="flex-1">
         <div class="weign">
           <BalanceAlert ref="weightChild" :deptBudgetList="form" :information="information"
@@ -53,9 +52,6 @@
                 <el-option v-for="item in customerOptions" :key="item.id" :label="item.customerName+'('+item.customerPhone+')'" :value="item.customerName"></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item v-if="form.customerId" label="手机号">
-              <el-input placeholder="输入客户手机号" v-model="form.carNumber"></el-input>
-            </el-form-item>
             <el-form-item label="车牌号">
               <el-input maxlength="8" placeholder="输入毛重车牌号" v-model="form.carNumber"></el-input>
             </el-form-item>
@@ -139,7 +135,7 @@
         <el-table-column prop="carNumber" label="车牌号"></el-table-column>
         <el-table-column prop="customerName" label="客户">
           <template scope="scope">
-            <span v-if="scope.row.customerId">{{ scope.row.customerName }}</span>
+            <span v-if="!scope.row.customerId">{{ scope.row.customerName }}</span>
             <el-button v-else @click="lookCustomerName(scope.row)" type="text">{{ scope.row.customerName }}</el-button>
           </template>
         </el-table-column>
@@ -170,19 +166,19 @@
       :before-close="handleClose">
       <el-form ref="form" label-width="80px">
         <el-form-item label="姓名">
-          <el-input v-model="customerData.name"></el-input>
+          <el-input disabled v-model="customerData.customerName"></el-input>
         </el-form-item>
         <el-form-item label="手机号">
-          <el-input v-model="customerData.name"></el-input>
+          <el-input disabled v-model="customerData.customerPhone"></el-input>
         </el-form-item>
         <el-form-item label="银行卡号">
-          <el-input v-model="customerData.name"></el-input>
+          <el-input disabled v-model="customerData.bankCard"></el-input>
         </el-form-item>
         <el-form-item label="开户行">
-          <el-input v-model="customerData.name"></el-input>
+          <el-input disabled v-model="customerData.bankDeposit"></el-input>
         </el-form-item>
         <el-form-item label="开户支行">
-          <el-input v-model="customerData.name"></el-input>
+          <el-input disabled v-model="customerData.bankDepositBranch"></el-input>
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -219,7 +215,8 @@ export default {
       form:{
         inOutFlag:1,
         compId:localStorage.getItem('ws-pf_compId'),
-        goodsName:'玉米'
+        goodsName:'玉米',
+        noFlag:'RK'
       },
       information:'',
       checked:false,
@@ -248,10 +245,13 @@ export default {
   },
   async mounted() {
     // getList().toPromise()
-    var date = new Date()
-    var num=await global.default.getNum('RK')
-    console.log(num)
-    this.form.businessNo=num
+    const end = new Date();
+    const start = new Date();
+    start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+    this.value=[start,]    
+    // var num=await global.default.getNum('RK')
+    // console.log(num)
+    // this.form.businessNo=num
     speedPositionInfoList({compId:this.compId}).toPromise().then((res)=>{
       this.positionOptions=res
     })
@@ -300,6 +300,8 @@ export default {
       this.form={
         inOutFlag:1,
         compId:localStorage.getItem('ws-pf_compId'),
+        goodsName:'玉米',
+        noFlag:'RK'
       }
     },
     unitPriceInput(e){
@@ -307,10 +309,9 @@ export default {
         this.form.grainFund=e*this.form.netWeight
       }
     },
-    lookCustomerName(){
-      getcustomer({}).toPromise().then((res)=>{
-      this.customerData=res
-    })
+    async lookCustomerName(row){
+      this.customerData=await getcustomer({customerId:row.customerId}).toPromise()
+      this.dialogVisible=true
     },
     positionNoChange(e){
       for (let i = 0; i < this.positionOptions.length; i++) {
@@ -326,7 +327,6 @@ export default {
           console.log(this.form.customerId)
         }
       }
-      console.log(111111)
     },
     grossWeightInput(e){
       if(this.form.tare) this.form.netWeight=e-this.form.tare
@@ -343,7 +343,7 @@ export default {
       this.getList()
     },
     getList(){
-      getList({compId:this.compId,startDate:this.startDate,endDate:this.endDate,pageSize:this.pageSize,currentPage:this.currentPage,searchType:1}).toPromise().then((res)=>{
+      getList({compId:this.compId,startDate:this.startDate,endDate:this.endDate,pageSize:this.pageSize,currentPage:this.currentPage,searchType:2}).toPromise().then((res)=>{
         if(res.records.length>0){
           for (let i = 0; i < res.records.length; i++) {
             res.records[i].select=false
@@ -361,8 +361,12 @@ export default {
       }
     },
     add(){
-      this.form={inOutFlag:1,
-        compId:localStorage.getItem('ws-pf_compId'),}
+      this.form={
+        inOutFlag:1,
+        compId:localStorage.getItem('ws-pf_compId'),
+        goodsName:'玉米',
+        noFlag:'RK'
+      }
     },
     save(){
       if(this.form.grossWeight&&this.form.grossWeight<0||typeof Number(this.form.grossWeight) === 'Number'){
@@ -444,7 +448,6 @@ export default {
         });
         this.add()
         this.getList()
-        console.log(1111)
       }).catch((req) => {
         this.$message({
           type: 'error',
@@ -463,6 +466,7 @@ export default {
               type: 'success',
               message: '删除成功!'
             });
+            this.getList()
           })
           
         }).catch(() => {