Browse Source

Merge branch 'master' of git.echepei.com:wengyuwen/anpinjingyuan-ui

caojunjie 4 years ago
parent
commit
0c3487e716

+ 1 - 2
src/api/purchaseIssue/index.js

@@ -128,13 +128,12 @@ export function revoke(data) {
 //大撤销
 export function revokeBill(data) {
   return request({
-    url: '/anpin/stockControl/withdrawById',
+    url: '/anpin/project/withdrawById',
     method: 'post',
     data:data
   })
 }
 //获取审批人
-
 export function getName(data) {
   return request({
     url: 'warehouse/paths/projectEndQueryPendingVal',

+ 27 - 21
src/views/project/index1.vue

@@ -353,7 +353,7 @@
           <el-button v-if="cancelButton === true" size="mini" type="danger" icon="el-icon-refresh-left" @click="goBack">返回列表</el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button v-if="cancelButton === false" size="mini" icon="el-icon-refresh-left" type="danger">返回首页</el-button>
+          <el-button v-if="cancelButton === false" size="mini" icon="el-icon-refresh-left" type="danger" @click="cancelTwo">返回首页</el-button>
         </el-col>
         <el-col :span="1.5">
           <el-button size="mini" :disabled="doNot" icon="el-icon-plus" type="primary" @click="addList">录入</el-button>
@@ -502,6 +502,7 @@
               ></el-input>
               <el-input v-else-if="item.label == 'fTeachersWeight'" :disabled="doNot" v-model="scope.row.fTeachersWeight" oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               ></el-input>
+              <el-input v-else-if="item.label == 'fCurrencyName'" disabled v-model="scope.row.fCurrencyName"></el-input>
               <el-input v-else v-model="scope.row[item.label]" :disabled="doNot" placehoder="请输入"></el-input>
             </template>
           </el-table-column>
@@ -828,6 +829,11 @@ export default {
       rules: {
         fCorpid:[{required: true, message: "收款单位不能为空", trigger: "blur"}],
         fPerson:[{required: true, message: "责任人不能为空", trigger: "blur"}],
+        fTel:[    {
+          pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+          message: "请输入正确的手机号码",
+          trigger: "blur"
+        }]
       },
       loading:true,
       name:''
@@ -885,7 +891,6 @@ export default {
     },
     //物料带出单位
     change(scope){
-      console.log(this.materialOption)
       for(let item in this.detailList){
         for(let li in this.materialOption){
           if(this.detailList[item].fMaterial == this.materialOption[li].fId){
@@ -903,8 +908,8 @@ export default {
     },
     homePage(){
       let date = this.$route.query
-      console.log(date)
       if (this.$route.query.list){
+        this.cancelButton = false;
         let scope = {
           row:{
             fId:JSON.parse(this.$route.query.data).billId
@@ -912,6 +917,10 @@ export default {
         }
         this.handleUpdate(scope.row)
         this.approvedBy = true
+      }else{
+        this.mainTabel = false
+        this.cancelButton = true
+        this.approvedBy = false
       }
     },
     // 查看审批流
@@ -956,15 +965,19 @@ export default {
 
     //请核
     approval(){
-      let formData = new window.FormData();
-      formData.append('tProject', JSON.stringify(this.detailform))
-      formData.append('tCtnpriceItems', JSON.stringify(this.detailList))
-      addproject(formData).then(res=>{
-        console.log(res)
-        this.$message.success("操作成功")
-        this.doNot = false
+      this.$refs['detailform'].validate((valid) => {
+        if (valid) {
+          let formData = new window.FormData();
+          formData.append('tProject', JSON.stringify(this.detailform))
+          formData.append('tCtnpriceItems', JSON.stringify(this.detailList))
+          addproject(formData).then(res => {
+            this.$message.success("操作成功")
+            this.doNot = true
+            this.getList()
+            this.mainTabel = false
+          })
+        }
       })
-
     },
     /** 远程模糊查询用户 */
     corpsRemoteMethod(name) {
@@ -977,7 +990,6 @@ export default {
     liableRemoteMethod(name) {
       let queryParams = { fName: name }
       getliable(queryParams).then((response) => {
-        console.log(response)
         this.liableOption = response.rows
       })
     },
@@ -985,7 +997,6 @@ export default {
     materialRemoteMethod(name) {
       let queryParams = { fName: name }
       listmaterial(queryParams).then((response) => {
-        console.log(response)
         this.materialOption = response.rows
       })
     },
@@ -995,9 +1006,6 @@ export default {
       listCharge(this.form).then(response => {
         if (response.rows) {
           this.projectList = response.rows
-          // for (let li in this.projectList) {
-          //   this.name = this.projectList[li]
-          // }
         }
         this.total = response.total;
       })
@@ -1022,9 +1030,7 @@ export default {
             this.$set(this.detailList[li], 'fMeasure', JSON.stringify(this.detailList[li].fMeasure))
           }
         }
-        console.log(this.detailform.fBillstatus)
         if(this.detailform.fBillstatus >= 4){
-          console.log("111")
           this.doNot = true
           this.doNotchange = true
         }else{
@@ -1076,14 +1082,12 @@ export default {
       this.$refs['detailform'].validate((valid) => {
         if (valid) {
           let formData = new window.FormData()
-          console.log(this.detailform)
           formData.append('tProject', JSON.stringify(this.detailform))
           formData.append('tCtnpriceItems', JSON.stringify(this.detailList))
           addChange(formData).then(response => {
             this.$message.success("操作成功")
             if (response.data.tProject) {
               this.detailform = response.data.tProject
-              console.log(this.detailform)
             }
             if (response.data.tCtnpriceItems) {
               this.detailList = response.data.tCtnpriceItems
@@ -1094,7 +1098,6 @@ export default {
       })
     },
     goBack() {
-      console.log(this.$route.query)
       if (this.doNot == true && !this.$route.query.data) {
         this.mainTabel = false
       }else if(this.$route.query.data){
@@ -1323,5 +1326,8 @@ export default {
 .el-icon-full-screen:before {
   content: "\e719";
 }
+.app-container ::v-deep .el-form-item {
+  margin-bottom: 4px;
+}
 </style>
 

+ 14 - 15
src/views/purchaseIssue/index.vue

@@ -330,8 +330,16 @@ export default {
           onabort: '',
           disabled: false,
           changeable: 1
-        }, {
+        },{
           surface: '3',
+          label: 'fCurrencyName',
+          name: '规格',
+          checked: 0,
+          width: 100,
+          onabort: '',
+          disabled: false,
+        }, {
+          surface: '4',
           label: 'fUnitprice',
           name: '单价',
           checked: 0,
@@ -340,7 +348,7 @@ export default {
           onabort: 'this.value=this.value.replace(/[^\\-?\\d.]/g,"").replace(/^(\\-)*(\\d+)\\.(\\d\\d).*$/, "$1$2.$3")',
           changeable: 2
         }, {
-          surface: '4',
+          surface: '5',
           label: 'fPurchase',
           name: '数量',
           checked: 0,
@@ -349,7 +357,7 @@ export default {
           disabled: false,
           changeable: 2
         }, {
-          surface: '5',
+          surface: '6',
           label: 'fQty',
           name: '实际数量',
           checked: 0,
@@ -358,7 +366,7 @@ export default {
           disabled: false,
           changeable: 2
         }, {
-          surface: '6',
+          surface: '7',
           label: 'fFeeunitid',
           name: '计量单位',
           checked: 0,
@@ -366,16 +374,7 @@ export default {
           onabort: '',
           disabled: false,
           changeable: 1
-        }, {
-          surface: '7',
-          label: 'fCurrencyName',
-          name: '规格型号',
-          checked: 0,
-          width: 100,
-          onabort: '',
-          disabled: false,
-          changeable: 1
-        }, {
+        },  {
           surface: '8',
           label: 'fAmount',
           name: '金额',
@@ -775,7 +774,7 @@ export default {
         for (let li in this.listData.fFeeid) {
           if (this.contentList[item].fFeeid == this.listData.fFeeid[li].value) {
             this.$set(this.contentList[item], 'fFeeunitid', this.listData.fFeeid[li].fFeeunitid)
-            this.$set(this.contentList[item], 'fCurrencyName', this.listData.fFeeid[li].fFeeunitid)
+            this.$set(this.contentList[item], 'fCurrencyName', this.listData.fFeeid[li].fCurrency)
           }
         }
       }

+ 275 - 0
src/views/reportAnalysis/inoutStatistics.vue

@@ -0,0 +1,275 @@
+<template>
+  <div class="app-container">
+    <formComponent
+      :formOption="formOption"
+      :dataList="dataList"
+      :inDex="inDex"
+      ref="avatar"
+      @submitForm="submitForm"
+      @returnToForm="returnToForm"
+    />
+    <listComponent
+      :tableData="tableData"
+      @modify="modification"
+      @deletion="deletion"
+      @buttonList="buttonList"
+      @showSearch="showSearch"
+      @feedback="feedback"
+      @getList="getList"
+      :hasPermi="hasPermi"
+      :isItHidden="isItHidden"
+      :customButton="customButton"
+      :listStyle="listStyle"
+      :queryList="queryList"
+      :setRowList="setRowList"
+      :tatolLabel="tatolLabel"
+    />
+    <el-pagination
+      style="float: right;margin-top: 10px"
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :page-sizes="[10, 20, 30, 50]"
+      :page-size="this.formDataList.pageSize"
+      background
+      layout="sizes, prev, pager, next"
+      :total="total">
+    </el-pagination>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'salesStatistics',
+  data(){
+    return{
+      tatolLabel:['数量'],
+      dataList:{},
+      tableData:[],
+      setRowList:[],
+      isItHidden: true,
+      queryList: {
+        tableName: '出入库统计',
+        columnList: []
+      },
+      hasPermi:{
+        lookup:['anpin:stockControl:query'],
+        disappear:['anpin:stockControl:remove']
+      },
+      customButton: [
+        {
+          type: 'primary',
+          size: 'mini',
+          icon: 'el-icon-edit',
+          name: '导出',
+          disabled: false,
+          hasPermi:['anpin:stockControl:anPingApply']
+        }],
+      inDex: 4,
+      total:0,
+      formDataList:{
+        pageSize:10,
+        pageNum:1,
+      },
+      listStyle: [
+        {
+          surface: '1',
+          label: 'serialNumber',
+          name: '序号',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },{
+          surface: '2',
+          label: 'fBillno',
+          name: '进货时间',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },{
+          surface: '3',
+          label: 'fBillno',
+          name: '产品名称',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '4',
+          label: 'fBillno',
+          name: '规格',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '2',
+          label: 'fBillno',
+          name: '数量',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '2',
+          label: 'fBillno',
+          name: '供货商',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '2',
+          label: 'fBillno',
+          name: '供货人',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '2',
+          label: 'fBillno',
+          name: '联系电话',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '2',
+          label: 'fBillno',
+          name: '生产日期或批号',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '2',
+          label: 'fBillno',
+          name: '保质期限',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '2',
+          label: 'fBillno',
+          name: '保存条件',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '2',
+          label: 'fBillno',
+          name: '索证索票',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '2',
+          label: 'fBillno',
+          name: '采购人',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '2',
+          label: 'fBillno',
+          name: '感官',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '2',
+          label: 'fBillno',
+          name: '数量',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        },
+        {
+          surface: '2',
+          label: 'fBillno',
+          name: '验收人',
+          checked: 0,
+          width: 100,
+          onabort: ''
+        }
+        ],
+      formOption:[
+        {
+          span: 6,
+          label: 'fBillno',
+          name: '申请编号',
+          inputType: 2,
+          width: 200,
+          labelSize: '80',
+          rules: [{ required: false, message: ' ' }]
+        }
+      ]
+    }
+  },
+  created() {
+    this.queryList.columnList = this.listStyle
+  },
+  methods:{
+    //修改
+    modification(scope) {
+      console.log(scope)
+    },
+    //删除
+    deletion(scope){},
+    //所以按钮
+    buttonList(row){
+      console.log(row)
+    },
+    // 显示搜索条件、点击后会调用此方法
+    showSearch() {
+      console.log('到我了')
+      this.searchWhether = !this.searchWhether
+    },
+    //搜索、重置、展开
+    feedback(res) {
+      console.log(res)
+      if (res == '展开') {
+        if (this.inDex == 4) {
+          this.inDex = this.formOption.length
+        } else {
+          this.inDex = 4
+        }
+      } else if (res == '搜索') {
+        this.$refs.avatar.submitForm()
+      } else if (res == '重置') {
+        this.$refs.avatar.form = {}
+        this.$refs.avatar.submitForm()
+      }
+    },
+    //点击刷新会调用此方法
+    getList() {
+      console.log('到我了2')
+    },
+    submitForm() {
+      console.log(this.$refs.avatar.form)
+      this.formDataList = this.$refs.avatar.form
+    },
+    returnToForm(row) {
+      console.log(row, 111)
+    },
+    //分页
+    handleSizeChange(val) {
+      this.formDataList.pageSize = val
+      this.query(this.formDataList)
+    },
+    handleCurrentChange(val) {
+      this.formDataList.pageNum = val
+      this.query(this.formDataList)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 4 - 13
src/views/warehouse/inStock/index.vue

@@ -381,7 +381,8 @@ export default {
           name: "操作",
           checked: 0,
           width: 200,
-          operation:1
+          operation:1,
+          fixed:'right'
         }
 
       ],
@@ -408,9 +409,7 @@ export default {
           label: "fCurrencyName",
           name: "规格",
           checked: 0,
-          width: 200,
-          changeable:1,
-          data:[],
+          width: 100,
         },
         {
           surface: "4",
@@ -459,9 +458,6 @@ export default {
           checked: 0,
           width: 100,
           operation:2,
-          changeable: 2,
-          disabled: true,
-          doNot:'1'
         },{
           surface: "9",
           label: "fStltypeid",
@@ -554,9 +550,6 @@ export default {
           checked: 0,
           width: 100,
           operation:2,
-          changeable: 3,
-          disabled:true,
-          doNot:'1'
         },
         {
           surface: "18",
@@ -565,9 +558,6 @@ export default {
           checked: 0,
           width: 100,
           operation:2,
-          changeable: 2,
-          disabled:true,
-          doNot:'1'
         },{
           surface: "19",
           label: "fMaterial10",
@@ -1253,6 +1243,7 @@ export default {
         for(let li in this.detailOption) {
           if(this.detailOption[li].name == '供应商'){
             if(this.detailOption[li].disabled == true){
+              this.inDex = 4
               this.getList();
               this.MainTable = false
             } else {

+ 3 - 13
src/views/warehouse/outStock/index.vue

@@ -396,12 +396,11 @@ export default {
           onabort:''
         },{
           surface: "2",
-          label: "fCurrencyName",
+          label: "fFeeid",
           name: "品名",
           checked: 0,
           width: 200,
           changeable:1,
-          data:[],
         },
         {
           surface: "3",
@@ -409,8 +408,6 @@ export default {
           name: "规格",
           checked: 0,
           width: 100,
-          changeable:1,
-          data:[],
         },
         {
           surface: "4",
@@ -459,9 +456,6 @@ export default {
           checked: 0,
           width: 100,
           operation:2,
-          changeable: 2,
-          disabled: true,
-          doNot:'1'
         },{
           surface: "9",
           label: "fStltypeid",
@@ -554,9 +548,6 @@ export default {
           checked: 0,
           width: 100,
           operation:2,
-          changeable: 3,
-          disabled:true,
-          doNot:'1'
         },
         {
           surface: "12",
@@ -565,9 +556,6 @@ export default {
           checked: 0,
           width: 100,
           operation:2,
-          changeable: 2,
-          disabled:true,
-          doNot:'1'
         },{
           surface: "13",
           label: "fMaterial10",
@@ -1001,6 +989,7 @@ export default {
       //获取品名
       let queryParams = { pageNum: 1 }
       getGoodName(queryParams).then(res=>{
+        console.log(res)
         for(let item in res.rows){
           this.listData.fFeeid.push({
             label:res.rows[item].fName,
@@ -1248,6 +1237,7 @@ export default {
       for(let li in this.detailOption) {
         if(this.detailOption[li].name == '供应商'){
           if(this.detailOption[li].disabled == true){
+            this.inDex = 4
             this.getList();
             this.MainTable = false
           } else {