Просмотр исходного кода

Merge branch 'dev' of http://172.16.100.139/new-business/drp-web into dev

002390 1 год назад
Родитель
Сommit
45f6d89a90

+ 33 - 2
src/api/requisition/basic.js

@@ -8,14 +8,16 @@ export function getReqList(params) {
     params: params
   })
 }
+
 // 物料申请单-新增
 export function addReq(data) {
   return request({
     url: `/system/apply/material`,
     method: 'post',
-    data: data
+    data: data,
   })
 }
+
 // 获取物料申请单详情
 export function getReqDetail(id) {
   return request({
@@ -23,6 +25,7 @@ export function getReqDetail(id) {
     method: 'get',
   })
 }
+
 // 物料申请单-修改提交
 export function editReq(data) {
   return request({
@@ -31,6 +34,7 @@ export function editReq(data) {
     data: data
   })
 }
+
 // 物料申请单-删除
 export function delReq(id) {
   return request({
@@ -47,6 +51,7 @@ export function getUnit(data) {
     data: data
   })
 }
+
 // 参照-产地
 export function getPlace(data) {
   return request({
@@ -55,6 +60,7 @@ export function getPlace(data) {
     data: data
   })
 }
+
 // 参照-税类
 export function getTax(data) {
   return request({
@@ -63,6 +69,7 @@ export function getTax(data) {
     data: data
   })
 }
+
 // 参照-采购员
 export function getStaff(data) {
   return request({
@@ -71,6 +78,7 @@ export function getStaff(data) {
     data: data
   })
 }
+
 // 参照-业务线
 export function getLine(data) {
   return request({
@@ -79,6 +87,7 @@ export function getLine(data) {
     data: data
   })
 }
+
 // 参照-剂型-树形
 export function getDose(data) {
   return request({
@@ -87,6 +96,7 @@ export function getDose(data) {
     data: data
   })
 }
+
 // 参照-采购组织-树形
 // 查询部门下拉树结构
 export function getOrgs(data) {
@@ -96,6 +106,7 @@ export function getOrgs(data) {
     params: data
   })
 }
+
 // 参照-药品类别(子表)-树形
 export function getDrug(data) {
   return request({
@@ -104,6 +115,7 @@ export function getDrug(data) {
     data: data
   })
 }
+
 // 参照-中包装单位
 export function getMidPack(data) {
   return request({
@@ -111,4 +123,23 @@ export function getMidPack(data) {
     method: 'post',
     data: data
   })
-}
+}
+
+// 导入
+export function importData(data) {
+  return request({
+    url: `/system/apply/material/import`,
+    method: 'post',
+    data: data
+  })
+}
+
+// 下载失败导入文件数据
+export function fileImport(data) {
+  return request({
+    url: `/system/apply/material/downloadFailData`,
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+  })
+}

+ 9 - 2
src/components/Refers/refers.vue

@@ -18,7 +18,7 @@
           </el-header>
           <el-main>
             <el-table :data="dataList" v-loading="loading" size="small" border ref="contractTable"
-              @select="handleSelectionChange" @row-click="rowSelect" height="calc(100% - 40px)">
+              @select="handleSelectionChange" @row-dblclick="choose"  @row-click="rowSelect" height="calc(100% - 40px)">
               <el-table-column show-overflow-tooltip type="selection" header-align="center" align="center" width="50"/>
               <!-- <el-table-column show-overflow-tooltip prop="id" header-align="center" align="center" min-width="90" :label="reciveForm.title + 'id'"/> -->
               <el-table-column show-overflow-tooltip prop="code" header-align="center" align="center" min-width="90" label="编码"/>
@@ -134,9 +134,13 @@ export default {
         // 仓库里面加组织
         if(res.rows.length !== 0 && res.rows[0].orgName) {
           this.orgName = true
-          this.warehouseAttributes = true
         } else {
           this.orgName = false
+        }
+        // 仓库里面加仓库属性
+        if(res.rows.length !== 0 && res.rows[0].warehouseAttributes) {
+          this.warehouseAttributes = true
+        } else {
           this.warehouseAttributes = false
         }
         // 人员内加部门
@@ -231,6 +235,9 @@ export default {
       console.log('选择的数据?', this.dataListAllSelections)
       this.$emit("doSubmit", this.dataListAllSelections);
     },
+    choose() {
+      this.doSubmit()
+    }
   },
 };
 </script>

+ 340 - 235
src/views/material/requisition/index.vue

@@ -1,32 +1,32 @@
 <template>
-  <div class="requisition">
+  <div class="requisition" v-loading="failLoad">
     <div class="applyList" v-if="isList">
-    <el-row :gutter="10" class="mb10">
-      <el-col :span="1.5">
-        <span style="font-size: 14px;margin-right: 5px;">单据编码</span>
-        <el-input
-          v-model="queryParams.billCode"
-          size="small"
-          placeholder="请输入单据编码查询"
-          clearable
-          style="width: 240px"
-        />
-      </el-col>
+      <el-row :gutter="10" class="mb10">
+        <el-col :span="1.5">
+          <span style="font-size: 14px;margin-right: 5px;">单据编码</span>
+          <el-input
+            v-model="queryParams.billCode"
+            size="small"
+            placeholder="请输入单据编码查询"
+            clearable
+            style="width: 240px"
+          />
+        </el-col>
 
-      <el-col :span="1.5">
-        <span style="font-size: 14px;margin-right: 5px;">物料名称</span>
-        <el-input
-          v-model="queryParams.name"
-          size="small"
-          placeholder="请输入物料名称查询"
-          clearable
-          style="width: 240px"
-        />
-      </el-col>
+        <el-col :span="1.5">
+          <span style="font-size: 14px;margin-right: 5px;">物料名称</span>
+          <el-input
+            v-model="queryParams.name"
+            size="small"
+            placeholder="请输入物料名称查询"
+            clearable
+            style="width: 240px"
+          />
+        </el-col>
 
-      <el-col :span="1.5">
+        <el-col :span="1.5">
           <span style="font-size: 14px;margin-right: 5px;">单据状态</span>
-          <el-select 
+          <el-select
             v-model="queryParams.status"
             size="small"
             placeholder="请选择单据状态"
@@ -41,223 +41,327 @@
           </el-select>
         </el-col>
 
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="getList(queryParams)">查询</el-button>
-      </el-col>
-      <!-- <el-col :span="1.5">
-        <el-button type="primary" size="small" plain>高级查询</el-button>
-      </el-col> -->
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="reset">重置</el-button>
-      </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain @click="getList(queryParams)">查询</el-button>
+        </el-col>
+        <!-- <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>高级查询</el-button>
+        </el-col> -->
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain @click="reset">重置</el-button>
+        </el-col>
 
-    </el-row>
+      </el-row>
 
-    <el-row :gutter="10" class="mb10">
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="newAdd">新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button size="small" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="download('/system/apply/material/download',{},'申请单模板.xlsx')">模板下载</el-button>
-      </el-col>
-      <!-- <el-col :span="1.5">
-        <el-button type="primary" size="small" plain>导入</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain>导出</el-button>
-      </el-col> -->
-      <!-- <el-col :span="1.5">
-        <el-button type="primary" size="small" plain>批量提交</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain>批量删除</el-button>
-      </el-col> -->
-    </el-row>
+      <el-row :gutter="10" class="mb10">
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain @click="newAdd">新增</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button size="small" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain
+                     @click="download('/system/apply/material/download',{},'申请单模板.xlsx')">模板下载
+          </el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button size="small" @click="handleImport">批量导入</el-button>
+        </el-col>
+        <!-- 导入弹窗 -->
+        <el-dialog title="批量导入" :visible.sync="importData.show" width="35%" center
+                   :before-close="handlefileDialogColse">
+          <div class="mb-import">
+            <el-upload class="upload-demo" accept=".xls, .xlsx" ref="upload" action="#" :on-remove="handleFileRemove"
+                       :file-list="importData.list" :auto-upload="false" :on-change="handleChangeFile" :limit="1">
+              <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+              <el-button style="margin-left: 10px;" size="small" type="success" @click="handleDownTemplate">下载模板
+              </el-button>
+              <div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
+            </el-upload>
+
+          </div>
+          <span slot="footer">
+        <el-button @click="handleImportData('cancal')">取 消</el-button>
+        <el-button type="primary" @click="handleImportData('confirm')">确 定</el-button>
+      </span>
+        </el-dialog>
+        <!-- <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>导入</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>导出</el-button>
+        </el-col> -->
+        <!-- <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>批量提交</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>批量删除</el-button>
+        </el-col> -->
+      </el-row>
 
-    <el-card>
-      <el-table 
-        :data="tableList" 
-        class="request-table"
-        fit
-        max-height="680"
-        @selection-change="handleSelectionChange"
-        @select="handleSelect"
-      >
-      <el-table-column type="selection" width="45" ></el-table-column>
-        <el-table-column label="序号" align="center" type="index" width="50"/>
-        <el-table-column label="所属组织" align="center" width="200" prop="orgName" />
-        <el-table-column label="单据编码" align="center" width="200" prop="billCode" />
-        <el-table-column label="申请人" align="center" prop="createName" />
-        <el-table-column label="申请时间" align="center" width="150" prop="createTime" />
-        <el-table-column label="单据状态" align="center" prop="status" :formatter="statusJug" />
-        <!-- <el-table-column label="物料编码" align="center" width="150" prop="materialCode" /> -->
-        <el-table-column label="物料名称" align="center" width="150" prop="name" />
-        <el-table-column label="创建人" align="center" prop="createName"/>
-        <el-table-column label="创建时间" align="center" width="150" prop="createTime" />
-        <el-table-column label="最后修改人" align="center" width="120" prop="updateName" />
-        <el-table-column label="最后修改时间" align="center" width="150" prop="updateTime" />
-        <el-table-column
-          fixed="right"
-          label="操作"
-          align="center"
-          width="180"
+      <el-card>
+        <el-table
+          :data="tableList"
+          class="request-table"
+          fit
+          max-height="680"
+          @selection-change="handleSelectionChange"
+          @select="handleSelect"
+        >
+          <el-table-column type="selection" width="45"></el-table-column>
+          <el-table-column label="序号" align="center" type="index" width="50"/>
+          <el-table-column label="所属组织" align="center" width="200" prop="orgName"/>
+          <el-table-column label="单据编码" align="center" width="200" prop="billCode"/>
+          <el-table-column label="申请人" align="center" prop="createName"/>
+          <el-table-column label="申请时间" align="center" width="150" prop="createTime"/>
+          <el-table-column label="单据状态" align="center" prop="status" :formatter="statusJug"/>
+          <!-- <el-table-column label="物料编码" align="center" width="150" prop="materialCode" /> -->
+          <el-table-column label="物料名称" align="center" width="150" prop="name"/>
+          <el-table-column label="创建人" align="center" prop="createName"/>
+          <el-table-column label="创建时间" align="center" width="150" prop="createTime"/>
+          <el-table-column label="最后修改人" align="center" width="120" prop="updateName"/>
+          <el-table-column label="最后修改时间" align="center" width="150" prop="updateTime"/>
+          <el-table-column
+            fixed="right"
+            label="操作"
+            align="center"
+            width="180"
           >
-          <template slot-scope="scope">
-            <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
-            <el-button @click="edit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">编辑</el-button>
-            <!-- <el-button @click="commit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">提交</el-button> -->
-            <el-button type="text" size="small" @click="deleteRow(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3">删除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
+            <template slot-scope="scope">
+              <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
+              <el-button @click="edit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text"
+                         size="small">编辑
+              </el-button>
+              <!-- <el-button @click="commit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">提交</el-button> -->
+              <el-button type="text" size="small" @click="deleteRow(scope.row)"
+                         v-if="scope.row.status == 0 || scope.row.status == 3">删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
 
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :page-sizes="[5, 10, 15, 20]"
-        :page-size=queryParams.pageSize
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="total"
-        style="text-align: center;">
-      </el-pagination>
-    </el-card>
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :page-sizes="[5, 10, 15, 20]"
+          :page-size=queryParams.pageSize
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total"
+          style="text-align: center;">
+        </el-pagination>
+      </el-card>
     </div>
 
-    <component :is="isComponent" v-model="isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList" v-if="!isList"/>
+    <component :is="isComponent" v-model="isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList"
+               v-if="!isList"/>
   </div>
 </template>
 
 <script>
-import addReq from './add.vue';
-import { getReqList, delReq } from '@/api/requisition/basic'
-export default {
-  name: 'requisition',
-  components: {
-    addReq
-  },
-  data() {
-    return{
-      // 
-      tableList: [],
-      queryParams: {
-        billCode: '',
-        name: '',
-        status: '',
-        pageNum: 1,
-        pageSize: 10
-      },
-      options: [{
-        value: 0, label: '未提交'
-      },{
-        value: 1, label: '审批中'
-      },{
-        value: 2, label: '已完成'
-      },{
-        value: 3, label: '已驳回'
-      },],
-      total:0,
-      // isComponent
-      isComponent:'addReq',
-      isList: true,
-      // 页面状态
-      page: '',
-      rowDetail: {},
-      disable: false,
-      checkedList:[],
-    }
-  },
-  created() {
-    
-  },
-  mounted() {
-    this.getList(this.queryParams)
-  },
-  methods: {
-    reset() {
-      this.queryParams.billCode = ''
-      this.queryParams.name = ''
-      this.queryParams.status = ''
-      this.queryParams.pageNum = 1
-      this.getList(this.queryParams)
+  import addReq from './add.vue';
+  import {getReqList, delReq, importData, fileImport} from '@/api/requisition/basic';
+  import {saveAs} from "file-saver";
+  import { blobValidate } from "@/utils/ruoyi";
+
+  export default {
+    name: 'requisition',
+    components: {
+      addReq
     },
-    newAdd() {
-      this.isList = false
-      this.isComponent = 'addReq'
-      this.page = 'add'
-      this.disable = false
+    data() {
+      return {
+        failLoad: false,
+        tableList: [],
+        queryParams: {
+          billCode: '',
+          name: '',
+          status: '',
+          pageNum: 1,
+          pageSize: 10
+        },
+        options: [{
+          value: 0, label: '未提交'
+        }, {
+          value: 1, label: '审批中'
+        }, {
+          value: 2, label: '已完成'
+        }, {
+          value: 3, label: '已驳回'
+        },],
+        total: 0,
+        // isComponent
+        isComponent: 'addReq',
+        isList: true,
+        // 页面状态
+        page: '',
+        rowDetail: {},
+        disable: false,
+        checkedList: [],
+        importData: {
+          show: false,
+          list: []
+        },
+      }
+    },
+    created() {
+
     },
-    // 复制
-    handleCopy(){
-      this.isList = false;
-      this.isComponent = 'addReq';
-      this.page = 'copy';
-      this.rowDetail =  this.checkedList[0];
-      this.disable = false;
+    mounted() {
+      this.getList(this.queryParams)
     },
-    // Select框
-    handleSelect(selection, row) {
+    methods: {
+      reset() {
+        this.queryParams.billCode = ''
+        this.queryParams.name = ''
+        this.queryParams.status = ''
+        this.queryParams.pageNum = 1
+        this.getList(this.queryParams)
+      },
+      newAdd() {
+        this.isList = false
+        this.isComponent = 'addReq'
+        this.page = 'add'
+        this.disable = false
+      },
+      // 复制
+      handleCopy() {
+        this.isList = false;
+        this.isComponent = 'addReq';
+        this.page = 'copy';
+        this.rowDetail = this.checkedList[0];
+        this.disable = false;
+      },
+      // 导入
+      handleImport() {
+        this.importData.show = true
+      },
+      // 删除文件
+      handleFileRemove(file, fileList) {
+        console.log('删除文件', file, 'file', fileList, 'fileList');
+        this.importData.list = fileList;
+      },
+      // 文件发生改变
+      handleChangeFile(file, fileList) {
+        this.importData.list = fileList;
+      },
+      // 导入弹窗操作
+      handleImportData(type) {
+        switch (type) {
+          // 取消
+          case 'cancal':
+            this.importData.list = [];
+            this.importData.show = false;
+            break;
+          // 确认
+          case 'confirm':
+            if (this.importData.list.length) {
 
-      this.checkedList = selection;
+              let formData = new FormData();
 
-      console.log(this.checkedList, 'this.checkedList');
+              formData.append('file', this.importData.list[0].raw);
+              importData(formData).then(res => {
+                if (res.code == 200) {
+                  this.importData.show = false;
+                  this.importData.list = [];
+                  if (res.data.flag) {
+                    this.failLoad = true;
+                    console.log(res.data.datas)
+                    let param = {failDatas: res.data.datas}
+                    if (null != param) {
 
-    },
-    getList(val) {
-      console.log('val',val)
-      getReqList(val).then(res => {
-        if (res.code === 200) {
-          this.tableList = res.rows
-          this.total = res.total
+                      fileImport(param).then(res => {
+                        console.log('res',res)
+                        const isBlob = blobValidate(res);
+                        if (isBlob) {
+                          const blob = new Blob([res]);
+                          saveAs(blob, '导入失败的物料申请单数据.xlsx');
+                        }
+                        this.failLoad = false;
+                      })
+                    }
+                  }
+                  this.$message({
+                    message: res.data.msg,
+                    type: res.data.flag ? 'warning' : 'success'
+                  });
+                } else {
+                  this.$message({
+                    message: res.msg,
+                    type: res.code == 200 ? 'success' : 'warning'
+                  });
+                }
+              })
+            } else {
+              this.$message({
+                message: '请上传文件之后在确认!',
+                type: 'warning'
+              });
+            }
+            break;
         }
-      })
-      this.checkedList = [];
-    },
-    // 表格内状态栏判断值
-    statusJug(row) {
-      if (row.status == 0) {
-        return '未提交'
-      } else if (row.status == 1) {
-        return '审批中'
-      } else if (row.status == 2) {
-        return '已完成'
-      } else if (row.status == 3) {
-        return '已驳回'
-      }
-    },
-    // 
-    handleSelectionChange () {
+      },
+      // Select框
+      handleSelect(selection, row) {
 
-    },
-    check(row) {
-      console.log('查看详情', row)
-      this.isList = false
-      this.isComponent = 'addReq'
-      this.page = 'check'
-      this.rowDetail = row
-      this.disable = true
-    },
-    edit(row) {
-      console.log('修改先加载详情', row)
-      this.isList = false
-      this.isComponent = 'addReq'
-      this.page = 'edit'
-      this.rowDetail = row
-      this.disable = false
-    },
-    commit(row) {
-      console.log('row', row)
-    },
-    deleteRow(row) {
-      this.$confirm('是否删除此条数据?', '提示', {
+        this.checkedList = selection;
+
+        console.log(this.checkedList, 'this.checkedList');
+
+      },
+      getList(val) {
+        console.log('val', val)
+        getReqList(val).then(res => {
+          if (res.code === 200) {
+            this.tableList = res.rows
+            this.total = res.total
+          }
+        })
+        this.checkedList = [];
+      },
+      // 表格内状态栏判断值
+      statusJug(row) {
+        if (row.status == 0) {
+          return '未提交'
+        } else if (row.status == 1) {
+          return '审批中'
+        } else if (row.status == 2) {
+          return '已完成'
+        } else if (row.status == 3) {
+          return '已驳回'
+        }
+      },
+      //
+      handleSelectionChange() {
+
+      },
+      check(row) {
+        console.log('查看详情', row)
+        this.isList = false
+        this.isComponent = 'addReq'
+        this.page = 'check'
+        this.rowDetail = row
+        this.disable = true
+      },
+      edit(row) {
+        console.log('修改先加载详情', row)
+        this.isList = false
+        this.isComponent = 'addReq'
+        this.page = 'edit'
+        this.rowDetail = row
+        this.disable = false
+      },
+      commit(row) {
+        console.log('row', row)
+      },
+      deleteRow(row) {
+        this.$confirm('是否删除此条数据?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
           delReq(row.id).then(res => {
-            if(res.code === 200) {
+            if (res.code === 200) {
               this.$message({
                 message: res.msg,
                 type: 'success'
@@ -265,26 +369,27 @@ export default {
               this.getList(this.queryParams)
             }
           })
-        }).catch(() => {})
-    },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`);
-      this.queryParams.pageSize = val
-      this.getList(this.queryParams)
-    },
-    handleCurrentChange(val) {
-      console.log(`当前页: ${val}`);
-      this.queryParams.pageNum = val
-      this.getList(this.queryParams)
+        }).catch(() => {
+        })
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`);
+        this.queryParams.pageSize = val
+        this.getList(this.queryParams)
+      },
+      handleCurrentChange(val) {
+        console.log(`当前页: ${val}`);
+        this.queryParams.pageNum = val
+        this.getList(this.queryParams)
+      }
     }
   }
-}
 </script>
 
 <style scoped lang="scss">
-.requisition {
-  height: calc(100vh - 84px);
-  padding: 12px;
-  box-sizing: border-box;
-}
-</style>
+  .requisition {
+    height: calc(100vh - 84px);
+    padding: 12px;
+    box-sizing: border-box;
+  }
+</style>

+ 12 - 10
src/views/purchase/DemandSummary/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="demandSummary">
     <div v-if="isList">
-      <el-card>
+      <el-card style="position: relative;">
         <el-form class="search_area" label-width="100px">
           <el-row :gutter="10">
             <el-col :span="1.5">
@@ -42,12 +42,14 @@
                 />
               </el-form-item>
             </el-col>
-            <el-col :span="1.5">
-              <el-form-item label="" label-width="20px">
-                <el-button type="primary" size="mini" icon="el-icon-search" plain @click="search">搜索</el-button>
-                <el-button size="mini" icon="el-icon-refresh" plain @click="reset">重置</el-button>
-              </el-form-item>
-            </el-col>
+            <!-- <el-col :span="1.5"> -->
+              <!-- <el-form-item label="" label-width="20px"> -->
+                <div style="position: absolute;top: 3px;right: 10px;">
+                  <el-button type="primary" size="mini" icon="el-icon-search" @click="search">搜索</el-button>
+                  <el-button size="mini" icon="el-icon-refresh" plain @click="reset">重置</el-button>
+                </div>
+              <!-- </el-form-item> -->
+            <!-- </el-col> -->
           </el-row>
 
           <CollapseTransition>
@@ -319,7 +321,7 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 15, 20]"
+          :page-sizes="[10, 20, 50, 100, 500, 1000]"
           :page-size="100"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>
@@ -409,7 +411,7 @@ export default {
       // 页面状态
       page: '',
       queryParams: {
-        rowStatus: [],
+        rowStatus: ['1'],
         buyer: '',
         buyerName: '',
         materialClassifyFourName: '',
@@ -503,7 +505,7 @@ export default {
     },
     reset() {
       this.queryParams = {
-        rowStatus: [],
+        rowStatus: ['1'],
         buyer: '',
         buyerName: '',
         materialClassifyFourName: '',

+ 9 - 7
src/views/purchase/MaterialClassDivision/index.vue

@@ -1,6 +1,7 @@
 <template>
   <div id="MaterialClassDivision">
     <div v-if="isList">
+      <el-card style="position: relative;">
       <el-form class="search_area" label-width="130px">
         <el-row :gutter="10">
           <el-col :span="1.5">
@@ -43,12 +44,14 @@
               />
             </el-form-item>
           </el-col>
-          <el-col :span="1.5">
-            <el-form-item label="" label-width="20px">
-              <el-button type="primary" size="mini" icon="el-icon-search" plain @click="searchList">搜索</el-button>
+          <!-- <el-col :span="1.5"> -->
+            <!-- <el-form-item label="" label-width="20px"> -->
+            <div style="position: absolute;top: 3px;right: 10px;">
+              <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
               <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
-            </el-form-item>
-          </el-col>
+            </div>
+            <!-- </el-form-item> -->
+          <!-- </el-col> -->
         </el-row>
 
         <CollapseTransition>
@@ -180,7 +183,6 @@
       </el-form>
       <el-divider class="lines"><i style="cursor: pointer;" :class="expanded?'el-icon-arrow-up':'el-icon-arrow-down'" @click="drop"></i></el-divider>
 
-      <el-card>
         <div class="btn_grooup">
           <el-button type="primary" size="mini" @click="addDivision">新增</el-button>
 
@@ -251,7 +253,7 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 15, 20]"
+          :page-sizes="[10, 20, 50, 100, 500, 1000]"
           :page-size="100"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>

+ 144 - 192
src/views/purchase/PurchaseDemandList/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="addDemandList">
-  <el-card style="height: calc(100vh - 180px);">
+  <el-card style="height: calc(100vh - 15vh);position: relative;overflow: scroll;">
     <span>基本信息</span>
     <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
       <el-row :gutter="10">
@@ -23,15 +23,6 @@
             </el-form-item>
          </el-col>
 
-         <!-- <el-col :span="1.5">
-            <el-form-item label="需求处理方式">
-              <el-select disabled v-model="basicForm.demandBusinessType" size="mini" style="width: 200px">
-                <el-option v-for="dict in dict.type.sys_processing_mode" :key="dict.value" :label="dict.label" :value="dict.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col> -->
-
          <el-col :span="1.5">
             <el-form-item label="单据状态">
               <el-select disabled v-model="basicForm.status" size="mini" style="width: 200px">
@@ -167,28 +158,25 @@
           :data="basicForm.puDemandItemList"
           fit
           border
-          max-height="350"
+          :cell-style="{ borderColor: '#c0c0c0' }"
+          :header-cell-style="{ borderColor: '#c0c0c0' }"
+          class="exporttable"
+          height="290"
+          max-height="290"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
           :cell-class-name="cellClassName"
         >
           <el-table-column show-overflow-tooltip type="selection"/>
           <el-table-column show-overflow-tooltip label="序号" type="index" align="center"/>
-          <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" :formatter="hangStatus" width="150px"/>
           <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo">
             <template slot-scope="scope">
-              {{scope.$index + 1 + '0'}}
+              {{ scope.$index + 1 + '0' }}
             </template>
           </el-table-column>
-          <!-- <el-table-column show-overflow-tooltip label="业务部门名称" align="center" width="180px"/> -->
-          <!-- <el-table-column show-overflow-tooltip label="业务部门" align="center" width="180px"/> -->
+          <el-table-column show-overflow-tooltip label="默认采购组织" align="center"  prop="purOrgName" width="200px"/>
           <el-table-column show-overflow-tooltip label="需求客户" align="center"  prop="demandCustomerName" width="200px"/>
-          <el-table-column show-overflow-tooltip label="一级品类" align="center" prop="materialClassifyOneName" width="180px"/>
-          <el-table-column show-overflow-tooltip label="二级品类" align="center" prop="materialClassifyTwoName" width="180px"/>
-          <el-table-column show-overflow-tooltip label="三级品类" align="center" prop="materialClassifyThreeName" width="180px"/>
-          <el-table-column show-overflow-tooltip label="四级品类" align="center" prop="materialClassifyFourName" width="180px"/>
-          <el-table-column show-overflow-tooltip label="采购员名称" align="center" prop="buyerName" width="120px"/>
-          <el-table-column show-overflow-tooltip label="采购员" align="center"  prop="buyer"/>
+          <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" :formatter="hangStatus" width="150px"/>
           <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="230px">
             <template slot-scope="scope">
               <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'materialCode'" :rules="{ required: true, message: '请选择物料编码', trigger: 'blur' }">
@@ -203,86 +191,20 @@
           <el-table-column show-overflow-tooltip label="型号" align="center"  prop="model"/>
           <el-table-column show-overflow-tooltip label="单位" align="center"  prop="unitName"/>
           <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center"  prop="manufacturerName" width="230px"/>
-          <el-table-column show-overflow-tooltip label="注册人" align="center"  prop="registrant" width="150px"/>
-          <el-table-column show-overflow-tooltip label="采购周期" align="center"  prop="puPeriod" width="150px">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-input type="number" min="0" clearable :readonly="sonDisable" size="mini" v-model="scope.row.puPeriod"></el-input>
-              </el-form-item>
-            </template>
-          </el-table-column>
-          <el-table-column show-overflow-tooltip label="有效期" align="center"  prop="expiry" width="120px"/>
-          <el-table-column show-overflow-tooltip label="有效期单位" align="center"  prop="expiryUnit" width="120px"/>
           <el-table-column show-overflow-tooltip label="最小包装" align="center"  prop="minPackage" width="120px"/>
-          <el-table-column show-overflow-tooltip label="最小订货量" align="center"  prop="minOrderQty" width="120px"/>
-          <el-table-column show-overflow-tooltip label="最小批量" align="center"  prop="minBatch" width="120px"/>
-          <el-table-column show-overflow-tooltip label="安全库存" align="center"  prop="safeStock" width="120px">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-input clearable :readonly="sonDisable" size="mini" v-model="scope.row.safeStock"/>
-              </el-form-item>
-            </template>
-          </el-table-column>
-            <el-table-column show-overflow-tooltip label="预留比例" align="center" prop="reservedProportion" width="150px">
-              <template slot-scope="scope">
-                <el-form-item class="hang">
-                  <el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedProportion" @change="getYLSL(scope)" @clear="cleanYLSL(scope)">
-                    <el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
-                    </el-option>
-                  </el-select>
-                  <!-- <el-input v-model="scope.row.reservedProportion"/> -->
-                </el-form-item>
-              </template>
-            </el-table-column>
-            <el-table-column show-overflow-tooltip label="预留周期" align="center" prop="reservedPeriod" width="150px">
-              <template slot-scope="scope">
-                <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'reservedPeriod'" :rules="{ required: scope.row.reservedProportion && scope.row.reservedProportion !== '' , message: '请填写预留周期', trigger: 'blur' }">
-                  <el-input type="number" min="0" clearable :readonly="sonDisable" size="mini" v-model="scope.row.reservedPeriod"></el-input>
-                </el-form-item>
-              </template>
-            </el-table-column>
-            <el-table-column show-overflow-tooltip label="预留数量" align="center"  prop="reservedQty" width="150px">
-              <template slot-scope="scope">
-                <el-form-item class="hang">
-                  <el-input type="number" min="0" readonly size="mini" v-model="scope.row.reservedQty"></el-input>
-                </el-form-item>
-              </template>
-            </el-table-column>
-          <el-table-column show-overflow-tooltip label="月均销量" align="center"  prop="averageQtyMonth" width="120px"/>
           <el-table-column show-overflow-tooltip label="实际(业务)需求量" align="center"  prop="qty" width="150px">
             <template slot-scope="scope">
               <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'qty'" :rules="{ required: true, message: '请填写实际(业务)需求量', trigger: 'blur' }">
-                <el-input type="number" min="0" clearable :readonly="sonDisable" size="mini" v-model="scope.row.qty" @input="getYLSL(scope)"/>
-              </el-form-item>
-            </template>
-          </el-table-column>
-          <el-table-column show-overflow-tooltip label="需求可用周期" align="center"  prop="demandPeriod" width="120px"/>
-          <el-table-column show-overflow-tooltip label="集团预测分类" align="center"  prop="forecastClassify" width="120px"/>
-          <el-table-column show-overflow-tooltip label="近一月需求" align="center"  prop="onemonthAvgVolume" width="120px"/>
-          <el-table-column show-overflow-tooltip label="近三月需求" align="center"  prop="threemonthAvgVolume" width="120px"/>
-          <el-table-column show-overflow-tooltip label="采购在途" align="center"  prop="puFreight" width="120px"/>
-          <el-table-column show-overflow-tooltip label="交货日期" align="center"  prop="deliveryDate" width="230px">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-date-picker
-                  v-model="scope.row.deliveryDate"
-                  :readonly="sonDisable"
-                  clearable
-                  type="date"
-                  size="mini"
-                  value-format="yyyy-MM-dd"
-                  :picker-options="pickerOptionsEnd"
-                  placeholder="选择日期">
-                </el-date-picker>
+                <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.qty" @input="getYLSL(scope)"/>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="是否客户指定" align="center"  prop="isSpeical" width="100px">
+          <el-table-column show-overflow-tooltip label="紧急标识" align="center" prop="isUrgency" width="100px">
             <template slot-scope="scope">
               <el-form-item class="hang">
                 <el-switch
-                  v-model="scope.row.isSpeical"
-                  disabled
+                  v-model="scope.row.isUrgency"
+                  :disabled="sonDisable"
                   active-value="Y"
                   inactive-value="N"
                   active-color="#13ce66"
@@ -291,103 +213,102 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="补单标识" align="center"  prop="isReplenishment" width="100px">
+          <el-table-column show-overflow-tooltip label="收货仓库" align="center"  prop="deliveryWarehouseName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-switch
-                  v-model="scope.row.isReplenishment"
-                  disabled
-                  active-value="Y"
-                  inactive-value="N"
-                  active-color="#13ce66"
-                  inactive-color="#a1a3a9">
-                </el-switch>
+                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryWarehouseName" @clear="clearHang(scope.$index, '选择收货仓库')" @focus="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')">
+                  <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')"></el-button>
+                </el-input>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="批号锁定标识" align="center" prop="isBatchLock" width="100px">
+          <el-table-column show-overflow-tooltip label="收货货位" align="center"  prop="deliveryAllocationName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                  <el-switch
-                    v-model="scope.row.isBatchLock"
-                    :disabled="sonDisable"
-                    active-value="Y"
-                    inactive-value="N"
-                    active-color="#13ce66"
-                    inactive-color="#a1a3a9">
-                  </el-switch>
+                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryAllocationName" @clear="clearHang(scope.$index, '选择收货货位')" @focus="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)">
+                  <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)"></el-button>
+                </el-input>
               </el-form-item>
             </template>
           </el-table-column>
+          <el-table-column show-overflow-tooltip label="月均销量" align="center"  prop="averageQtyMonth" width="120px"/>
+          <el-table-column show-overflow-tooltip label="需求可用周期" align="center"  prop="demandPeriod" width="120px"/>
           <el-table-column show-overflow-tooltip label="业务备注" align="center"  prop="remark" width="150px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :readonly="sonDisable" size="mini" v-model="scope.row.remark"/>
+                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.remark"/>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="采购备注" align="center"  prop="updateCause" width="150px"/>
-          <!-- <el-table-column show-overflow-tooltip label="末级供应仓库存量" align="center"  prop="lastWarehouseQty" /> -->
-          <el-table-column show-overflow-tooltip label="调拨占有量" align="center"  prop="allotQty" width="150px"/>
-          <el-table-column show-overflow-tooltip label="最终净需求量" align="center"  prop="resDemandQty" width="150px">
+          <el-table-column show-overflow-tooltip label="物料一级分类" align="center" prop="materialClassifyOneName" width="180px"/>
+          <el-table-column show-overflow-tooltip label="物料二级分类" align="center" prop="materialClassifyTwoName" width="180px"/>
+          <el-table-column show-overflow-tooltip label="物料三级分类" align="center" prop="materialClassifyThreeName" width="180px"/>
+          <el-table-column show-overflow-tooltip label="物料四级分类" align="center" prop="materialClassifyFourName" width="180px"/>
+          <el-table-column show-overflow-tooltip label="最小批量" align="center"  prop="minBatch" width="120px"/>
+          <el-table-column show-overflow-tooltip label="最小订货量" align="center"  prop="minOrderQty" width="120px"/>
+          <el-table-column show-overflow-tooltip label="采购员" align="center" prop="buyerName" width="120px"/>
+          <!-- <el-table-column show-overflow-tooltip label="采购员" align="center"  prop="buyer"/> -->
+          <el-table-column show-overflow-tooltip label="采购周期" align="center"  prop="puPeriod" width="150px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input type="number" min="0" clearable :readonly="sonDisable" size="mini" v-model="scope.row.resDemandQty"/>
+                <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.puPeriod"></el-input>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="最终采购执行数量" align="center"  prop="executeQty" width="150px">
+          <el-table-column show-overflow-tooltip label="交货日期" align="center"  prop="deliveryDate" width="230px">
             <template slot-scope="scope">
-              {{scope.row.executeQty ? scope.row.executeQty : 0 }}
+              <el-form-item class="hang">
+                <el-date-picker
+                  v-model="scope.row.deliveryDate"
+                  :disabled="sonDisable"
+                  clearable
+                  type="date"
+                  size="mini"
+                  value-format="yyyy-MM-dd"
+                  :picker-options="pickerOptionsEnd"
+                  placeholder="选择日期">
+                </el-date-picker>
+              </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="收货仓库" align="center"  prop="deliveryWarehouseName" width="200px">
+          <el-table-column show-overflow-tooltip label="有效期" align="center"  prop="expiry" width="120px"/>
+          <el-table-column show-overflow-tooltip label="有效期单位" align="center"  prop="expiryUnit" width="120px"/>
+          <el-table-column show-overflow-tooltip label="安全库存" align="center"  prop="safeStock" width="120px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryWarehouseName" @clear="clearHang(scope.$index, '选择收货仓库')" @focus="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')">
-                  <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')"></el-button>
-                </el-input>
+                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.safeStock"/>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="收货货位" align="center"  prop="deliveryAllocationName" width="200px">
+          <el-table-column show-overflow-tooltip label="注册人" align="center"  prop="registrant" width="150px"/>
+          <el-table-column show-overflow-tooltip label="预留比例" align="center" prop="reservedProportion" width="150px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryAllocationName" @clear="clearHang(scope.$index, '选择收货货位')" @focus="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)">
-                  <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)"></el-button>
-                </el-input>
+                <el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedProportion" @change="getYLSL(scope)" @clear="cleanYLSL(scope)">
+                  <el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
+                  </el-option>
+                </el-select>
               </el-form-item>
             </template>
           </el-table-column>
-          <!-- <el-table-column show-overflow-tooltip label="收货货位编码" align="center"  prop="deliveryAllocation" width="200px"/> -->
-          <el-table-column show-overflow-tooltip label="末级供应仓库" align="center"  prop="lastWarehouseName" width="200px"/>
-          <el-table-column show-overflow-tooltip label="末级供应货位" align="center"  prop="lastAllocationName" width="200px"/>
-          <el-table-column show-overflow-tooltip label="紧急标识" align="center" prop="isUrgency" width="100px">
+          <el-table-column show-overflow-tooltip label="预留周期" align="center" prop="reservedPeriod" width="150px">
             <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-switch
-                  v-model="scope.row.isUrgency"
-                  :disabled="sonDisable"
-                  active-value="Y"
-                  inactive-value="N"
-                  active-color="#13ce66"
-                  inactive-color="#a1a3a9">
-                </el-switch>
+              <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'reservedPeriod'" :rules="{ required: scope.row.reservedProportion && scope.row.reservedProportion !== '' , message: '请填写预留周期', trigger: 'blur' }">
+                <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedPeriod"></el-input>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="默认采购组织" align="center"  prop="purOrgName" width="200px"/>yu
-          <el-table-column show-overflow-tooltip label="默认采购组织编码" align="center"  prop="puOrg" width="200px"/>
-          <!-- <el-table-column show-overflow-tooltip label="末级供应调拨待入量" align="center"  prop="lastStockQty" width="150px"/> -->
-          <!-- <el-table-column show-overflow-tooltip label="上级供应中心现存量" align="center"  prop="superiorCenterQty" width="200px"/> -->
-          <!-- <el-table-column show-overflow-tooltip label="上级库存被调拨占用量" align="center"  prop="superiorAllotQty" width="200px"/> -->
-          <el-table-column show-overflow-tooltip label="可用量" align="center"  prop="availableQty"/>
-          <el-table-column show-overflow-tooltip label="调拨状态" align="center"  prop="statusAllot" width="100px">
+          <el-table-column show-overflow-tooltip label="预留数量" align="center"  prop="reservedQty" width="150px"/>
+          <el-table-column show-overflow-tooltip label="集团预测分类" align="center"  prop="forecastClassify" width="120px"/>
+          <el-table-column show-overflow-tooltip label="近一月需求" align="center"  prop="onemonthAvgVolume" width="120px"/>
+          <el-table-column show-overflow-tooltip label="近三月需求" align="center"  prop="threemonthAvgVolume" width="120px"/>
+          <el-table-column show-overflow-tooltip label="采购在途" align="center"  prop="puFreight" width="120px"/>
+          <el-table-column show-overflow-tooltip label="补单标识" align="center"  prop="isReplenishment" width="100px">
             <template slot-scope="scope">
               <el-form-item class="hang">
                 <el-switch
-                  v-model="scope.row.statusAllot"
-                  :disabled="sonDisable"
+                  v-model="scope.row.isReplenishment"
+                  disabled
                   active-value="Y"
                   inactive-value="N"
                   active-color="#13ce66"
@@ -405,26 +326,38 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <!-- <el-table-column show-overflow-tooltip label="补单供应商名称" align="center"  prop="additionalSupplierName" width="200px">
+          <el-table-column show-overflow-tooltip label="末级供应库存组织" align="center" prop="lastStockOrgName" width="200px"></el-table-column>
+          <el-table-column show-overflow-tooltip label="末级供应仓库" align="center"  prop="lastWarehouseName" width="200px"/>
+          <el-table-column show-overflow-tooltip label="末级供应货位" align="center"  prop="lastAllocationName" width="200px"/>
+          <el-table-column show-overflow-tooltip label="中心仓可用量" align="center"  prop="centralWarehouseQty" width="200px"/>
+          <el-table-column show-overflow-tooltip label="调拨状态" align="center"  prop="statusAllot" width="100px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input readonly size="mini" v-model="scope.row.additionalSupplierName"/>
+                <el-switch
+                  v-model="scope.row.statusAllot"
+                  :disabled="sonDisable"
+                  active-value="Y"
+                  inactive-value="N"
+                  active-color="#13ce66"
+                  inactive-color="#a1a3a9">
+                </el-switch>
               </el-form-item>
             </template>
-          </el-table-column> -->
-          <!-- <el-table-column show-overflow-tooltip label="周期单位" align="center"  prop="periodUnit" width="150px">
+          </el-table-column>
+          <el-table-column show-overflow-tooltip label="调拨单号" align="center"  prop="allotCode"></el-table-column>
+          <el-table-column show-overflow-tooltip label="调拨占有量" align="center"  prop="allotQty" width="150px"/>
+          <el-table-column show-overflow-tooltip label="最终净需求量" align="center"  prop="resDemandQty" width="150px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.periodUnit">
-                  <el-option v-for=" dict in dict.type.sys_period_unit" :key="dict.value" :label="dict.label" :value="dict.value">
-                  </el-option>
-                </el-select>
+                <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.resDemandQty"/>
               </el-form-item>
             </template>
-          </el-table-column> -->
-          <el-table-column show-overflow-tooltip label="末级供应库存组织" align="center" prop="lastStockOrgName" width="200px"></el-table-column>
-          <el-table-column show-overflow-tooltip label="中心仓可用量" align="center"  prop="centralWarehouseQty" width="200px"/>
-          <el-table-column show-overflow-tooltip label="调拨单号" align="center"  prop="allotCode"></el-table-column>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip label="最终采购执行数量" align="center"  prop="executeQty" width="150px">
+            <template slot-scope="scope">
+              {{ scope.row.executeQty ? scope.row.executeQty : 0 }}
+            </template>
+          </el-table-column>
           <el-table-column show-overflow-tooltip label="收货地址" align="center"  prop="deliveryAddressName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
@@ -434,7 +367,6 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <!-- <el-table-column show-overflow-tooltip label="收货地址编码" align="center" prop="deliveryAddress" width="200px"></el-table-column> -->
           <el-table-column show-overflow-tooltip label="联系人" align="center"  prop="contacts"/>
           <el-table-column show-overflow-tooltip label="联系人电话" align="center"  prop="contactsPhone" width="200px"/>
           <el-table-column show-overflow-tooltip label="详细地址" align="center"  prop="address" width="200px"/>
@@ -445,10 +377,40 @@
                   <el-option v-for=" dict in dict.type.sys_price_type" :key="dict.value" :label="dict.label" :value="dict.value">
                   </el-option>
                 </el-select>
-                <!-- <el-input v-model="scope.row.periodUnit"/> -->
               </el-form-item>
             </template>
           </el-table-column>
+          <el-table-column show-overflow-tooltip label="是否客户指定" align="center"  prop="isSpeical" width="100px">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-switch
+                  v-model="scope.row.isSpeical"
+                  disabled
+                  active-value="Y"
+                  inactive-value="N"
+                  active-color="#13ce66"
+                  inactive-color="#a1a3a9">
+                </el-switch>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <!-- <el-table-column show-overflow-tooltip label="批号锁定标识" align="center" prop="isBatchLock" width="100px">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                  <el-switch
+                    v-model="scope.row.isBatchLock"
+                    :disabled="sonDisable"
+                    active-value="Y"
+                    inactive-value="N"
+                    active-color="#13ce66"
+                    inactive-color="#a1a3a9">
+                  </el-switch>
+              </el-form-item>
+            </template>
+          </el-table-column> -->
+          <el-table-column show-overflow-tooltip label="采购备注" align="center"  prop="updateCause" width="150px"/>
+          <el-table-column show-overflow-tooltip label="可用量" align="center"  prop="availableQty"/>
+
           <el-table-column
             fixed="right"
             label="操作"
@@ -459,30 +421,29 @@
           </template>
         </el-table-column>
       </el-table>
-  </el-form>
+    </el-form>
+      <div class="btn_group">
+        <el-col :span="1.5">
+          <el-button type="primary" size="mini"  @click="copy" v-if="sonPageStu == 'check'">复制</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="mini"  @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
+        </el-col>
+        <el-col :span="1.5" style="margin: 0 10px;">
+          <el-button type="primary" size="mini"  @click="submit" v-if="sonPageStu == 'check' && (row.status == '0' || row.status == '3')">提交</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button size="mini" plain @click="back">返回</el-button>
+        </el-col>
+      </div>
   </el-card>
 
-    <div class="btn_group">
-      <el-col :span="1.5">
-        <el-button type="primary" size="mini" plain @click="copy" v-if="sonPageStu == 'check'">复制</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="primary" size="mini" plain @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
-      </el-col>
-      <el-col :span="1.5" style="margin: 0 10px;">
-        <el-button type="primary" size="mini" plain @click="submit" v-if="sonPageStu == 'check' && (row.status == '0' || row.status == '3')">提交</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button size="mini" plain @click="back">返回</el-button>
-      </el-col>
-
       <Reserved v-if="dialog.config" :isVisible="dialog.config" :info="row" @updateReserved="updateReserved"/>
 
       <Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
 
       <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
 
-    </div>
 
     <!-- 批量调整参数 -->
     <el-dialog title="批量调整" :visible.sync="adjust.open" @close="closeEvent" width="400px">
@@ -981,11 +942,7 @@ export default {
     delLine(index, row) {
       console.log('删除行:', index)
       console.log('改变行:', row)
-      // this.basicForm.puDemandItemList = this.basicForm.puDemandItemList.filter(item => {
-      //   return item.id !== row.id
-      // })
       row.delFlag = '2'
-      // this.basicForm.puDemandItemList.splice(index,1)
       let delList = []
       delList = this.basicForm.puDemandItemList.filter(item => {
         return item.delFlag == '2'
@@ -998,10 +955,6 @@ export default {
     },
     back() {
       this.$emit('jugislist', true)
-      // let queryParams = {
-      //   pageNum: 1,
-      //   pageSize: 10
-      // }
       this.$emit('refresh')
     },
     // 如果需要回显则调用详情接口
@@ -1159,10 +1112,6 @@ export default {
         this.deptOptions = selection
         this.basicForm.demandDept = selection[0].id
       }
-      // if(this.referCondition.type == 'DEPT_PARAM') {
-      //   this.basicForm.puDemandItemList[this.tableIndex].businessDept = selection[0].code
-      //   this.basicForm.puDemandItemList[this.tableIndex].businessDeptName = selection[0].name
-      // }
       if(this.referCondition.title == '选择收货仓库') {
         this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouse = selection[0].id
         this.basicForm.puDemandItemList[this.tableIndex].deliveryWarehouseName = selection[0].name
@@ -1611,10 +1560,13 @@ export default {
 
 <style lang="scss" scoped>
 .btn_group {
-  width: 100%;
-  margin: 20px 0;
+  // width: 100%;
+  // margin: 20px 0;
   display: flex;
-  justify-content: center;
+  // justify-content: center;
+  position: absolute;
+  top: 10px;right: 20px;
+
 }
 .btn_grooup {
   margin-bottom: 10px;

+ 25 - 10
src/views/purchase/PurchaseDemandList/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="PurchaseDemandList">
     <div v-if="isList">
-      <el-card>
+      <el-card style="height: calc(100vh - 15vh);position: relative;overflow: scroll;">
         <el-form class="search_area" label-width="100px">
           <el-row :gutter="10">
             <el-col :span="1.5">
@@ -40,12 +40,14 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="1.5">
-              <el-form-item label="" label-width="20px">
-                <el-button type="primary" size="mini" icon="el-icon-search" plain @click="searchList">搜索</el-button>
-                <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
-              </el-form-item>
-            </el-col>
+            <!-- <el-col :span="1.5"> -->
+              <!-- <el-form-item label="" label-width="20px"> -->
+                <div style="position: absolute;top: 3px;right: 10px;">
+                  <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
+                  <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
+                </div>
+              <!-- </el-form-item> -->
+            <!-- </el-col> -->
           </el-row>
         <CollapseTransition>
           <div v-show="expanded">
@@ -156,11 +158,16 @@
           <el-button type="primary" size="mini" @click="delItems">删除</el-button>
           <!-- <el-button type="primary" size="mini">打印</el-button> -->
         </div>
+        
         <el-table 
           :data="tableList" 
           fit
+          :cell-style="{ borderColor: '#c0c0c0' }"
+          :header-cell-style="{ borderColor: '#c0c0c0' }"
+          class="exporttable"
           border
-          max-height="550"
+          height="430"
+          max-height="430"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
         >
@@ -200,8 +207,8 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 20 ,50 ,100 ,300]"
-          :page-size="100"
+          :page-sizes="[10, 20 ,50 ,100 ,500, 1000]"
+          :page-size="10"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>
         </el-pagination>
@@ -723,4 +730,12 @@ export default {
 ::v-deep .el-table__row > td {
   border: none;
 }
+ ::v-deep .el-card .el-form-item {
+  margin-bottom: 10px;
+}
+</style>
+<style>
+.exporttable {
+    border: solid 1px #c0c0c0;
+ }
 </style>

+ 1 - 1
src/views/purchase/PurchaseDemandList/reserved.vue

@@ -151,4 +151,4 @@ export default {
     }
   }
 }
-</script>
+</script>

+ 11 - 9
src/views/purchase/deliveryAddress/index.vue

@@ -1,7 +1,8 @@
 <template>
   <div id="deliveryAddressList">
     <div v-if="isList">
-      <el-form class="search_area" label-width="120px">
+      <el-card style="position: relative;">
+      <el-form class="search_area" label-width="100px">
         <el-row :gutter="10">
           <el-col :span="1.5">
             <el-form-item label="仓库属性">
@@ -38,12 +39,14 @@
             />
             </el-form-item>
           </el-col>
-          <el-col :span="1.5">
-            <el-form-item label="" label-width="20px">
-              <el-button type="primary" size="mini" icon="el-icon-search" plain @click="searchList">搜索</el-button>
+          <!-- <el-col :span="1.5"> -->
+            <!-- <el-form-item label="" label-width="20px"> -->
+            <div style="position: absolute;top: 3px;right: 10px;">
+              <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
               <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
-            </el-form-item>
-          </el-col>
+            </div>
+            <!-- </el-form-item> -->
+          <!-- </el-col> -->
         </el-row>
 
         <CollapseTransition>
@@ -77,7 +80,7 @@
 
           <el-col :span="1.5">
             <el-form-item label="联系人">
-            <el-select clearable size="mini" v-model="queryParams.contactsName" clearable @focus="chooseRefer('CONTACTS_PARAM', true, '联系人')" style="width: 200px">
+            <el-select clearable size="mini" v-model="queryParams.contactsName" @focus="chooseRefer('CONTACTS_PARAM', true, '联系人')" style="width: 200px">
               <el-option v-for="item in contactsOptions" :key="item.id" :label="item.name" :value="item.name" />
             </el-select>
             </el-form-item>
@@ -138,7 +141,6 @@
       </el-form>
       <el-divider class="lines"><i style="cursor: pointer;" :class="expanded?'el-icon-arrow-up':'el-icon-arrow-down'" @click="drop"></i></el-divider>
 
-      <el-card>
         <div class="btn_grooup">
           <el-button type="primary" size="mini" @click="addAddress">新增</el-button>
 
@@ -218,7 +220,7 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 15, 20]"
+          :page-sizes="[10, 20, 50, 100, 500, 1000]"
           :page-size="100"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>

+ 15 - 39
src/views/purchase/transferOrder/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div id="transferOrder">
     <div v-if="isList">
-      <el-card>
-        <el-form class="search_area" label-width="120px">
+      <el-card style="position: relative;">
+        <el-form class="search_area" label-width="100px">
           <el-row :gutter="10">
             <el-col :span="1.5">
               <el-form-item label="调出库存组织">
@@ -38,54 +38,30 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="1.5">
-              <el-form-item label="单据号">
-                <el-input
-                  v-model.trim="queryParams.code"
-                  size="mini"
-                  clearable
-                  style="width: 200px"
-                />
-              </el-form-item>
-            </el-col>
-            <el-col :span="1.5">
-              <el-form-item label="" label-width="20px">
-                <el-button type="primary" size="mini" icon="el-icon-search" plain @click="searchList">搜索</el-button>
-                <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
-              </el-form-item>
-            </el-col>
+            <div style="position: absolute;top: 3px;right: 10px;">
+              <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
+              <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
+            </div>
           </el-row>
 
-          <!-- <CollapseTransition>
+          <CollapseTransition>
           <div v-show="expanded">
             <el-row :gutter="10">
               <el-col :span="1.5">
-                <el-form-item label="物料编码">
-                  <el-input
-                  v-model="queryParams.code"
-                  size="mini"
-                  placeholder=""
-                  clearable
-                  style="width: 200px"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="1.5">
-                <el-form-item label="调入库存组织">
+                <el-form-item label="单据号">
                   <el-input
-                  v-model="queryParams.storageInventoryOrg"
-                  size="mini"
-                  placeholder=""
-                  clearable
-                  style="width: 200px"
+                    v-model.trim="queryParams.code"
+                    size="mini"
+                    clearable
+                    style="width: 200px"
                   />
                 </el-form-item>
               </el-col>
             </el-row>
           </div>
-          </CollapseTransition> -->
+          </CollapseTransition>
         </el-form>
-      <!-- <el-divider class="lines"><i style="cursor: pointer;" :class="expanded?'el-icon-arrow-up':'el-icon-arrow-down'" @click="drop"></i></el-divider> -->
+      <el-divider class="lines"><i style="cursor: pointer;" :class="expanded?'el-icon-arrow-up':'el-icon-arrow-down'" @click="drop"></i></el-divider>
 
       
         <div class="btn_grooup">
@@ -155,7 +131,7 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[5, 10, 15, 20]"
+          :page-sizes="[10, 20, 50, 100, 500, 1000]"
           :page-size="100"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>