Преглед изворни кода

项目材料+外协导入详情+外协价格库新增放开等

yuhan пре 1 година
родитељ
комит
be78ca5eba

+ 16 - 11
src/views/module_kzks/costModelClPrice/CostModelClPriceList.vue

@@ -43,11 +43,11 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-      <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> -->
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
       <a-button type="primary" icon="download" @click="handleExportXls('材料价格库')">导出</a-button>
-      <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
-      </a-upload> -->
+      </a-upload>
       <!-- 高级查询区域 -->
       <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
       <a-dropdown v-if="selectedRowKeys.length > 0">
@@ -178,14 +178,19 @@
             align:"center",
             dataIndex: 'danjia'
           },
-          // {
-          //   title: '操作',
-          //   dataIndex: 'action',
-          //   align:"center",
-          //   fixed:"right",
-          //   width:147,
-          //   scopedSlots: { customRender: 'action' }
-          // }
+          {
+            title:'采购时间',
+            align:"center",
+            dataIndex: 'caigouTime'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
         ],
         url: {
           list: "/costModelClPrice/costModelClPrice/list",

+ 5 - 5
src/views/module_kzks/costModelList/CostModelList.vue

@@ -118,8 +118,8 @@
       :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
       @cancel="handleCancel"
       cancelText="关闭">
-      <j-select-multi-user :returnKeys="returnKeys" placeholder="请选择指定用户" v-model="userIds" :trigger-change="true"></j-select-multi-user>
-      <j-select-user-by-dep placeholder="请选择消息接收方" v-model="receiver"></j-select-user-by-dep>
+      <!-- <j-select-multi-user :returnKeys="returnKeys" placeholder="请选择指定用户" v-model="userIds" :trigger-change="true"></j-select-multi-user> -->
+      <j-select-user-by-dep placeholder="请选择消息接收方" v-model="receiver">1111</j-select-user-by-dep>
     </j-modal>
 
   </a-card>
@@ -244,10 +244,10 @@
         dictOptions:{},
         superFieldList:[],
 
-        disableSubmit: false,
+        // returnKeys:['id', 'id'], //用户选择返回字段
+        // userIds:"",
         visibleInform: false,
-        returnKeys:['id', 'id'], //用户选择返回字段
-        userIds:"",
+        disableSubmit: false,
         receiver: "",
 
         inform: {}

+ 266 - 0
src/views/module_kzks/costModelXmxqCl/CostModelXmxqClList.vue

@@ -0,0 +1,266 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="物料编码">
+              <a-input placeholder="请输入物料编码" v-model="queryParam.wlbm"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="规格型号">
+              <a-input placeholder="请输入规格型号" v-model="queryParam.ggxh"></a-input>
+            </a-form-item>
+          </a-col>
+          <template v-if="toggleSearchStatus">
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="质量等级">
+                <a-input placeholder="请输入质量等级" v-model="queryParam.zlLevel"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="批次">
+                <a-input placeholder="请输入批次" v-model="queryParam.pici"></a-input>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('项目材料导入详情')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <cost-model-xmxq-cl-modal ref="modalForm" @ok="modalFormOk"></cost-model-xmxq-cl-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import CostModelXmxqClModal from './modules/CostModelXmxqClModal'
+
+  export default {
+    name: 'CostModelXmxqClList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      CostModelXmxqClModal
+    },
+    data () {
+      return {
+        description: '项目材料导入详情管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'项目ID',
+            align:"center",
+            dataIndex: 'xiangmuId'
+          },
+          {
+            title:'项目名称',
+            align:"center",
+            dataIndex: 'xiangmuName'
+          },
+          {
+            title:'物料编码',
+            align:"center",
+            dataIndex: 'wlbm'
+          },
+          {
+            title:'规格型号',
+            align:"center",
+            dataIndex: 'ggxh'
+          },
+          {
+            title:'质量等级',
+            align:"center",
+            dataIndex: 'zlLevel'
+          },
+          {
+            title:'批次',
+            align:"center",
+            dataIndex: 'pici'
+          },
+          {
+            title:'采购日期',
+            align:"center",
+            dataIndex: 'caigouTime',
+            customRender:function (text) {
+              return !text?"":(text.length>10?text.substr(0,10):text)
+            }
+          },
+          {
+            title:'单价',
+            align:"center",
+            dataIndex: 'danjia'
+          },
+          {
+            title:'数量',
+            align:"center",
+            dataIndex: 'number'
+          },
+          {
+            title:'价格(单价*数量)',
+            align:"center",
+            dataIndex: 'price'
+          },
+          {
+            title:'材料费类型',
+            align:"center",
+            dataIndex: 'clfType'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/costModelXmxqCl/costModelXmxqCl/list",
+          delete: "/costModelXmxqCl/costModelXmxqCl/delete",
+          deleteBatch: "/costModelXmxqCl/costModelXmxqCl/deleteBatch",
+          exportXlsUrl: "/costModelXmxqCl/costModelXmxqCl/exportXls",
+          importExcelUrl: "costModelXmxqCl/costModelXmxqCl/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'xiangmuId',text:'项目ID',dictCode:''})
+        fieldList.push({type:'string',value:'xiangmuName',text:'项目名称',dictCode:''})
+        fieldList.push({type:'string',value:'wlbm',text:'物料编码',dictCode:''})
+        fieldList.push({type:'string',value:'ggxh',text:'规格型号',dictCode:''})
+        fieldList.push({type:'string',value:'zlLevel',text:'质量等级',dictCode:''})
+        fieldList.push({type:'string',value:'pici',text:'批次',dictCode:''})
+        fieldList.push({type:'date',value:'caigouTime',text:'采购日期'})
+        fieldList.push({type:'string',value:'danjia',text:'单价',dictCode:''})
+        fieldList.push({type:'string',value:'number',text:'数量',dictCode:''})
+        fieldList.push({type:'string',value:'price',text:'价格(单价*数量)',dictCode:''})
+        fieldList.push({type:'string',value:'clfType',text:'材料费类型',dictCode:''})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 154 - 0
src/views/module_kzks/costModelXmxqCl/modules/CostModelXmxqClForm.vue

@@ -0,0 +1,154 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="项目ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xiangmuId">
+              <a-input v-model="model.xiangmuId" placeholder="请输入项目ID"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xiangmuName">
+              <a-input v-model="model.xiangmuName" placeholder="请输入项目名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wlbm">
+              <a-input v-model="model.wlbm" placeholder="请输入物料编码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="规格型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ggxh">
+              <a-input v-model="model.ggxh" placeholder="请输入规格型号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="质量等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zlLevel">
+              <a-input v-model="model.zlLevel" placeholder="请输入质量等级"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="批次" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pici">
+              <a-input v-model="model.pici" placeholder="请输入批次"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="采购日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="caigouTime">
+              <j-date placeholder="请选择采购日期" v-model="model.caigouTime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danjia">
+              <a-input v-model="model.danjia" placeholder="请输入单价"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
+              <a-input v-model="model.number" placeholder="请输入数量"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="价格(单价*数量)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
+              <a-input v-model="model.price" placeholder="请输入价格(单价*数量)"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="材料费类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clfType">
+              <a-input v-model="model.clfType" placeholder="请输入材料费类型"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'CostModelXmxqClForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/costModelXmxqCl/costModelXmxqCl/add",
+          edit: "/costModelXmxqCl/costModelXmxqCl/edit",
+          queryById: "/costModelXmxqCl/costModelXmxqCl/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
src/views/module_kzks/costModelXmxqCl/modules/CostModelXmxqClModal.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-xmxq-cl-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></cost-model-xmxq-cl-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 CostModelXmxqClForm from './CostModelXmxqClForm'
+
+  export default {
+    name: 'CostModelXmxqClModal',
+    components: {
+      CostModelXmxqClForm
+    },
+    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/costModelXmxqCl/modules/CostModelXmxqClModal.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-xmxq-cl-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></cost-model-xmxq-cl-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import CostModelXmxqClForm from './CostModelXmxqClForm'
+  export default {
+    name: 'CostModelXmxqClModal',
+    components: {
+      CostModelXmxqClForm
+    },
+    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>

+ 246 - 0
src/views/module_kzks/costModelXmxqWx/CostModelXmxqWxList.vue

@@ -0,0 +1,246 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="外协项目">
+              <a-input placeholder="请输入外协项目" v-model="queryParam.wxProject"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="外协单位">
+              <a-input placeholder="请输入外协单位" v-model="queryParam.wxCompany"></a-input>
+            </a-form-item>
+          </a-col>
+          <template v-if="toggleSearchStatus">
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="计量单位">
+                <a-input placeholder="请输入计量单位" v-model="queryParam.unit"></a-input>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('项目外协导入详情')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <!-- 高级查询区域 -->
+      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text,record">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)">
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <cost-model-xmxq-wx-modal ref="modalForm" @ok="modalFormOk"></cost-model-xmxq-wx-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import CostModelXmxqWxModal from './modules/CostModelXmxqWxModal'
+
+  export default {
+    name: 'CostModelXmxqWxList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      CostModelXmxqWxModal
+    },
+    data () {
+      return {
+        description: '项目外协导入详情管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'项目ID',
+            align:"center",
+            dataIndex: 'xiangmuId'
+          },
+          {
+            title:'项目名称',
+            align:"center",
+            dataIndex: 'xiangmuName'
+          },
+          {
+            title:'外协项目',
+            align:"center",
+            dataIndex: 'wxProject'
+          },
+          {
+            title:'外协单位',
+            align:"center",
+            dataIndex: 'wxCompany'
+          },
+          {
+            title:'单价',
+            align:"center",
+            dataIndex: 'danjia'
+          },
+          {
+            title:'计量单位',
+            align:"center",
+            dataIndex: 'unit'
+          },
+          {
+            title:'数量',
+            align:"center",
+            dataIndex: 'number'
+          },
+          {
+            title:'价格(单价*数量)',
+            align:"center",
+            dataIndex: 'price'
+          },
+          {
+            title:'描述',
+            align:"center",
+            dataIndex: 'remark'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/costModelXmxqWx/costModelXmxqWx/list",
+          delete: "/costModelXmxqWx/costModelXmxqWx/delete",
+          deleteBatch: "/costModelXmxqWx/costModelXmxqWx/deleteBatch",
+          exportXlsUrl: "/costModelXmxqWx/costModelXmxqWx/exportXls",
+          importExcelUrl: "costModelXmxqWx/costModelXmxqWx/importExcel",
+          
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'xiangmuId',text:'项目ID',dictCode:''})
+        fieldList.push({type:'string',value:'xiangmuName',text:'项目名称',dictCode:''})
+        fieldList.push({type:'string',value:'wxProject',text:'外协项目',dictCode:''})
+        fieldList.push({type:'string',value:'wxCompany',text:'外协单位',dictCode:''})
+        fieldList.push({type:'string',value:'danjia',text:'单价',dictCode:''})
+        fieldList.push({type:'string',value:'unit',text:'计量单位',dictCode:''})
+        fieldList.push({type:'string',value:'number',text:'数量',dictCode:''})
+        fieldList.push({type:'string',value:'price',text:'价格(单价*数量)',dictCode:''})
+        fieldList.push({type:'string',value:'remark',text:'描述',dictCode:''})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 154 - 0
src/views/module_kzks/costModelXmxqWx/modules/CostModelXmxqWxForm.vue

@@ -0,0 +1,154 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="项目ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xiangmuId">
+              <a-input v-model="model.xiangmuId" placeholder="请输入项目ID"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xiangmuName">
+              <a-input v-model="model.xiangmuName" placeholder="请输入项目名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="外协项目" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wxProject">
+              <a-input v-model="model.wxProject" placeholder="请输入外协项目"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="外协单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wxCompany">
+              <a-input v-model="model.wxCompany" placeholder="请输入外协单位"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="danjia">
+              <a-input v-model="model.danjia" placeholder="请输入单价"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="计量单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
+              <a-input v-model="model.unit" placeholder="请输入计量单位"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
+              <a-input v-model="model.number" placeholder="请输入数量"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="价格(单价*数量)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
+              <a-input v-model="model.price" placeholder="请输入价格(单价*数量)"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-input v-model="model.remark" placeholder="请输入描述"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'CostModelXmxqWxForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+           wxProject: [
+              { required: true, message: '请输入外协项目!'},
+           ],
+           danjia: [
+              { required: true, message: '请输入单价!'},
+              { pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'},
+           ],
+           unit: [
+              { required: true, message: '请输入计量单位!'},
+           ],
+        },
+        url: {
+          add: "/costModelXmxqWx/costModelXmxqWx/add",
+          edit: "/costModelXmxqWx/costModelXmxqWx/edit",
+          queryById: "/costModelXmxqWx/costModelXmxqWx/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 触发表单验证
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>

+ 84 - 0
src/views/module_kzks/costModelXmxqWx/modules/CostModelXmxqWxModal.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-xmxq-wx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></cost-model-xmxq-wx-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 CostModelXmxqWxForm from './CostModelXmxqWxForm'
+
+  export default {
+    name: 'CostModelXmxqWxModal',
+    components: {
+      CostModelXmxqWxForm
+    },
+    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/costModelXmxqWx/modules/CostModelXmxqWxModal.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-xmxq-wx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></cost-model-xmxq-wx-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import CostModelXmxqWxForm from './CostModelXmxqWxForm'
+  export default {
+    name: 'CostModelXmxqWxModal',
+    components: {
+      CostModelXmxqWxForm
+    },
+    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>