Browse Source

新增规格

wengyuwen 4 years ago
parent
commit
225d32c05b

+ 29 - 11
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:''
@@ -903,8 +909,9 @@ export default {
     },
     homePage(){
       let date = this.$route.query
-      console.log(date)
+      console.log(this.$route.query.list)
       if (this.$route.query.list){
+        this.cancelButton = false;
         let scope = {
           row:{
             fId:JSON.parse(this.$route.query.data).billId
@@ -912,6 +919,10 @@ export default {
         }
         this.handleUpdate(scope.row)
         this.approvedBy = true
+      }else{
+        this.mainTabel = false
+        this.cancelButton = true
+        this.approvedBy = false
       }
     },
     // 查看审批流
@@ -956,15 +967,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) {
@@ -1011,6 +1026,7 @@ export default {
     handleUpdate(row, res) {
       const fId = row.fId || this.ids
       getChange(fId).then(response => {
+        console.log("111")
         if (response.data.projectItemsList) {
           this.detailform = response.data.tProject
           this.operator = this.detailform.createBy
@@ -1024,7 +1040,6 @@ export default {
         }
         console.log(this.detailform.fBillstatus)
         if(this.detailform.fBillstatus >= 4){
-          console.log("111")
           this.doNot = true
           this.doNotchange = true
         }else{
@@ -1323,5 +1338,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

@@ -331,8 +331,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,
@@ -341,7 +349,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,
@@ -350,7 +358,7 @@ export default {
           disabled: false,
           changeable: 2
         }, {
-          surface: '5',
+          surface: '6',
           label: 'fQty',
           name: '实际重量',
           checked: 0,
@@ -359,7 +367,7 @@ export default {
           disabled: false,
           changeable: 2
         }, {
-          surface: '6',
+          surface: '7',
           label: 'fFeeunitid',
           name: '计量单位',
           checked: 0,
@@ -367,16 +375,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: '金额',
@@ -776,7 +775,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)
           }
         }
       }

+ 2 - 12
src/views/warehouse/inStock/index.vue

@@ -408,9 +408,7 @@ export default {
           label: "fCurrencyName",
           name: "规格",
           checked: 0,
-          width: 200,
-          changeable:1,
-          data:[],
+          width: 100,
         },
         {
           surface: "4",
@@ -459,9 +457,6 @@ export default {
           checked: 0,
           width: 100,
           operation:2,
-          changeable: 2,
-          disabled: true,
-          doNot:'1'
         },{
           surface: "9",
           label: "fStltypeid",
@@ -554,9 +549,6 @@ export default {
           checked: 0,
           width: 100,
           operation:2,
-          changeable: 3,
-          disabled:true,
-          doNot:'1'
         },
         {
           surface: "18",
@@ -565,9 +557,6 @@ export default {
           checked: 0,
           width: 100,
           operation:2,
-          changeable: 2,
-          disabled:true,
-          doNot:'1'
         },{
           surface: "19",
           label: "fMaterial10",
@@ -1253,6 +1242,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 {

+ 2 - 2
vue.config.js

@@ -34,9 +34,9 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://192.168.1.143:9020`,
+        // target: `http://192.168.1.143:9020`,
         // target: `http://localhost:8080`,
-        // target: `https://ap.tubaosoft.com/prod-api/`,
+        target: `https://ap.tubaosoft.com/prod-api/`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''