Explorar el Código

改了一点家装表格

mushencc hace 3 años
padre
commit
aace3d8e7c

+ 2 - 2
src/routerMap/index.js

@@ -1736,7 +1736,7 @@ const routerMap = [
   },
   {
     path: "/cms/leadMatch/weightMemo/BSTedit",
-    name: "WeightMemoEdit", //码单列表-->新增/编辑/查看(倍思特)
+    name: "BSTWeightMemoEdit", //码单列表-->新增/编辑/查看(倍思特)
     meta: {
       index: 3,
     },
@@ -1745,7 +1745,7 @@ const routerMap = [
   },
   {
     path: "/cms/leadMatch/weightMemo/HXYedit",
-    name: "WeightMemoEdit", //码单列表-->新增/编辑/查看(华信源)
+    name: "HXYWeightMemoEdit", //码单列表-->新增/编辑/查看(华信源)
     meta: {
       index: 3,
     },

+ 146 - 43
src/views/OrderMannage/BusinessOrderlist/confirm.vue

@@ -211,6 +211,13 @@
           max-height="500px"
           :data="tableData"
            align="center"
+           :tooltip-config="{contentMethod:({row,column})=>{
+             if(column.title==='附加项'){
+                  return ''
+             }
+           }}"
+           show-footer
+           :footer-method="footerMethod"
           :column-config="{resizable: true}"
             :edit-config="type == 3 ? {} : { trigger: 'click', mode: 'row' }">
                    <!-- ///////////////////////////////////////////////////////////////////////////////////////////// -->
@@ -273,16 +280,11 @@
                 label-in-value
                 v-model="row.select_all_id"
                 @on-change="
-                  handleSelectProductMetail(
-                    row,
-                    rowIndex,
-                    $event,
-                    scope
-                  )
+                  handleSelectProductMaterial($event,rowIndex)
                 "
               >
                 <Option
-                  v-for="item in product_metailList"
+                  v-for="item in product_materialList"
                   :tag="item.key"
                   :value="item.key"
                   :label="item.title"
@@ -291,19 +293,7 @@
               </Select>
               </template>
                <template #default="{ row }">{{
-              row.is_metal
-                ? getSelectedLabel(
-                    row.select_all_id,
-                    product_metailList,
-                    "key",
-                    "title"
-                  )
-                : getSelectedLabel(
-                    row.select_all_id,
-                    product_metailList,
-                    "key",
-                    "title"
-                  )
+                row.select_all_title
             }}</template>
             </vxe-column>
            
@@ -447,19 +437,13 @@
            <vxe-column field="total_num" title="数量" min-width="80" :edit-render="{}"
           >
             <template #edit="scope">
-              <Input
-                v-if="!scope.row.is_metal"
+                <Input
                 v-model="scope.row.total_num"
-                @on-change="(e) => changeEditTotalNum(e, scope.row)"
-              />
-              <Input
-                v-else
-                v-model="scope.row.num"
                 @on-change="(e) => changeEditMetalNum(e, scope.row)"
               />
             </template>
             <template #default="scope">
-              {{ scope.row.is_metal ? scope.row.num : scope.row.total_num }}
+              {{scope.row.total_num }}
             </template>
           </vxe-column>
              <!-- ///////////////////////////////////////////////////////////////////////// -->
@@ -512,7 +496,7 @@
                     label-in-value
                     size="small"
                     v-model="ext_detail.id"
-                    @on-change="(e) => changeEditExt(ext_detail, e, scope.row,scope.row.extArray,idx)"
+                    @on-change="(e) => changeEditExt(e,idx,scope.rowIndex)"
                     style="width: 100px"
                   >
                     <Option
@@ -533,9 +517,7 @@
                     @click="
                       handleExtraDele(
                         scope.row.extArray,
-                        ext_detail,
-                        idx,
-                        scope.row
+                        idx
                       )
                     "
                     color="#FF5E5C"
@@ -544,7 +526,7 @@
                     type="md-remove-circle"
                   />
                 </div>
-              </div>
+                </div>
             </template>
             <template #default="scope">
               <Tooltip
@@ -562,10 +544,7 @@
                     <div style="display:flex;justify-content: space-between;">
                       <div style="width:120px">
                         {{
-                          extList.filter((v) => v.id == _item.ext_id).length > 0
-                            ? extList.filter((v) => v.id == _item.ext_id)[0]
-                                .title
-                            : ""
+                          _item.title
                         }}
                       </div>
                       <div style="width:80px">数量:{{ _item.num }}</div>
@@ -577,7 +556,8 @@
                     </div>
                   </div>
                 </span>
