liuhj 7 mesi fa
parent
commit
b01fd1a9cb
2 ha cambiato i file con 102 aggiunte e 4 eliminazioni
  1. 27 1
      src/components/OP/EntryDetails.vue
  2. 75 3
      src/components/OP/SuppliesInventory.vue

+ 27 - 1
src/components/OP/EntryDetails.vue

@@ -15,6 +15,7 @@
                 </div>
                 <div class="Entry-head-li">
                     <!-- <el-button type="primary">计算费用</el-button> -->
+                    <el-button @click="NationalTravelFeeImportReceivables" type="primary">导出到收款账单</el-button>
                     <el-button @click="cleanout" type="primary">全部清空</el-button>
                     <el-button @click="storage()" type="primary">保存</el-button>
                     <el-select style="width:202px" v-model="listvalue" placeholder="请选择">
@@ -589,6 +590,7 @@ export default {
             airGWC_Checked:false,//公务舱选择框
 
             userId:'',
+            token:'',
             value:'',
             options:[],
             Visafees:'',
@@ -1876,7 +1878,30 @@ export default {
             this.DomesticFees.visafees=this.visainfo.feeTotal;
             this.DomesticFees.visafeesDescription=this.visainfo.remark;
             this.getvisafeebtn=false;
-        }
+        },
+        //导出到收款账单
+        NationalTravelFeeImportReceivables(){
+            var url = "/api/Groups/NationalTravelFeeImportReceivables/"+this.value
+            var that = this
+            this.$axios({
+                method: 'get',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' +that.token
+                },
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.$message({
+                        type: 'success',
+                        message: res.data.msg
+                    });
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+            }).catch(function (error) {
+                that.$message.error("操作错误,联系信息部!");
+            });
+        },
     },
     filters: {
         numFilter (value) {
@@ -2061,6 +2086,7 @@ export default {
         }
     },
     mounted(){
+        this.token=JSON.parse(localStorage.getItem('userinif')).token;
         this.userId=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
         this.value=JSON.parse(localStorage.getItem('sgvalue'))
         this.GetEnterExitCostDataSource();

+ 75 - 3
src/components/OP/SuppliesInventory.vue

@@ -24,7 +24,28 @@
                     <el-form-item label="供应商来源" prop="supplierSource">
                         <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.supplierSource" clearable></el-input>
                     </el-form-item>
-                    <el-form-item style="width:66.5%;" label="备注" prop="remark">
+                    <el-form-item label="入库人员" prop="storageUserId">
+                        <el-select size="small" v-model="warehousingsruleForm.storageUserId" clearable filterable
+                            placeholder="请选择">
+                            <el-option v-for="item in userNameData" :key="item.id" :label="item.userName"
+                                :value="item.id">
+                            </el-option>
+                        </el-select>
+                        <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageUserId" clearable></el-input> -->
+                    </el-form-item>
+                    <el-form-item label="入库时间" prop="storageTime">
+                        <el-date-picker
+                        size="small"
+                        style="width:100%"
+                        v-model="warehousingsruleForm.storageTime"
+                        type="datetime"
+                        placeholder="选择日期时间"
+                        align="right"
+                        :picker-options="pickerOptions">
+                        </el-date-picker>
+                        <!-- <el-input size="small" placeholder="请输入供应商来源" v-model="warehousingsruleForm.storageTime" clearable></el-input> -->
+                    </el-form-item>
+                    <el-form-item style="width:100%;" label="备注" prop="remark">
                         <el-input size="small" placeholder="请输入备注称" v-model="warehousingsruleForm.remark" clearable></el-input>
                     </el-form-item>
                 </div>
@@ -266,6 +287,28 @@
 export default {
     data() {
         return {
+            pickerOptions: {
+            shortcuts: [{
+                text: '今天',
+                onClick(picker) {
+                picker.$emit('pick', new Date());
+                }
+            }, {
+                text: '昨天',
+                onClick(picker) {
+                const date = new Date();
+                date.setTime(date.getTime() - 3600 * 1000 * 24);
+                picker.$emit('pick', date);
+                }
+            }, {
+                text: '一周前',
+                onClick(picker) {
+                const date = new Date();
+                date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
+                picker.$emit('pick', date);
+                }
+            }]
+            },
             Userid:'',
             token:"",
             MaterialType:'',
@@ -290,7 +333,9 @@ export default {
             AdditemsName:"",
             Additemstextarea:"",
             ID:0,
+            groupNameData:[],
             //入库参数
+            userNameData:[],
             warehousingslist:[],
             warehousingsVisible:false,
             warehousingsruleForm: {
@@ -302,6 +347,8 @@ export default {
                 supplierTel: '',
                 supplierAddress: '',
                 supplierSource: '',
+                storageUserId:'',
+                storageTime:'',
                 remark: ''
             },
             warehousingsrules: {
@@ -326,12 +373,18 @@ export default {
                 supplierSource: [
                     { required: true, message: '请输入', trigger: 'blur' },
                 ],
+                storageUserId: [
+                    { required: true, message: '请选择', trigger: 'change' },
+                ],
+                storageTime: [
+                    { required: true, message: '请选择', trigger: 'blur' },
+                ],
                 remark: [
                     { required: true, message: '请输入', trigger: 'blur' },
                 ],
             },
             //领用参数
-            ClaimitemVisible:true,
+            ClaimitemVisible:false,
             ClaimsruleForm:{
                 id:0,
                 groupId:'',
@@ -361,6 +414,17 @@ export default {
             val=Number(val);
             return val.toFixed(2);
         },
+        //处理日期
+        datetime(val){
+            var date=new Date(val);
+            var y=date.getFullYear();
+            var m=date.getMonth()+1>=10?date.getMonth()+1:'0'+(date.getMonth()+1).toString();
+            var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
+            var s=date.getHours()>=10?date.getHours():'0'+(date.getHours()).toString();
+            var f=date.getMinutes()>=10?date.getMinutes():'0'+(date.getMinutes()).toString();
+            var mm=date.getSeconds()>=10?date.getSeconds():'0'+(date.getSeconds()).toString();
+            return y+'-'+m+'-'+d+' '+s+':'+f+':'+mm
+        },
         //获取
         GoodsInitDataSource() {
             var url = "/api/PersonnelModule/GoodsInitDataSource"
@@ -375,6 +439,7 @@ export default {
                 if (res.data.code == 200) {
                     that.MaterialTypearr=res.data.data.goodsTypeData;
                     that.AddMaterialTypearr=res.data.data.goodsTypeData;
+                    that.userNameData=res.data.data.userNameData;
                     that.MaterialType=that.MaterialTypearr[0].id;
                     that.MaterialTypechange();
                 } else {
@@ -621,6 +686,8 @@ export default {
                     supplierTel:that.warehousingsruleForm.supplierTel,
                     supplierAddress:that.warehousingsruleForm.supplierAddress,
                     supplierSource:that.warehousingsruleForm.supplierSource,
+                    storageUserId:that.warehousingsruleForm.storageUserId,
+                    storageTime:that.datetime(that.warehousingsruleForm.storageTime),
                     remark:that.warehousingsruleForm.remark,
                 }
             }).then(function (res) {
@@ -659,6 +726,8 @@ export default {
                     that.warehousingsruleForm.supplierTel=datainfo.supplierTel;
                     that.warehousingsruleForm.supplierAddress=datainfo.supplierAddress;
                     that.warehousingsruleForm.supplierSource=datainfo.supplierSource;
+                    that.warehousingsruleForm.storageUserId=datainfo.storageUserId;
+                    that.warehousingsruleForm.storageTime=datainfo.storageTime;
                     that.warehousingsruleForm.remark=datainfo.remark;
                 }else{
                     that.$message.error(res.data.msg);
@@ -709,7 +778,7 @@ export default {
             if (valid) {
                 this.GoodsStorageOP();
             } else {
-                console.log('error submit!!');
+                console.log(this.datetime(this.warehousingsruleForm.storageTime));
                 return false;
             }
             });
@@ -819,6 +888,9 @@ export default {
 .warehousingsrule-input .el-form-item__error{
     top: 82%;
 }
+.warehousingsrule-input .el-select{
+    width: 100%;
+}
 .warehousingsrule-table .all-box .el-table th.el-table__cell>.cell{
     text-align: center;
     font-size: 12px;