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

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

002201 2 роки тому
батько
коміт
6e5da0be1b

+ 1 - 0
package.json

@@ -38,6 +38,7 @@
     "url": "https://gitee.com/y_project/RuoYi-Vue.git"
   },
   "dependencies": {
+    "@gby/deep-copy": "^4.0.0",
     "@riophae/vue-treeselect": "0.4.0",
     "axios": "0.24.0",
     "clipboard": "2.0.8",

+ 39 - 0
src/components/popover-select/components/ADDRESS_PARAM.js

@@ -0,0 +1,39 @@
+// 收货地址
+export default [
+  // {
+  //   key: "id",
+  //   title: "ID",
+  //   type: "Input",
+  //   search: true,
+  // },
+  {
+    key: "code",
+    title: "编码",
+    type: "Input",
+    search: true,
+  },
+  {
+    key: "name",
+    title: "仓库",
+    type: "Input",
+    search: true,
+  },
+  {
+    key: "address",
+    title: "地址",
+    type: "Input",
+    search: true,
+  },
+  {
+    key: "contactsName",
+    title: "联系人",
+    type: "Input",
+    search: true,
+  },
+  {
+    key: "contactsPhone",
+    title: "电话",
+    type: "Input",
+    search: true,
+  },
+];

+ 10 - 10
src/components/popover-select/components/PSNLICENSE_PARAM.js

@@ -1,20 +1,20 @@
-// 处理方式
+// 人员证照参照
 export default [
-  // {
-  //   key: "id",
-  //   title: "ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "编码",
+    key: "id",
+    title: "ID",
     type: "Input",
     search: true,
   },
+  // {
+  //   key: "code",
+  //   title: "编码",
+  //   type: "Input",
+  //   search: true,
+  // },
   {
     key: "name",
-    title: "处理方式",
+    title: "名称",
     type: "Input",
     search: true,
   },

+ 124 - 124
src/layout/components/Navbar.vue

@@ -8,7 +8,7 @@
     <div class="right-menu">
       <template v-if="device!=='mobile'">
         <!-- <search id="header-search" class="right-menu-item" /> -->
-        
+
         <!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">
           <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
         </el-tooltip> -->
@@ -47,154 +47,154 @@
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import Breadcrumb from '@/components/Breadcrumb'
-import TopNav from '@/components/TopNav'
-import Hamburger from '@/components/Hamburger'
-import Screenfull from '@/components/Screenfull'
-import SizeSelect from '@/components/SizeSelect'
-import Search from '@/components/HeaderSearch'
-import RuoYiGit from '@/components/RuoYi/Git'
-import RuoYiDoc from '@/components/RuoYi/Doc'
-
-export default {
-  components: {
-    Breadcrumb,
-    TopNav,
-    Hamburger,
-    Screenfull,
-    SizeSelect,
-    Search,
-    RuoYiGit,
-    RuoYiDoc
-  },
-  computed: {
-    ...mapGetters([
-      'sidebar',
-      'avatar',
-      'device'
-    ]),
-    setting: {
-      get() {
-        return this.$store.state.settings.showSettings
+  import { mapGetters } from 'vuex'
+  import Breadcrumb from '@/components/Breadcrumb'
+  import TopNav from '@/components/TopNav'
+  import Hamburger from '@/components/Hamburger'
+  import Screenfull from '@/components/Screenfull'
+  import SizeSelect from '@/components/SizeSelect'
+  import Search from '@/components/HeaderSearch'
+  import RuoYiGit from '@/components/RuoYi/Git'
+  import RuoYiDoc from '@/components/RuoYi/Doc'
+
+  export default {
+    components: {
+      Breadcrumb,
+      TopNav,
+      Hamburger,
+      Screenfull,
+      SizeSelect,
+      Search,
+      RuoYiGit,
+      RuoYiDoc
+    },
+    computed: {
+      ...mapGetters([
+        'sidebar',
+        'avatar',
+        'device'
+      ]),
+      setting: {
+        get() {
+          return this.$store.state.settings.showSettings
+        },
+        set(val) {
+          this.$store.dispatch('settings/changeSetting', {
+            key: 'showSettings',
+            value: val
+          })
+        }
       },
-      set(val) {
-        this.$store.dispatch('settings/changeSetting', {
-          key: 'showSettings',
-          value: val
-        })
+      topNav: {
+        get() {
+          return this.$store.state.settings.topNav
+        }
       }
     },
-    topNav: {
-      get() {
-        return this.$store.state.settings.topNav
+    methods: {
+      toggleSideBar() {
+        this.$store.dispatch('app/toggleSideBar')
+      },
+      async logout() {
+        this.$confirm('确定注销并退出系统吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$store.dispatch('LogOut').then(() => {
+            location.href = process.env.VUE_APP_CONTEXT_PATH + '/index';
+          })
+        }).catch(() => {});
       }
     }
-  },
-  methods: {
-    toggleSideBar() {
-      this.$store.dispatch('app/toggleSideBar')
-    },
-    async logout() {
-      this.$confirm('确定注销并退出系统吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$store.dispatch('LogOut').then(() => {
-          location.href = process.env.VUE_APP_CONTEXT_PATH + '/index';
-        })
-      }).catch(() => {});
-    }
   }
-}
 </script>
 
 <style lang="scss" scoped>
-.navbar {
-  height: 50px;
-  overflow: hidden;
-  position: relative;
-  background: #fff;
-  box-shadow: 0 1px 4px rgba(0,21,41,.08);
-
-  .hamburger-container {
-    line-height: 46px;
-    height: 100%;
-    float: left;
-    cursor: pointer;
-    transition: background .3s;
-    -webkit-tap-highlight-color:transparent;
-
-    &:hover {
-      background: rgba(0, 0, 0, .025)
-    }
-  }
-
-  .breadcrumb-container {
-    float: left;
-  }
-
-  .topmenu-container {
-    position: absolute;
-    left: 50px;
-  }
+  .navbar {
+    height: 50px;
+    overflow: hidden;
+    position: relative;
+    background: #fff;
+    box-shadow: 0 1px 4px rgba(0,21,41,.08);
+
+    .hamburger-container {
+      line-height: 46px;
+      height: 100%;
+      float: left;
+      cursor: pointer;
+      transition: background .3s;
+      -webkit-tap-highlight-color:transparent;
 
-  .errLog-container {
-    display: inline-block;
-    vertical-align: top;
-  }
+      &:hover {
+        background: rgba(0, 0, 0, .025)
+      }
+    }
 
-  .right-menu {
-    float: right;
-    height: 100%;
-    line-height: 50px;
+    .breadcrumb-container {
+      float: left;
+    }
 
-    &:focus {
-      outline: none;
+    .topmenu-container {
+      position: absolute;
+      left: 50px;
     }
 
-    .right-menu-item {
+    .errLog-container {
       display: inline-block;
-      padding: 0 8px;
-      height: 100%;
-      font-size: 18px;
-      color: #5a5e66;
-      vertical-align: text-bottom;
+      vertical-align: top;
+    }
 
-      &.hover-effect {
-        cursor: pointer;
-        transition: background .3s;
+    .right-menu {
+      float: right;
+      height: 100%;
+      line-height: 50px;
 
-        &:hover {
-          background: rgba(0, 0, 0, .025)
-        }
+      &:focus {
+        outline: none;
       }
-    }
-
-    .avatar-container {
-      margin-right: 30px;
 
-      .avatar-wrapper {
-        margin-top: 5px;
-        position: relative;
+      .right-menu-item {
+        display: inline-block;
+        padding: 0 8px;
+        height: 100%;
+        font-size: 18px;
+        color: #5a5e66;
+        vertical-align: text-bottom;
 
-        .user-avatar {
+        &.hover-effect {
           cursor: pointer;
-          width: 40px;
-          height: 40px;
-          border-radius: 10px;
+          transition: background .3s;
+
+          &:hover {
+            background: rgba(0, 0, 0, .025)
+          }
         }
+      }
 
-        .el-icon-caret-bottom {
-          cursor: pointer;
-          position: absolute;
-          right: -20px;
-          top: 25px;
-          font-size: 12px;
+      .avatar-container {
+        margin-right: 30px;
+
+        .avatar-wrapper {
+          margin-top: 5px;
+          position: relative;
+
+          .user-avatar {
+            cursor: pointer;
+            width: 40px;
+            height: 40px;
+            border-radius: 10px;
+          }
+
+          .el-icon-caret-bottom {
+            cursor: pointer;
+            position: absolute;
+            right: -20px;
+            top: 25px;
+            font-size: 12px;
+          }
         }
       }
     }
   }
-}
 </style>

+ 3 - 1
src/utils/request.js

@@ -27,6 +27,8 @@ service.interceptors.request.use(
     const isToken = (config.headers || {}).isToken === false;
     // 是否需要防止数据重复提交
     const isRepeatSubmit = (config.headers || {}).repeatSubmit === false;
+    // 是否存在列表查询
+    const isQueryList = config.url.includes("/list");
     if (getToken() && !isToken) {
       config.headers["Authorization"] = "Bearer " + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
     }
@@ -38,7 +40,7 @@ service.interceptors.request.use(
       config.url = url;
     }
     if (
-      !isRepeatSubmit &&
+      !isRepeatSubmit && !isQueryList &&
       (config.method === "post" || config.method === "put")
     ) {
       const requestObj = {

+ 12 - 2
src/views/material/changeApply/add.vue

@@ -322,7 +322,7 @@
     <fourClass ref="fourClass" @doSubmit="acceptFourClass" :selectData="selectData3" :single="true"/>
 
     <dose ref="dose" @doSubmit="acceptDose" :selectData="selectData9" :single="true"/>
-    <serviceline ref="line" @doSubmit="acceptLine" :selectData="selectData8" :single="true" />
+    <serviceline ref="line" @doSubmit="acceptLine" :selectData="selectData8" :single="true"/>
   </div>
 </template>
 
@@ -696,14 +696,24 @@
             this.basicForm.storageConditions = data.storageCondition
             this.basicForm.transportCondition = data.transportationCondition
             this.basicForm.leadTime = data.deliveryPeriod
+            this.basicForm.diCode = data.diCode
+            this.basicForm.businessLine = data.businessLine
+            this.basicForm.productionPermit = data.productionPermit
             if (data.manufacturerId) {
               this.getFactoryDetails(data.manufacturerId)
             }
+            if (data.businessLine) {
+              this.getLineDetails(data.businessLine)
+            }
             if (data.medcines.length !== 0) {
               this.basicForm2.drug = data.medcines[0].isDrug
               this.basicForm2.registrationNo = data.medcines[0].registrationNo
               this.basicForm2.medicalDevices = data.medcines[0].medicalInstruments
               this.basicForm2.maintenanceType = data.medcines[0].curingType
+              this.basicForm2.dosageFrom = data.medcines[0].dosageFrom
+              if (data.medcines[0].dosageFrom) {
+                this.getDoseDetails(data.medcines[0].dosageFrom)
+              }
             }
             // 控制医药属性是否能够填写
             if (this.basicForm.medicineMaterial == '0') {
@@ -758,7 +768,7 @@
             this.basicForm.threeClass = res.data.threeClass
             this.basicForm.fourClass = res.data.fourClass
             const classjudge = res.data.oneClass
-            if (classjudge == '介入耗材5' || classjudge == '骨科耗材2' || classjudge == '普通耗材3' || classjudge == '医用设备1' || classjudge == '体外诊断4') {
+            if (classjudge.includes('介入耗材&5') || classjudge.includes('骨科耗材&2') || classjudge.includes('普通耗材&3') || classjudge.includes('医用设备&1') || classjudge.includes('体外诊断&4')) {
               this.isOneClass = true
             } else {
               this.isOneClass = false

+ 1 - 1
src/views/material/requisition/add.vue

@@ -1063,7 +1063,7 @@ export default {
           this.basicForm.twoClass = res.data.twoClass
           this.basicForm.threeClass = res.data.threeClass
           const classjudge = res.data.oneClass
-          if (classjudge == '介入耗材5' || classjudge == '骨科耗材2' || classjudge == '普通耗材3' || classjudge == '医用设备1' || classjudge == '体外诊断4') {
+          if (classjudge.includes('介入耗材&5') || classjudge.includes('骨科耗材&2') || classjudge.includes('普通耗材&3') || classjudge.includes('医用设备&1') || classjudge.includes('体外诊断&4')) {
             this.isOneClass = true
           } else {
             this.isOneClass = false

+ 17 - 0
src/views/purchase/DemandSummary/index.vue

@@ -233,6 +233,22 @@
               </el-form-item>
             </el-col>
           </el-row>
+
+          <el-row :gutter="10">
+            <el-col :span="1.5">
+              <el-form-item label="审批结束日期">
+                <el-date-picker
+                  v-model="queryParams.approverFinishTime"
+                  type="date"
+                  clearable
+                  value-format="yyyy-MM-dd"
+                  size="small"
+                  style="width: 200px"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
         </div>
         </CollapseTransition>
       </el-form>
@@ -459,6 +475,7 @@ export default {
         demandDate: '',
         auditTime: '',
         yesTime: '',
+        approverFinishTime: '',
         pageNum: 1,
         pageSize: 5
       },

+ 43 - 24
src/views/purchase/PurchaseDemandList/add.vue

@@ -15,7 +15,7 @@
          </el-col>
 
         <el-col :span="1.5">
-            <el-form-item label="组织">
+            <el-form-item label="组织" prop="org" :rules="{ required: true, message: '请选择组织', trigger: 'blur' }">
               <el-select clearable size="small" v-model="basicForm.org" :disabled="sonDisable" @focus="chooseOrg('ORG_PARAM', true, '选择组织')" style="width: 200px">
                 <el-option v-for="item in orgOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
@@ -41,7 +41,7 @@
           </el-col>
 
          <el-col :span="1.5">
-            <el-form-item label="需求客户">
+            <el-form-item label="需求客户" prop="customer" :rules="{ required: true, message: '请选择需求客户', trigger: 'blur' }">
               <el-select clearable size="small" v-model="basicForm.customer" :disabled="sonDisable" @focus="chooseOrg('CUSTOMER_PARAM', true, '选择客户')" style="width: 200px">
                 <el-option v-for="item in customerOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
@@ -82,7 +82,7 @@
           </el-col>
 
           <el-col :span="1.5">
-            <el-form-item label="需求日期">
+            <el-form-item label="需求日期" prop="demandDate" :rules="{ required: true, message: '请选择需求日期', trigger: 'blur' }">
               <el-date-picker
                 v-model="basicForm.demandDate"
                 :disabled="sonDisable"
@@ -227,7 +227,7 @@
           <el-table-column show-overflow-tooltip label="采购员" align="center"  prop="buyer"/>
           <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="230px">
             <template slot-scope="scope">
-              <el-form-item class="hang">
+              <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'materialCode'" :rules="{ required: true, message: '请选择物料编码', trigger: 'blur' }">
                 <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.materialCode" @focus="chooseMaterial(scope.$index)">
                   <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMaterial(scope.$index)"></el-button>
                 </el-input>
@@ -262,7 +262,7 @@
           <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="120px">
             <template slot-scope="scope">
-              <el-form-item class="hang">
+              <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'qty'" :rules="{ required: true, message: '请填写实际(业务)需求量', trigger: 'blur' }">
                 <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.qty"/>
               </el-form-item>
             </template>
@@ -271,7 +271,7 @@
           <el-table-column show-overflow-tooltip label="集团预测分类" align="center"  prop="forecastClassify" 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-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'deliveryDate'" :rules="{ required: true, message: '请填写交货日期', trigger: 'blur' }">
                 <el-date-picker
                   v-model="scope.row.deliveryDate"
                   :readonly="sonDisable"
@@ -386,7 +386,7 @@
           </el-table-column>
           <el-table-column show-overflow-tooltip label="补单供应商编码" align="center"  prop="additionalSupplier" width="200px">
             <template slot-scope="scope">
-              <el-form-item class="hang">
+              <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'additionalSupplier'" :rules="{ required: isBDXQ, message: '请选择补单供应商', trigger: 'blur' }">
                 <el-input clearable :disabled="sonDisable || BDZT" size="small" v-model="scope.row.additionalSupplier" @clear="clearHang(scope.$index, '选择补单供应商')" @focus="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')">
                   <el-button size="small" :disabled="sonDisable || BDZT" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')"></el-button>
                 </el-input>
@@ -548,6 +548,7 @@ export default {
       personOptions: [],
       deptOptions: [],
       customerOptions: [],
+      isBDXQ: false
     }
   },
   created() {
@@ -562,9 +563,11 @@ export default {
     // 更改业务类型调整明细行内补单或紧急标识
     changeBillType() {
       if (this.basicForm.billType == 'BDXQ' && this.basicForm.puDemandItemList.length != 0) {
+        this.isBDXQ = true
         this.BDZT = false
         this.basicForm.puDemandItemList.forEach(item => {item.isReplenishment = 'Y'})
       } else {
+        this.isBDXQ = false
         this.BDZT = true
         this.basicForm.puDemandItemList.forEach(item => { 
           item.isReplenishment = 'N' 
@@ -620,23 +623,27 @@ export default {
     },
     async save() {
       if(this.basicForm.puDemandItemList.length !== 0) {
-        if(this.sonPageStu == 'add') {
-          await this.handleData()
-          await addDemand(this.basicForm).then(res => {
-            console.log(333)
-            if (res.code === 200) {
-              this.$modal.msgSuccess("保存成功");
-              this.back()
-            }
-          })
-        } else if (this.sonPageStu == 'edit') {
-          editDemand(this.basicForm).then(res => {
-            if (res.code === 200) {
-              this.$modal.msgSuccess("编辑成功");
-              this.back()
+        this.$refs['basic'].validate((valid) => {
+          if(valid) {
+            if(this.sonPageStu == 'add') {
+              this.handleData()
+              addDemand(this.basicForm).then(res => {
+                console.log(333)
+                if (res.code === 200) {
+                  this.$modal.msgSuccess("保存成功");
+                  this.back()
+                }
+              })
+            } else if (this.sonPageStu == 'edit') {
+              editDemand(this.basicForm).then(res => {
+                if (res.code === 200) {
+                  this.$modal.msgSuccess("编辑成功");
+                  this.back()
+                }
+              })
             }
-          })
-        }
+          }
+        })
       } else {
         this.$modal.msgWarning("明细信息不能为空!");
       }
@@ -798,7 +805,13 @@ export default {
               if(this.basicForm.demandDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.demandDept) }
               // 详情时将收货仓库id赋值给stordocId
               // 如果业务类型为补单需求,则明细内补单供应商编码可以编辑
-              if(this.basicForm.billType == 'BDXQ') { this.BDZT = false } else { this.BDZT = true }
+              if(this.basicForm.billType == 'BDXQ') {
+                 this.BDZT = false 
+                 this.isBDXQ = true
+              } else {
+                 this.BDZT = true
+                 this.isBDXQ = false
+              }
             }
           })
         }
@@ -847,6 +860,12 @@ export default {
         this.basicForm.customer = selection[0].id
         this.basicForm.customerName = selection[0].name
         this.basicForm.customerCode = selection[0].code
+        if(this.basicForm.puDemandItemList.length !== 0) {
+          this.basicForm.puDemandItemList.forEach(item => {
+            item.demandCustomerName = this.basicForm.customerName
+            item.demandCustomer = this.basicForm.customer
+          })
+        }
       }
       if(this.referCondition.type == 'CONTACTS_PARAM') {
         this.personOptions = selection

+ 5 - 1
src/views/purchase/PurchaseDemandList/index.vue

@@ -210,6 +210,7 @@
       :disabled="upload.isUploading"
       :on-progress="handleFileUploadProgress"
       :on-success="handleFileSuccess"
+      :on-error="errorFile"
       :auto-upload="false"
       drag
       >
@@ -261,7 +262,7 @@ export default {
         // 是否禁用上传
         isUploading: false,
         // 是否更新已经存在的用户数据
-        updateSupport: 0,
+        updateSupport: 1,
         // 设置上传的请求头部
         headers: { Authorization: "Bearer " + getToken() },
         // 上传的地址
@@ -424,6 +425,9 @@ export default {
       this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
       this.getList(this.queryParams);
     },
+    errorFile(err) {
+      this.$modal.notifyError("文件已变动,请重新上传");
+    },
     // 提交上传文件
     submitFileForm() {
       this.$refs.upload.submit();

+ 88 - 23
src/views/purchase/purchase-order/add/column.js

@@ -163,7 +163,7 @@ export const Columns = [
   { key: "isMarketingSource", title: "由销售订单协同生成", inputType: "Checkbox",  isShow:true,},
   {
     key: "warehouseName",
-    title: "WMS入库仓库", // 收货仓库
+    title: "WMS入库仓库", 
     inputType: "PopoverSelect",
     require: true,
     valueKey: "id",
@@ -199,8 +199,45 @@ export const Columns = [
   { key: "supplierOrderNo", title: "供应商订单号", inputType: "Input",isShow:true, },
   { key: "rebateMoney", title: "订单使用返利金额", inputType: "Input",isShow:true, },
   { key: "deductionMoney", title: "订单抵扣余款金额", inputType: "Input",isShow:true, },
-  { key: "address", title: "收货地址", inputType: "Input",isShow:true, },
-  { key: "contacts", title: "收货联系人", inputType: "Input",isShow:true, },
+  { 
+    key: "goodsWarehouseName",
+    title: "收货仓库",
+    inputType: "Input",
+    isShow:true,
+    disabled:true,
+  },
+  { 
+    key: "address",
+    title: "收货地址",
+    inputType: "PopoverSelect",
+    valueKey: "address",
+    referName: "ADDRESS_PARAM",
+    isShow:true,
+    dataMapping: {
+      // address: 'address',
+      // addressName: '',
+      goodsWarehouse:'id',
+      goodsWarehouseName:'name',
+      contacts:'contactsName',
+      contactsPhone:'contactsPhone'
+    },
+    queryParams: () => ({}),
+    width: 180
+  },
+  { 
+    key: "contacts", 
+    title: "收货联系人", 
+    inputType: "Input",
+    isShow:true, 
+    disabled:true,
+  },
+  { 
+    key: "contactsPhone", 
+    title: "收货联系人电话", 
+    inputType: "Input",
+    isShow:true, 
+    disabled:true,
+  },
   {
     key: "customerDeptName",
     title: "客户部门",
@@ -228,7 +265,9 @@ export const Columns = [
       supplierContactsName: 'name'
     },
      isShow:true,
-    queryParams: () => ({}),
+    queryParams: (params) => ({
+      supplierId:params.supplier
+    }),
     width: 200,
   },
   { key: "isUrgency", title: "紧急程度", inputType: "Checkbox",isShow:true, },
@@ -264,13 +303,18 @@ export const Columns = [
     title: "供应商业务员",
     inputType: "PopoverSelect",
     valueKey: "id",
-    referName: "SUPPLIERCONTACTS_PARAM",
+    // referName: "SUPPLIERCONTACTS_PARAM",
+    referName: "PSNLICENSE_PARAM",
     dataMapping: {
       supplierPersonal: 'id',
       supplierPersonalName: 'name'
     },
      isShow:true,
-    queryParams: () => ({}),
+    queryParams: (params) => ({
+      // 组织、供应商id
+      pkOrg: params.puOrg,
+      supplierId:params.supplier
+    }),
     require: true,
   },
   { key: "isDeliver", title: "是否发货", inputType: "Checkbox",  isShow:true,},
@@ -372,7 +416,7 @@ export const TabColumns = [
     title: '物料信息',
     key: 'puOrderItemList',
     tableColumns: [
-      { key: "rowNo", title: "行号", inputType: "Input", },
+      { key: "rowNo", title: "行号", inputType: "Input", disabled:true},
       // { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
       // {key: "material",title: "物料",inputType: "Input",   },
       {
@@ -445,7 +489,7 @@ export const TabColumns = [
       { //isMedicine  isMedicineValue
         key: "isMedcine",
         title: "医药物料", 
-        inputType: "Input", 
+        inputType: "Checkbox", 
         width: 180,
         disabled:true,
         readonly:true,
@@ -461,9 +505,9 @@ export const TabColumns = [
       { 
         key: "isDrug",
          title: "物料药品属性", 
-         inputType: "Input", 
-         width: 180 
-        },
+         inputType: "Checkbox", 
+         disabled:true,
+      },
       { //unitId  unitIdName
         key: "unit", 
         title: "单位", 
@@ -496,20 +540,41 @@ export const TabColumns = [
       { key: "isPayment", title: "付款关闭", inputType: "Checkbox", },
       { key: "isGift", title: "赠品", inputType: "Checkbox", },
       {
-        key: "warehouseName",
-        title: "收货仓库", //WMS入库仓库
+        key: "goodsWarehouseName",
+        title: "收货仓库", 
+        inputType: "Input",
+        width: 200,
+        disabled:true,
+      },
+      // { key: "place", title: "收货地点", inputType: "Input", width: 180 },
+      { 
+        key: "address",
+        title: "收货地址",
+        inputType: "PopoverSelect",
+        valueKey: "address",
+        referName: "ADDRESS_PARAM",
+        width: 180,
+        dataMapping:{
+          // address: 'address',
+          // addressName: '',
+          goodsWarehouse:'id',
+          goodsWarehouseName:'name',
+          contacts:'contactsName',
+          contactsPhone:'contactsPhone'
+        }
+      },
+      { 
+        key: "customerName",
+        title: "收货客户", 
         inputType: "PopoverSelect",
         valueKey: "id",
-        referName: "WAREHOUSE_PARAM",
-        dataMapping: {
-          warehouse: 'id',
-          warehouseName: 'name'
+        referName: "CUSTOMER_PARAM",
+        width: 180,
+        dataMapping:{
+          customer:'id',
+          customerName:'name',
         },
-        queryParams: () => ({}),
-        width: 200,
       },
-      { key: "place", title: "收货地点", inputType: "Input", width: 180 },
-      { key: "address", title: "收货地址", inputType: "Input", width: 180 },
       { key: "productBatch", title: "产品批号", inputType: "Input", width: 180 },
       { key: "manufactureDate", title: "生产日期", inputType: "Input", width: 180 },
       { 
@@ -619,7 +684,7 @@ export const TabColumns = [
     key: 'puOrderExecuteList',
     tableColumns: [
       // { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
-      { key: "rowno", title: "行号", inputType: "Input", },
+      { key: "rowno", title: "行号", inputType: "Input", disabled:true},
       {
         key: "materialName",
         title: "物料",
@@ -643,7 +708,7 @@ export const TabColumns = [
           materialClassifyOneName:'oneClass',
           materialClassifyTwoName:'twoClass',
           materialClassifyThreeName:'threeClass',
-          materialClassifyFourName:'fourClass'
+          materialClassifyFourName:'fourClass',
         },
         queryParams: () => ({}),
         width: 180

+ 20 - 4
src/views/purchase/purchase-order/add/index.vue

@@ -93,18 +93,21 @@ export default {
   },
   methods: {
     beforeOpen() {
-      const { deptName, deptId, name, nickName, orgName, orgId } =
-        this.$store.state.user;
+      const { deptName, deptId, name, nickName, orgName, orgId } = this.$store.state.user;
       this.params.puOrg = orgId;
       this.params.puOrgName = orgName;
       this.params.buyer = name;
       this.params.buyerName = nickName;
       this.params.puDept = deptId;
       this.params.puDeptName = deptName;
-      // this.params.status = '0';
+      this.params.billDate = new Date().Format('yyyy-MM-dd');
     },
     setVisible(prop) {
       this.visible = prop;
+
+      if(!this.visible){
+        this.$refs['orderAddForm'].clearValidate();
+      }
     },
     // 复制赋值
     async setCopyParams(id) {
@@ -262,10 +265,15 @@ export default {
       console.log(source, "source");
       console.log(type, "type");
 
-      // 触发物料参照
+      // 触发物料参照询价
       if (type == "MATERIAL_PARAM" && source.qty && source.qty != "") {
         this.handleGetPrice();
       }
+
+      if(type == "MATERIAL_PARAM"){
+        source.isDrug = val.materialMedcine.isDrug  == '0' ? 'Y' : 'N';
+        // return source;
+      }
     },
 
     // 子表inputNumber
@@ -288,6 +296,14 @@ export default {
       } finally {
       }
     },
+
+    // 下拉框选择改变
+    handleChangeSelect(val,typeName){
+      if(val === 'billType'){
+       this.params['billTypeName'] = this.dict.type[typeName].find(item => item.value == this.params[val]).label;
+      }
+    },
+
   },
   created() {
     console.log("ADD CREATED", this.params);

+ 142 - 5
src/views/purchase/purchase-order/column.js

@@ -8,14 +8,14 @@ import {
 export const TableColumns = [
   // { key: "id", title: "主键" },
   // { key: "puOrg", title: "采购组织" },
-  { key: "puOrgName", title: "采购组织名称", search: true, inputType: "Input" },
+  { key: "puOrgName", title: "采购组织", inputType: "Input" },
   {
     key: "billType",
     title: "订单类型",
     inputType: "Select",
     referName: "sys_order_type",
   },
-  { key: "code", title: "订单编号", search: true, inputType: "Input" },
+  { key: "code", title: "订单编号",  inputType: "Input" },
   {
     key: "status",
     title: "单据状态",
@@ -25,7 +25,7 @@ export const TableColumns = [
   },
   { key: "billDate", title: "订单日期" },
   // { key: "supplier", title: "供应商" },
-  { key: "supplierName", title: "供应商", search: true, inputType: "Input" },
+  { key: "supplierName", title: "供应商", inputType: "Input" },
   { key: "paymentAgreementName", title: "付款协议" },
   // { key: "paymentAgreement", title: "付款协议" },
   // { key: "currency", title: "币种" },
@@ -295,9 +295,144 @@ export const TabColumns = [
   },
 ];
 
-export const SearchColumns = TableColumns.filter((element) => element.search);
+// export const SearchColumns = TableColumns.filter((element) => element.search);
+export const SearchColumns = [
+  {
+    key: "source",
+    title: "订单来源",  
+    inputType: "Select",
+    referName: "order_source", // 字典名
+    clearable:true,
+  },
+  {
+    key: "code",
+    title: "订单编号",  
+    inputType: "Input",
+    clearable:true,
+  },
+  {
+    key: "date",
+    title: "订单日期",  
+    type: "daterange",
+    inputType: "DatePicker",
+    unlinkPanels: true,
+    rangeSeparator: "至",
+    valueFormat: "yyyy-MM-dd",
+    endPlaceholder: "结束日期",
+    startPlaceholder: "开始日期",
+    clearable:true,
+  },
+  {
+    key: "status",
+    title: "单据状态",
+    inputType: "Select",
+    referName: "documents_status", // 字典名
+    clearable:true,
+  },
+  { 
+    key: "supplierName", 
+    title: "供应商", 
+    inputType: "PopoverSelect",
+    valueKey: "id",
+    referName: "SUPPLIER_PARAM",
+    dataMapping: {
+      // supplier: "id",
+      supplierName: "name",
+    },
+    queryParams: () => ({}),
+    clearable:true,
+  },
+  {
+    key: "puOrgIds",
+    title: "采购组织",
+    inputType: "PopoverSelect",
+    multiple:true,
+    valueKey: "id",
+    referName: "ORG_PARAM",
+    dataMapping: {},
+    queryParams: () => ({}),
+    clearable:true,
+  },
+  {
+    key: "materialCode",
+    title: "物料编码",
+    inputType: "PopoverSelect",
+    valueKey: "code",
+    referName: "MATERIAL_PARAM",
+    dataMapping: {},
+    queryParams: () => ({}),
+    clearable:true,
+  },
+  {
+    key: "materialName",
+    title: "物料名称",
+    inputType: "PopoverSelect",
+    valueKey: "name",
+    referName: "MATERIAL_PARAM",
+    dataMapping: {},
+    queryParams: () => ({}),
+    clearable:true,
+  },
+  { 
+    key: "deliveryStatus",
+    title: "erp发送状态", 
+    inputType: "Select",
+    referName: "order_delivery_status", // 字典名
+    clearable:true,
+  },
+  { 
+    key: "contractNo",
+    title: "合同号", 
+    inputType: "Input",
+    clearable:true,
+  },
+  {
+    key: "projectNowName",
+    title: "在建工程项目",
+    inputType: "PopoverSelect",
+    require: true,
+    valueKey: "name",
+    referName: "PROJECT_PARAM",
+    dataMapping: {},
+    queryParams: () => ({}),
+    clearable:true,
+  },
+  {
+    key: "buyers",
+    title: "采购员",
+    inputType: "PopoverSelect",
+    multiple:true,
+    valueKey: "code",
+    referName: "CONTACTS_PARAM",
+    dataMapping: {},
+    queryParams: () => ({}),
+    clearable:true,
+  },
+  {
+    key: "billTypes",
+    title: "订单类型",
+    inputType: "Select",
+    referName: "sys_order_type", // 字典名
+    multiple:true,
+    tags:true,
+    clearable:true,
+  },
+  { 
+    key: "demandCode",
+    title: "采购需求单号", 
+    inputType: "Input",
+    clearable:true,
+  },
+  { 
+    key: "isDrug",
+    title: "物料药品属性", 
+    inputType: "SelectCheck",
+    clearable:true,
+  },
+];
 
 const NewColumns = initColumns(TableColumns);
+const NewSearchColumns = initColumns(SearchColumns);
 const NewTabColumns = TabColumns.map((element) => ({
   ...element,
   tableColumns: initColumns(element.tableColumns),
@@ -307,4 +442,6 @@ export const SelectColumns = NewColumns.filter(column => column.inputType === 'S
 
 NewTabColumns.forEach(column => {
   SelectColumns.push(...column.tableColumns.filter(cColumn => cColumn.inputType === 'Select'))
-});
+});
+
+SelectColumns.push(...NewSearchColumns.filter(column => column.inputType === 'Select'))

+ 0 - 1
src/views/purchase/purchase-order/components/FileUploadCenter/index.vue

@@ -73,7 +73,6 @@ export default {
     }
   },
   data() {
-    console.log(process.env, 'process.env');
     return {
       number: 0,
       uploadList: [],

+ 18 - 13
src/views/purchase/purchase-order/edit/index.vue

@@ -4,17 +4,6 @@ import { editColumns, editTabColumns, forbidden, SelectColumns } from "./initCol
 import orderApi from "@/api/business/purchase/purchase-order";
 import { initColumns, initDicts, initRules, initParams } from "@/utils/init";
 
-// const NewColumns = initColumns(Columns);
-// const NewTabColumns = TabColumns.map((element) => ({
-//   ...element,
-//   tableColumns: initColumns(element.tableColumns),
-// }));
-// 
-// const SelectColumns = NewColumns.filter(column => column.inputType === 'Select')
-// NewTabColumns.forEach(column => {
-//   SelectColumns.push(...column.tableColumns.filter(cColumn => cColumn.inputType === 'Select'))
-// });
-
 export default {
   name: "EditPurchaseOrderDrawer",
   dicts: initDicts(SelectColumns),
@@ -71,6 +60,10 @@ export default {
     setVisible(prop) {
       this.visible = prop;
 
+      if(!this.visible){
+        this.$refs['orderEditForm'].clearValidate();
+      }
+
     },
     // 同步子表物料
     handleSynchronousMaterial(key1, key2) {
@@ -84,7 +77,7 @@ export default {
     // 判断属性是否禁用
     handleIsForbidden(status) {
       console.log(status);
-      let { editColumns: updateColumns, editTabColumns: updateTabColumns } = forbidden(status != '2');
+      let {  updateColumns,updateTabColumns } = forbidden(status != '2');
       this.columns = updateColumns;
       this.tabColumns = updateTabColumns;
     },
@@ -193,6 +186,11 @@ export default {
 
         this.handleGetPrice();
       }
+
+      if(type == "MATERIAL_PARAM"){
+        source.isDrug = val.materialMedcine.isDrug  == '0' ? 'Y' : 'N';
+        // return source;
+      }
     },
     // 子表inputNumber
     handleInputChange(row, type) {
@@ -220,6 +218,12 @@ export default {
     handleIsRevise(status) {
       return status == '2';
     },
+     // 下拉框选择改变
+     handleChangeSelect(val,typeName){
+      if(val === 'billType'){
+       this.params['billTypeName'] = this.dict.type[typeName].find(item => item.value == this.params[val]).label;
+      }
+    },
   },
   created() {
     console.log("EDIT CREATED");
@@ -316,6 +320,7 @@ export default {
                 :clearable="column.clearable" 
                 :placeholder="column.placeholder" 
                 style="width: 100%"
+                @change="handleChangeSelect(column.key,column.referName)"
                 >
                 <el-option 
                   v-for="item in dict.type[column.referName]" 
@@ -419,7 +424,7 @@ export default {
                     :multiple="cColumn.multiple"
                     :placeholder="cColumn.placeholder" 
                     :data-mapping="cColumn.dataMapping"
-                    :query-params="cColumn.queryParams(scope.row)" 
+                    :query-params="cColumn.queryParams" 
                     size="mini" 
                     @change="handleReferChange"
                   ></dr-popover-select>

+ 10 - 32
src/views/purchase/purchase-order/edit/initColumn.js

@@ -1,5 +1,7 @@
 import { Columns, TabColumns } from "../add/column";
 import { initColumns, initParams } from "@/utils/init";
+import deepCopy from "@gby/deep-copy";
+// import {deepCopy} from "../dist/deep-copy.es"
 
 
 export const editColumns = initColumns(Columns);
@@ -18,43 +20,19 @@ editTabColumns.forEach(column => {
 });
 
 
-
 // 禁用项
 export const forbidden = (isEdit) => {
 
-  console.log(isEdit, 'isEdit');
-  if (isEdit) {
-    console.log('编辑');
-    // 编辑
-    editColumns.forEach(item => {
-
-      if(item.key == 'code' || item.key == 'status'){
-
-        item.disabled = true;
-        item.readonly = true;
-      }else{
-        item.disabled = false;
-        item.readonly = false;
-      }
-    })
-
-    editTabColumns.forEach(item => {
+  let updateColumns = deepCopy(editColumns);
+  let updateTabColumns = deepCopy(editTabColumns);
 
-      item.tableColumns.forEach(t => {
+  console.log(isEdit, 'isEdit');
+  
+  if(!isEdit){  
 
-        if(t.key == 'rowno' ||t.key == 'rowNo'){
-          t.disabled = true;
-          t.readonly = true;
-        }else{
-          t.disabled = false;
-          t.readonly = false;
-        }
-      })
-    })
-  } else {
     console.log('修订');
     // 修订
-    editColumns.forEach(item => {
+    updateColumns.forEach(item => {
 
       if (item.key == 'buyerName' || item.key == 'puDeptName' || item.key == 'deductionMoney' ||
         item.key == 'supplierContactsName' || item.key == 'agentName' || item.key == 'isInvoice' ||
@@ -67,7 +45,7 @@ export const forbidden = (isEdit) => {
       }
     })
 
-    editTabColumns.forEach(item => {
+    updateTabColumns.forEach(item => {
 
       item.tableColumns.forEach(t => {
 
@@ -88,6 +66,6 @@ export const forbidden = (isEdit) => {
 
   }
 
-  return { editColumns, editTabColumns }
+  return { updateColumns, updateTabColumns }
 
 }

+ 72 - 6
src/views/purchase/purchase-order/index.vue

@@ -86,6 +86,12 @@ export default {
     },
     // 查询操作
     handleQueryList() {
+      console.log(this.params,'this.params---------------------');
+      let {date} = this.params;
+      if(date){
+        this.params.startDate = date[0];
+        this.params.endDate = date[1];
+      }
       this.fetchList(this.params, this.page);
     },
     // 重置操作
@@ -317,16 +323,76 @@ export default {
       :model="params" 
       style="padding: 20px 0 0 0"
     >
-      <el-row :gutter="24" style="display:flex; flex-wrap: wrap;">
+      <el-row :gutter="24" >
         <el-col :span="20">
-          <el-row :gutter="20">
+          <el-row :gutter="20" style="display:flex; flex-wrap: wrap;">
             <el-col 
               v-for="column in showSearchColumns" 
               :key="column.title" 
               :xl="6" :lg="6" :md="8" :sm="12" :xs="24"
             >
               <el-form-item :prop="column.key" :label="column.title">
-                <el-input v-model="params[column.key]" :placeholder="column.placeholder"></el-input>
+
+                <el-input v-if="column.inputType === 'Input'" 
+                  v-model="params[column.key]" 
+                  :placeholder="column.placeholder"
+                ></el-input>
+                <dr-popover-select v-if="column.inputType === 'PopoverSelect'"
+                  v-model="params[column.key]"
+                  :source.sync="params"
+                  :title="column.title"
+                  :type="column.referName"
+                  :multiple="column.multiple"
+                  :readonly="column.readonly"
+                  :value-key="column.valueKey"
+                  :placeholder="column.placeholder"
+                  :data-mapping="column.dataMapping"
+                  :query-params="column.queryParams(params)"
+                ></dr-popover-select>
+                <!-- @keyup.enter.native="useQuery(params, page)" -->
+
+                <el-select v-if="column.inputType === 'Select'" 
+                v-model="params[column.key]" 
+                :disabled="column.disabled"
+                :clearable="column.clearable" 
+                :placeholder="column.placeholder" 
+                :multiple="column.multiple"
+                :collapse-tags="column.tags"
+                style="width: 100%"
+                >
+                <el-option 
+                  v-for="item in dict.type[column.referName]" 
+                  :key="item.value" 
+                  :label="item.label"
+                  :value="item.value"
+                  ></el-option>
+              </el-select>
+              <!-- 只有是否 -->
+              <el-select v-if="column.inputType === 'SelectCheck'" 
+                v-model="params[column.key]" 
+                :disabled="column.disabled"
+                :clearable="column.clearable" 
+                :placeholder="column.placeholder" 
+                style="width: 100%"
+                >
+                <el-option key="N" label="否" value="N"></el-option>
+                <el-option key="Y" label="是" value="Y"></el-option>
+              </el-select>
+
+              <el-date-picker v-if="column.inputType === 'DatePicker'" 
+                v-model="params[column.key]"
+                size="mini"
+                type="daterange"
+                :value-format="column.valueFormat"
+                :unlink-panels="column.unlinkPanels"
+                :picker-options="column.pickerOptions"
+                :range-separator="column.rangeSeparator"
+                :end-placeholder="column.endPlaceholder"
+                :start-placeholder="column.startPlaceholder"
+                :clearable="column.clearable"
+                style="width: 100%"
+              >
+              </el-date-picker>
               </el-form-item>
             </el-col>
           </el-row>
@@ -339,10 +405,10 @@ export default {
       </el-row>
     </el-form>
 
-    <!-- <el-divider>
+    <el-divider>
       <i :class="isSimpleSearch ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="cursor: pointer"
         @click="handleSearchChange"></i>
-    </el-divider> -->
+    </el-divider>
 
     <!-- 操作 -->
     <el-row :gutter="24" style="padding: 0 20px">
@@ -395,7 +461,7 @@ export default {
       >
 
         <template slot-scope="scope">
-          <dict-tag v-if="column.referName" 
+          <dict-tag v-if="column.inputType === 'Select'" 
             size="small" 
             :value="scope.row[column.key]"
             :options="dict.type[column.referName]"

+ 148 - 56
src/views/purchase/purchase-order/see/index.vue

@@ -162,48 +162,101 @@ export default {
           <el-col v-for="(column, index) in columns" :key="index" :span="column.span || 6">
             <el-form-item :prop="column.key" :label="column.title">
 
-              <el-input v-if="column.inputType === 'Input'" v-model="params[column.key]" :placeholder="column.placeholder"
-                :clearable="column.clearable" readonly style="width: 100%">
-              </el-input>
-              <dr-popover-select v-if="column.inputType === 'PopoverSelect'" v-model="params[column.key]" disabled
-                :value-key="column.valueKey" :source.sync="params" :title="column.title" :type="column.referName"
-                :multiple="column.multiple" :placeholder="column.placeholder" :data-mapping="column.dataMapping"
-                :query-params="column.queryParams">
-              </dr-popover-select>
+              <el-input v-if="column.inputType === 'Input'" 
+                v-model="params[column.key]" 
+                :placeholder="column.placeholder"
+                :clearable="column.clearable" 
+                readonly 
+                style="width: 100%"
+              ></el-input>
+              <dr-popover-select v-if="column.inputType === 'PopoverSelect'" 
+                v-model="params[column.key]" 
+                disabled
+                :value-key="column.valueKey" 
+                :source.sync="params" 
+                :title="column.title" 
+                :type="column.referName"
+                :multiple="column.multiple" 
+                :placeholder="column.placeholder" 
+                :data-mapping="column.dataMapping"
+                :query-params="column.queryParams"
+              ></dr-popover-select>
 
-              <el-input v-if="column.inputType === 'Textarea'" v-model="params[column.key]" type="textarea"
-                :placeholder="column.placeholder" :clearable="column.clearable" readonly style="width: 100%">
-              </el-input>
+              <el-input v-if="column.inputType === 'Textarea'" 
+                v-model="params[column.key]" 
+                type="textarea"
+                :placeholder="column.placeholder" 
+                :clearable="column.clearable" 
+                readonly 
+                style="width: 100%"
+              ></el-input>
 
-              <el-input-number v-if="column.inputType === 'InputNumber'" v-model="params[column.key]"
-                :controls-position="column.controlsPosition" :placeholder="column.placeholder"
-                :clearable="column.clearable" disabled style="width: 100%">
-              </el-input-number>
-              <el-select v-if="column.inputType === 'Select'" v-model="params[column.key]" disabled size="mini"
-                :clearable="column.clearable" :placeholder="column.placeholder" style="width: 100%">
-                <el-option v-for="item in dict.type[column.referName]" :key="item.value" :label="item.label"
-                  :value="item.value">
+              <el-input-number v-if="column.inputType === 'InputNumber'" 
+                v-model="params[column.key]"
+                :controls-position="column.controlsPosition" 
+                :placeholder="column.placeholder"
+                :clearable="column.clearable" 
+                disabled 
+                style="width: 100%"
+              ></el-input-number>
+              <el-select v-if="column.inputType === 'Select'" 
+                v-model="params[column.key]" 
+                disabled 
+                size="mini"
+                :clearable="column.clearable" 
+                :placeholder="column.placeholder" 
+                style="width: 100%">
+                <el-option 
+                  v-for="item in dict.type[column.referName]" 
+                  :key="item.value" 
+                  :label="item.label"
+                  :value="item.value"
+                >
                 </el-option>
               </el-select>
-              <el-select v-if="column.inputType === 'TagSelect'" v-model="params[column.key]" multiple clearable
-                collapse-tags :placeholder="column.placeholder" :clearable="column.clearable" disabled
+              <el-select v-if="column.inputType === 'TagSelect'" 
+                v-model="params[column.key]" 
+                multiple 
+                clearable
+                collapse-tags 
+                :placeholder="column.placeholder" 
+                :clearable="column.clearable" 
+                disabled
                 style="width: 100%">
                 <template #prefix>
-                  <el-icon class="el-icon-view" style="cursor: pointer" @click.stop="$message.info(234)"></el-icon>
+                  <el-icon class="el-icon-view" 
+                    style="cursor: pointer" 
+                    @click.stop="$message.info(234)">
+                  </el-icon>
                 </template>
-                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+                <el-option 
+                  v-for="item in options" 
+                  :key="item.value" 
+                  :label="item.label" 
+                  :value="item.value"
+                >
                 </el-option>
               </el-select>
-              <el-date-picker v-if="column.inputType === 'DatePicker'" v-model="params[column.key]" :type="column.type"
-                :placeholder="column.placeholder" :clearable="column.clearable" readonly
-                :picker-options="column.pickerOptions" style="width: 100%">
-              </el-date-picker>
-              <el-checkbox v-if="column.inputType === 'Checkbox'" v-model="params[column.key]" disabled true-label="Y"
-                false-label="N">
-              </el-checkbox>
-              <file-upload-center v-if="column.inputType === 'Upload'" v-model="params[column.key]"
-                :file-type="column.fileType" :disabled="true">
-              </file-upload-center>
+              <el-date-picker v-if="column.inputType === 'DatePicker'" 
+                v-model="params[column.key]" 
+                :type="column.type"
+                :placeholder="column.placeholder" 
+                :clearable="column.clearable" 
+                readonly
+                :picker-options="column.pickerOptions" 
+                style="width: 100%"
+              ></el-date-picker>
+              <el-checkbox v-if="column.inputType === 'Checkbox'" 
+                v-model="params[column.key]" 
+                disabled 
+                true-label="Y"
+                false-label="N"
+              ></el-checkbox>
+              <file-upload-center v-if="column.inputType === 'Upload'" 
+                v-model="params[column.key]"
+                :file-type="column.fileType" 
+                :disabled="true"
+              ></file-upload-center>
             </el-form-item>
           </el-col>
         </el-row>
@@ -215,40 +268,79 @@ export default {
         position: 'relative',
       }" style="margin: 10px">
         <el-tabs v-model="tabName" style="width: 100%">
-          <el-tab-pane v-for="(column, index) in tabColumns" :key="index" :label="column.title" :name="column.key">
+          <el-tab-pane 
+            v-for="(column, index) in tabColumns" 
+            :key="index" 
+            :label="column.title" 
+            :name="column.key"
+          >
             <el-table :data="params[column.key]" style="width: 100%">
-              <el-table-column v-for="(cColumn, cIndex) in column.tableColumns" :key="cIndex" :prop="cColumn.key"
-                :label="cColumn.title" :width="cColumn.width || 80">
+              <el-table-column 
+                v-for="(cColumn, cIndex) in column.tableColumns" 
+                :key="cIndex" 
+                :prop="cColumn.key"
+                :label="cColumn.title" 
+                :width="cColumn.width || 80"
+              >
                 <template slot-scope="scope">
                   <el-tag v-if="cColumn.key === 'index'">
                     {{ scope.$index + 1 }}
                   </el-tag>
-                  <el-input v-if="cColumn.inputType === 'Input'" v-model="scope.row[cColumn.key]"
-                    :placeholder="cColumn.placeholder" :clearable="cColumn.clearable" readonly size="mini"
-                    style="width: 100%"></el-input>
+                  <el-input v-if="cColumn.inputType === 'Input'" 
+                    v-model="scope.row[cColumn.key]"
+                    :placeholder="cColumn.placeholder" 
+                    :clearable="cColumn.clearable" 
+                    readonly 
+                    size="mini"
+                    style="width: 100%"
+                  ></el-input>
 
                   <!--  -->
-                  <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'" v-model="scope.row[cColumn.key]"
-                    :source.sync="scope.row" :title="cColumn.title" :value-key="cColumn.valueKey" disabled
-                    :type="cColumn.referName" :multiple="cColumn.multiple" :placeholder="cColumn.placeholder"
-                    :data-mapping="cColumn.dataMapping" :query-params="cColumn.queryParams(scope.row)" size="mini">
-                  </dr-popover-select>
+                  <dr-popover-select v-if="cColumn.inputType === 'PopoverSelect'"
+                    v-model="scope.row[cColumn.key]"
+                    :source.sync="scope.row" 
+                    :title="cColumn.title" 
+                    :value-key="cColumn.valueKey" 
+                    disabled
+                    :type="cColumn.referName" 
+                    :multiple="cColumn.multiple" 
+                    :placeholder="cColumn.placeholder"
+                    :data-mapping="cColumn.dataMapping" 
+                    :query-params="cColumn.queryParams" 
+                    size="mini"
+                  ></dr-popover-select>
 
-                  <el-input-number v-if="cColumn.inputType === 'InputNumber'" v-model="scope.row[cColumn.key]"
-                    :controls-position="cColumn.controlsPosition" :placeholder="cColumn.placeholder"
-                    :clearable="cColumn.clearable" disabled size="mini" style="width: 100%">
-                  </el-input-number>
+                  <el-input-number v-if="cColumn.inputType === 'InputNumber'" 
+                    v-model="scope.row[cColumn.key]"
+                    :controls-position="cColumn.controlsPosition" 
+                    :placeholder="cColumn.placeholder"
+                    :clearable="cColumn.clearable" 
+                    disabled 
+                    size="mini" 
+                    style="width: 100%"
+                  ></el-input-number>
 
-                  <el-select v-if="cColumn.inputType === 'Select'" v-model="scope.row[cColumn.key]" disabled size="mini"
-                    :clearable="cColumn.clearable" :placeholder="cColumn.placeholder" style="width: 100%">
-                    <el-option v-for="item in dict.type[cColumn.referName]" :key="item.value" :label="item.label"
-                      :value="item.value">
-                    </el-option>
+                  <el-select v-if="cColumn.inputType === 'Select'" 
+                    v-model="scope.row[cColumn.key]" 
+                    disabled 
+                    size="mini"
+                    :clearable="cColumn.clearable" 
+                    :placeholder="cColumn.placeholder" 
+                    style="width: 100%">
+                    <el-option 
+                      v-for="item in dict.type[cColumn.referName]" 
+                      :key="item.value" 
+                      :label="item.label"
+                      :value="item.value"
+                    ></el-option>
                   </el-select>
 
-                  <el-checkbox v-if="cColumn.inputType === 'Checkbox'" v-model="scope.row[cColumn.key]" disabled
-                    true-label="Y" false-label="N">
-                  </el-checkbox>
+                  <el-checkbox v-if="cColumn.inputType === 'Checkbox'" 
+                    v-model="scope.row[cColumn.key]" 
+                    disabled
+                    true-label="Y" 
+                    false-label="N"
+                  ></el-checkbox>
 
                 </template>
               </el-table-column>

+ 36 - 0
src/views/purchase/transferOrder/add.vue

@@ -276,6 +276,15 @@
               </el-form-item>
             </template>
           </el-table-column>
+          <el-table-column show-overflow-tooltip label="调入部门" align="center" prop="storageDeptName" width="230px">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.storageDeptName" @focus="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '调入部门', basicForm.storageInventoryOrg)"">
+                  <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '调入部门', basicForm.storageInventoryOrg)"></el-button>
+                </el-input>
+              </el-form-item>
+            </template>
+          </el-table-column>
           <el-table-column show-overflow-tooltip label="调入货位" align="center" prop="storageAllocationName" width="230px">
             <template slot-scope="scope">
               <el-form-item class="hang">
@@ -317,6 +326,7 @@
                   :readonly="sonDisable"
                   type="date"
                   size="small"
+                  :picker-options="pickerOptionsEnd"
                   value-format="yyyy-MM-dd">
                 </el-date-picker>
               </el-form-item>
@@ -681,6 +691,17 @@ export default {
       receiveInfo: [],
       priceList: [],
       resultList: [],
+      pickerOptionsEnd: {
+        disabledDate: (time) => {
+          let beginDateVal = this.basicForm.billDate;
+          if (beginDateVal) {
+            return (
+              time.getTime() <
+              new Date(beginDateVal).getTime()
+            );
+          }
+        }
+      }
     }
   },
   created() {
@@ -813,6 +834,8 @@ export default {
         storageWarehouseName: null,
         deliveryAllocationName: null,
         deliveryAllocation: null,
+        storageDept: null,
+        storageDeptName: null,
         storageAllocationName: null,
         storageAllocation: null,
         patchNo: null,
@@ -900,6 +923,10 @@ export default {
         this.materialInfo[this.tableIndex].storageAllocationName = selection[0].name
         this.materialInfo[this.tableIndex].storageAllocation = selection[0].id
       }
+      if (this.referCondition.title == '调入部门') {
+        this.materialInfo[this.tableIndex].storageDeptName = selection[0].name
+        this.materialInfo[this.tableIndex].storageDept = selection[0].id
+      }
     },
     chooseTreeRefer(type, isPage, title) {
       this.referCondition.type = type
@@ -955,6 +982,15 @@ export default {
       this.referCondition.stordocId = stordocId
       this.$refs.refer.init(this.referCondition)
     },
+    // 明细行选择调入部门
+    chooseMxBM(index, type, isPage, title, pkOrg) {
+      this.tableIndex = index
+      this.referCondition.type = type
+      this.referCondition.isPage = isPage
+      this.referCondition.title = title
+      this.referCondition.pkOrg = pkOrg
+      this.$refs.refer.init(this.referCondition)
+    },
   }
 }
 </script>

+ 1 - 1
src/views/purchase/transferOrder/index.vue

@@ -102,7 +102,7 @@
         >
           <el-table-column show-overflow-tooltip label="调出库存" align="center" prop="deliveryInventoryOrgName" width="150px"/>
           <el-table-column show-overflow-tooltip label="订单类型" align="center" prop="billType" width="150px"/>
-          <el-table-column show-overflow-tooltip label="单据号" align="center" prop="code" width="150px"/>
+          <el-table-column show-overflow-tooltip label="单据号" align="center" prop="code" width="180px"/>
           <el-table-column show-overflow-tooltip label="单据日期" align="center" prop="billDate" width="150px"/>
           <el-table-column show-overflow-tooltip label="调拨方式" align="center" prop="allotType" width="150px">
             <template slot-scope="scope">

+ 1 - 1
vue.config.js

@@ -43,7 +43,7 @@ module.exports = {
         // target: `http://172.16.63.202:8000/drp-admin`, // D本地
         // target: `http://172.16.62.241:8000/drp-admin`, //笑寒本地
         // target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
-        // target: `http://172.16.13.47:8000/drp-admin`, //石杨本地
+        // target: `http://172.16.13.47:8000/drp-admin`, //这是一个美女的本地
         // target: `http://172.16.13.113:8000/drp-admin`, //DWT本地
         // target: `http://172.16.13.77:8000/drp-admin`, //TQ本地
         // target: `http://172.16.13.21:8000/drp-admin`, // 雪豹的本地