-                {{
+                <span>
+                   {{
                   scope.row.extArray
                     ? scope.row.extArray
                         .filter((v) => v.type == 2)
@@ -585,6 +565,8 @@
                         .join("/")
                     : ""
                 }}
+                </span>
+               
               </Tooltip>
             </template>
           </vxe-column>
@@ -846,6 +828,7 @@
   export default {
     data() {
       return {
+        extList:[],
         processOption:{value:'id',label:'title'},
         productList:[],//modal里面产品的下拉
         fax:0,//客户的折扣金额;
@@ -864,7 +847,7 @@
         part_type_total:[],
         measure_total:[],
         bpp_list:[],
-        product_metailList:[],
+        product_materialList:[],
         type:'',
         formSetTableData: [
         {
@@ -1023,7 +1006,14 @@
         },
       ],
        tableData:[
-              { id: 10001, name: 'Test1', nickname: 'T1', role: 'Develop', sex: '0', sex2: ['0'], num1: 40, age: 28, address: 'Shenzhen', date12: '', date13: '' ,is_metal:false},
+              { id: 10001, name: 'Test1', nickname: 'T1', role: 'Develop', sex: '0', sex2: ['0'], num1: 40, age: 28, address: 'Shenzhen', date12: '', date13: '' ,is_metal:false,extArray:[{ num: 0,
+        price: 0,
+        total_price: 0,
+        type:2,
+        remark: "",
+        title: "",
+        id: "2",
+        is_metal: true,}]},
               // { id: 10002, name: 'Test2', nickname: 'T2', role: 'Designer', sex: '1', sex2: ['0', '1'], num1: 20, age: 22, address: 'Guangzhou', date12: '', date13: '2020-08-20' },
               // { id: 10003, name: 'Test3', nickname: 'T3', role: 'Test', sex: '0', sex2: ['1'], num1: 200, age: 32, address: 'Shanghai', date12: '2020-09-10', date13: '' },
               // { id: 10004, name: 'Test4', nickname: 'T4', role: 'Designer', sex: '1', sex2: ['1'], num1: 30, age: 23, address: 'Shenzhen', date12: '', date13: '2020-12-04' }
@@ -1074,6 +1064,12 @@
       };
     },
     created(){
+       // 获取附加列表
+    this.axios.get("/api/project_ext_list").then((res) => {
+      if (res.code == 200) {
+        this.extList = res.data.data;
+      }
+    });
       //获取部件分类
     this.axios.get("/api/basics_parts_index").then((res) => {
          res.data.data.map((v, k) => {
@@ -1131,6 +1127,96 @@
     this.getProducts();
     },
     methods: {
+      getMaterialName(row){
+          console.log(row)
+      },
+      handleSelectProductMaterial(e,index){//选择产品名称五金
+      this.tableData[index].select_all_title = e.label
+       let obj = {
+          select_all_id: "", //产品五金ID
+          product_id: "", //产品ID
+          type_name: "", //展示用产品名称
+          position: "", //位置
+          over_price: "", //超标单价
+          over_price_total:"",//超标总价
+          unit_price: "", //单价
+          ext_price: "", //附加金额
+          price: "", //总金额
+          remark: "", //备注
+          measurement: "", //测量字段拼接
+          total_num: "", //数量
+          num: "", //核算数量
+          num_formula: "", //核算数量公式
+          url_number: "", //图号
+          url: [], //图纸
+          unit: "", //单位
+          title: "", //产品名
+          process: "", //工艺属性拼接
+          procedure_properties: {}, //工艺属性对象
+          overdraft: [], //超标公式
+          measure: this._measure, //测量字段数组
+          support_remark: this.support_remark, //备注列表
+          is_metal: false,
+          extArray: [
+            {
+              num: 0,
+              price: 0,
+              total_price: 0,
+              type: 2,
+              remark: "",
+              title: "",
+              id: "",
+              is_metal: true,
+            },
+          ],
+          // process_obj: JSON.parse(JSON.stringify(this.process_obj)), //工艺属性含选项对象
+        };
+           this.tableData.push(obj);
+      },
+         footerMethod({ columns, data }) {
+      return [
+        columns.map((column, columnIndex) => {
+          if (columnIndex === 0) {
+            return "合计";
+          }
+          if (column.title == "附加金额") {
+            let sum = 0;
+            data.map((v) => {
+            sum += v.ext_price?v.ext_price * 1:0;
+            });
+            return sum;
+          }
+          if (column.title == "总金额") {
+            let sum = 0;
+            data.map((v) => {
+             sum += v.price?v.price * 1:0;
+            });
+            this.info.predict_price = sum.toFixed(2);
+            return sum.toFixed(2);
+          }
+          return null;
+        }),
+      ];
+    },
+      handleExtraDele(arr,index){
+        arr.splice(index,1)
+      },
+       handleExtraAdd(array, type) {
+      array.push({
+        num: 0,
+        price: 0,
+        total_price: 0,
+        type,
+        remark: "",
+        title: "",
+        id: "",
+        is_metal: true,
+      });
+      this.$forceUpdate();
+    },
+      changeEditExt(e,idx,index){
+          this.tableData[index].extArray[idx].title = e.label
+      },
        getProducts() {
       this.axios("/api/product").then((res) => {
         this.productList = res.data.data;
@@ -1140,7 +1226,7 @@
         });
       });
       this.axios("/api/get_select_all").then((res) => {
-        this.product_metailList = res.data;
+        this.product_materialList = res.data;
       });
     },
       addressChange(e){
@@ -1327,9 +1413,16 @@
       handleRemarkCreate(){
 
       },
-      changeExtPrice(){
+     changeExtPrice(e, product){
 
-      },
+  product.ext_price = e.target.value * 1;
+      product.price =
+        (product.unit_price * 1 || 0) * (product.num * 1 || 1) +
+        (product.over_price_total * 1 || 0) +
+        (product.ext_price * 1 || 0);
+      product.price = product.price.toFixed(2);
+      
+    },
       handleMetailPriceChange(){
 
       },
@@ -1498,4 +1591,14 @@
   top: 0px;
   color: red;
 }
+::v-deep .vxe-table--render-default .vxe-body--column.col--ellipsis>.vxe-cell {
+  padding: 0!important;
+  max-height: none;
+
+}
+/deep/.ivu-tooltip-rel {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
 </style>

+ 6 - 0
src/views/PayrollRequisition/detail.vue

@@ -346,6 +346,10 @@ export default {
         if(this.state==0||this.state==2){
           this.show_submit = true;
         }else{
+            this.confirmDelete({
+        title:'确认?',
+        content: "确认审批?",
+        then: () => {
              this.axios.post('/api/payment_check',{payment_no:[this.$route.query.payment_no],id:JSON.parse(localStorage.getItem('user_info')).id,state:this.state}).then(res=>{
                               if(res.code==200){
                         this.$Message.success(res.msg);
@@ -354,6 +358,8 @@ export default {
         }
         )
         }
+            })
+        }
       },
       submit(){
           if(!this.check_id){

+ 6 - 0
src/views/PayrollRequisition/edit.vue

@@ -341,6 +341,10 @@ export default {
         if(this.state==0||this.state==2){
           this.show_submit = true;
         }else{
+            this.confirmDelete({
+        title:'确认?',
+        content: "确认审批?",
+        then: () => {
              this.axios.post('/api/payment_check',{payment_no:[this.$route.query.payment_no],id:JSON.parse(localStorage.getItem('user_info')).id,state:this.state}).then(res=>{
                               if(res.code==200){
                         this.$Message.success(res.msg);
@@ -349,6 +353,8 @@ export default {
         }
         )
         }
+            })
+        }
       },
       submit(){
         this.axios.post('/api/payment_check',{payment_no:[this.$route.query.payment_no],id:this.check_id,state:this.state}).then(res=>{

+ 1 - 1
src/views/PurchasingManage/DeliveryOutWarehouse/list.vue

@@ -95,7 +95,7 @@ export default {
            this.initData(obj);
          },
       goPage(row){
-            this.$router.push({path:'/cms/PurchasingManage/DeliveryOutWarehouse/detail',query:{id:row.id,warehouse_time:Date.parse(row.warehouse_time).toString().slice(0,10)}})
+            this.$router.push({path:'/cms/PurchasingManage/DeliveryOutWarehouse/detail',query:{id:row.id,warehouse_time:row.warehouse_time}})
       },
       initData(row){ 
         this.proxyData = row;

+ 1 - 1
src/views/PurchasingManage/InstockOrder/detail.vue

@@ -251,7 +251,7 @@ export default {
                         return;
                     }
                     const values = data.map(item => Number(item[key]));
-                    if (key === 'num'||key==='no_tax_total_price'||key==='tax_total_price'||key==='total') {
+                    if (key === 'num'||key==='no_tax_total_price'||key==='tax_total_price'||key==='total'||key==='transport_price') {
                         const v = values.reduce((prev, curr) => {
                             const value = Number(curr);
                             if (!isNaN(value)) {

+ 7 - 3
src/views/PurchasingManage/InstockOrder/edit.vue

@@ -316,7 +316,7 @@
           >
         </template>
         <template slot="total_cost" slot-scope="{ row }">
-          <span v-show="row.no_tax_total_price*1+row.transport_price*1>0">{{row.no_tax_total_price*1+row.transport_price*1}}</span>
+          <span v-show="row.no_tax_total_price*1+row.transport_price*1>0">{{(row.no_tax_total_price*1+row.transport_price*1).toFixed(2)}}</span>
         </template>
         <!-- :disabled="row.state==0" -->
         <!-- :disabled="row.state==0" -->
@@ -1089,6 +1089,7 @@ export default {
                     "on-change": (e) => {
                       currentRow.is_upd = true;
                       currentRow.no_tax_total_price = e.target.value;
+                      currentRow.total_cost = (currentRow.transport_price*1+currentRow.no_tax_total_price*1).toFixed(2);
                       currentRow.no_tax_price = currentRow.num
                         ? (
                             (currentRow.no_tax_total_price * 1) /
@@ -1296,7 +1297,7 @@ export default {
         },
         {
           title: "运费",
-          key: "transportu_price",
+          key: "transport_price",
           align: "center",
           minWidth: 120,
           render: (h, params) => {
@@ -1318,6 +1319,7 @@ export default {
                     "on-change": (e) => {
                       currentRow.is_upd = true;
                       currentRow.transport_price = e.target.value;
+                      currentRow.total_cost = (currentRow.transport_price*1+currentRow.no_tax_total_price*1).toFixed(2);
                       this.tableData.splice(index, 1, currentRow);
                     },
                     "on-focus": () => {
@@ -1999,7 +2001,9 @@ export default {
           key === "num" ||
           key === "no_tax_total_price" ||
           key === "tax_total_price" ||
-          key === "total" 
+          key === "total" ||
+          key === "total_cost"||
+          key === 'transport_price'
         ) {
           const v = values.reduce((prev, curr) => {
             const value = Number(curr);

+ 8 - 3
src/views/PurchasingManage/extraCosts/edit.vue

@@ -522,7 +522,8 @@ export default {
             }
         },
         back(){
-           this.$Modal.confirm({
+          if(this.type!=3){
+             this.$Modal.confirm({
                     title: '是否确认取消',
     
                     onOk: () => {
@@ -531,6 +532,10 @@ export default {
                     onCancel: () => {
                     }
                 });
+          }else{
+                  this.$router.go(-1);
+          }
+          
             
         },
         postData(){
@@ -543,14 +548,14 @@ export default {
                 this.axios.post('/api/cost_add',{...obj,children:arr}).then(res=>{
                    if(res.code==200){
                        this.$Message.success(res.msg);
-                       this.back();
+                       this.$router.go(-1);
                    }
                })
             }else{
                  this.axios.post('/api/cost_edit',{...obj,children:arr}).then(res=>{
                    if(res.code==200){
                        this.$Message.success(res.msg);
-                       this.back();
+                       this.$router.go(-1);
                    }
                })
             }

+ 4 - 4
src/views/PurchasingManage/extraCosts/list.vue

@@ -13,11 +13,11 @@
        <div class="content">
        <Form class="form_content" :label-width='120'>
            <FormItem label='费用单据号:'>
-               <Input class="form_item" placeholder="请搜" v-model="searchData.cost_no" clearable/>
+               <Input class="form_item" placeholder="请搜" v-model="searchData.cost_no" clearable/>
            </FormItem>
            <FormItem label='相关项目'>
-              <Select class="form_item" v-model="searchData.order_no" filterable clearable>
-                  <Option v-for="(item,index) in projectTitleList" :key="index" :value="item.order_no" :label="item.project_title"></Option>
+              <Select class="form_item" v-model="searchData.project_name" filterable clearable>
+                  <Option v-for="(item,index) in projectTitleList" :key="index" :value="item.project_title" :label="item.project_title"></Option>
                </Select>
            </FormItem>
            <FormItem label='制单人:'>
@@ -87,7 +87,7 @@ export default {
             loading:false,
             searchData:{
                 cost_no:'',
-                order_no:'',
+                project_name:'',
                 crt_id:'',
                 state:"",
                 check_id:'',

+ 1 - 1
src/views/leadMatch/weightMemo/HXYedit.vue

@@ -353,7 +353,7 @@ export default {
                                        });
                                         }
                                 }
-                            }}):h('span',{},row.skin);
+                            }}):h('span',{},row.skin==1?'单':row.skin==2?'双':'素板');
                         } },
                           { title: "封边", key: "band", align: "center",resizable: true,
                         width: 140,render:(h,params)=>{

+ 2 - 2
vue.config.js

@@ -1,8 +1,8 @@
 const axios_default_ip =
   process.env.NODE_ENV == "dev"
-    ? "http://121.41.102.225:82"
+    ? "http://124.71.176.88:882"
     : process.env.NODE_ENV == "test-prd"
-    ? "http://hxy_api.qingyaokeji.com" //测试服
+    ? "http://121.41.102.225:82" //测试服
     : process.env.NODE_ENV == "prd_other"
     ? "http://121.37.173.82:82" //贝斯特
     : "http://124.71.176.88:882";