Переглянути джерело

产品价格库和外协价格库

yuhan 1 рік тому
батько
коміт
75d0d9f486

+ 73 - 72
src/views/module_kzks/costModelProductPrice/CostModelProductPriceList.vue

@@ -263,8 +263,8 @@
             title:'已收款',
             align:"center",
             dataIndex: 'taskmoney',
-            scopedSlots: {
-              customRender: 'taskmoney',
+            customRender: (text, record) => {
+              return (Number(text)/10000).toFixed(2)
             },
             // customCell: this.getClickColumn,
           },
@@ -272,54 +272,55 @@
             title:'合同额',
             align:"center",
             dataIndex: 'contractfpe',
-            scopedSlots: {
-              customRender: 'contractfpe',
-            },
-            // customCell: this.getClickColumn,
-          },
-          {
-            title:'预估价',
-            align:"center",
-            dataIndex: 'estimationcoat',
             customRender: (text, record) => {
-              return record.contractfpe ? '-' : Number(text).toFixed(2)
-            },
-          },
-          {
-            title:'总成本',
-            align:"center",
-            dataIndex: 'zcb',
-            customRender: (text) => {
-              return (Number(text)/10000).toFixed(2)
-            },
-          },
-          {
-            title:'利润额',
-            align:"center",
-            dataIndex: 'lre',
-            customRender: (text) => {
               return (Number(text)/10000).toFixed(2)
             },
+            // customCell: this.getClickColumn,
           },
-          {
-            title:'利润率',
-            align:"center",
-            dataIndex: 'lrl',
-            customRender: (text) => {
-              return (Number(text) * 100).toFixed(1) + '%'
-            },
-          },
-          {
-            title:'研制数量',
-            align:"center",
-            dataIndex: 'yzsl'
-          },
+          // {
+          //   title:'预估价',
+          //   align:"center",
+          //   dataIndex: 'estimationcoat',
+          //   customRender: (text, record) => {
+          //     return record.contractfpe ? '-' : Number(text).toFixed(2)
+          //   },
+          // },
+          // {
+          //   title:'总成本',
+          //   align:"center",
+          //   dataIndex: 'zcb',
+          //   customRender: (text) => {
+          //     return (Number(text)/10000).toFixed(2)
+          //   },
+          // },
+          // {
+          //   title:'利润额',
+          //   align:"center",
+          //   dataIndex: 'lre',
+          //   customRender: (text) => {
+          //     return (Number(text)/10000).toFixed(2)
+          //   },
+          // },
+          // {
+          //   title:'利润率',
+          //   align:"center",
+          //   dataIndex: 'lrl',
+          //   customRender: (text) => {
+          //     return (Number(text) * 100).toFixed(1) + '%'
+          //   },
+          // },
+          // {
+          //   title:'研制数量',
+          //   align:"center",
+          //   dataIndex: 'yzsl'
+          // },
           {
             title:'单台利润',
             align:"center",
             dataIndex: 'oneProfit',
             customRender: (text, record) => {
-              return record.id === 'amount'?null:(Number(text)/10000).toFixed(2)
+              // return record.id === 'amount'?null:(Number(text)/10000).toFixed(2)
+              return (Number(text)/10000).toFixed(2)
             },
           },
           {
@@ -327,7 +328,7 @@
             align:"center",
             dataIndex: 'oneIncome',
             customRender: (text, record) => {
-              return record.id === 'amount'?null:(Number(text)/10000).toFixed(2)
+              return (Number(text)/10000).toFixed(2)
             },
           },
           {
@@ -335,23 +336,23 @@
             align:"center",
             dataIndex: 'oneCost',
             customRender: (text, record) => {
-              return record.id === 'amount'?null:(Number(text)/10000).toFixed(2)
-            },
-          },
-          {
-            title:'材料预算',
-            align:"center",
-            dataIndex: 'clys',
-            customRender: (text) => {
-              return Number(text).toFixed(2)
+              return (Number(text)/10000).toFixed(2)
             },
           },
+          // {
+          //   title:'材料预算',
+          //   align:"center",
+          //   dataIndex: 'clys',
+          //   customRender: (text) => {
+          //     return Number(text).toFixed(2)
+          //   },
+          // },
           {
             title:'材料费',
             align:"center",
             dataIndex: 'clf',
-            scopedSlots: {
-              customRender: 'clf',
+            customRender: (text, record) => {
+              return (Number(text)/10000).toFixed(2)
             },
             // customCell: this.getClickColumn,
           },
@@ -359,8 +360,8 @@
             title:'专用费',
             align:"center",
             dataIndex: 'zyf',
-            scopedSlots: {
-              customRender: 'zyf',
+            customRender: (text, record) => {
+              return (Number(text)/10000).toFixed(2)
             },
             // customCell: this.getClickColumn,
           },
@@ -368,25 +369,25 @@
             title:'事务费',
             align:"center",
             dataIndex: 'swf',
-            scopedSlots: {
-              customRender: 'swf',
+            customRender: (text, record) => {
+              return (Number(text)/10000).toFixed(2)
             },
             // customCell: this.getClickColumn,
           },
-          {
-            title:'外协预算',
-            align:"center",
-            dataIndex: 'wxys',
-            customRender: (text) => {
-              return Number(text).toFixed(2)
-            },
-          },
+          // {
+          //   title:'外协预算',
+          //   align:"center",
+          //   dataIndex: 'wxys',
+          //   customRender: (text) => {
+          //     return Number(text).toFixed(2)
+          //   },
+          // },
           {
             title:'外协费',
             align:"center",
             dataIndex: 'wxf',
-            scopedSlots: {
-              customRender: 'wxf',
+            customRender: (text, record) => {
+              return (Number(text)/10000).toFixed(2)
             },
             // customCell: this.getClickColumn,
           },
@@ -426,8 +427,8 @@
             title:'装机成本',
             align:"center",
             dataIndex: 'zjcb',
-            scopedSlots: {
-              customRender: 'zjcb',
+            customRender: (text, record) => {
+              return (Number(text)/10000).toFixed(2)
             },
             // customCell: this.getClickColumn,
           },
@@ -440,9 +441,9 @@
             title:'工时(h)',
             align:"center",
             dataIndex: 'workhour',
-            scopedSlots: {
-              customRender: 'workhour',
-            },
+            // scopedSlots: {
+            //   customRender: 'workhour',
+            // },
             // customCell: this.getClickColumn,
           },
           {

Різницю між файлами не показано, бо вона завелика
+ 1472 - 0
src/views/module_kzks/costModelWxContract/CostModelWxContractList.vue


Різницю між файлами не показано, бо вона завелика
+ 1112 - 0
src/views/module_kzks/costModelWxContract/modules/CostModelWxContractForm.vue


+ 84 - 0
src/views/module_kzks/costModelWxContract/modules/CostModelWxContractModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <cost-model-wx-contract-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></cost-model-wx-contract-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import CostModelWxContractForm from './CostModelWxContractForm'
+
+  export default {
+    name: 'CostModelWxContractModal',
+    components: {
+      CostModelWxContractForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/module_kzks/costModelWxContract/modules/CostModelWxContractModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <cost-model-wx-contract-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></cost-model-wx-contract-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import CostModelWxContractForm from './CostModelWxContractForm'
+  export default {
+    name: 'CostModelWxContractModal',
+    components: {
+      CostModelWxContractForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>