ソースを参照

更新了牧场挂历及备件申购页面

duanxiaoduan 1 年間 前
コミット
02cb5a79b1

ファイルの差分が大きいため隠しています
+ 0 - 0
dist/index.html


+ 33 - 4
src/views/console/ranchManagement/index.vue

@@ -36,6 +36,8 @@
         <el-table-column label="牧场编号" min-width="150px" align="center" prop="pastureNumber" />
         <el-table-column label="地图经度" min-width="150px" align="center" prop="longitude" />
         <el-table-column label="地图纬度" min-width="150px" align="center" prop="latitude" />
+        <el-table-column label="供应负责人" min-width="150px" align="center" prop="empname" />
+        <el-table-column label="负责人电话" min-width="150px" align="center" prop="tel" />
         <el-table-column label="备注" min-width="150px" align="center" prop="note" />
         <el-table-column label="顺序" min-width="150px" align="center" prop="sort" />
         <el-table-column label="操作" align="center" width="230" class-name="small-padding fixed-width" fixed="right">
@@ -108,6 +110,22 @@
               </el-form-item>
             </el-col>
           </el-row>
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="供应负责人:" prop="empId">
+                <el-select  v-model="create.temp.empId" filterable placeholder="供应负责人" style="width: 100%;" :disabled="create.dialogStatus =='see'"  @change="changeEmp">
+                  <el-option  v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="负责人电话:" prop="tel">
+                <el-input ref="tel" v-model="create.temp.tel"  disabled style="width: 100%;" />
+              </el-form-item>
+            </el-col>
+          </el-row>
           <el-row>
             <el-col :span="24">
               <el-form-item label="备注:" prop="note">
@@ -145,9 +163,11 @@ export default {
       myHeight:document.documentElement.clientHeight - 85- 200,
       requestParams: [
         { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
-        { name: 'getareaList', offset: 0, pagecount: 0, returntype: 'Map', parammaps: {}}
+        { name: 'getareaList', offset: 0, pagecount: 0, returntype: 'Map', parammaps: {}},
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
       ],
       findAllPasture: [],
+      findAllEmploye: [],
       regionList: [], // 所属区域
       areaIds:[],
       table: {
@@ -174,7 +194,7 @@ export default {
           pastureNumber: [{ required: true, message: '必填', trigger: 'blur' }]
         },
         temp: {
-          areaId: '', pastureName: '', pastureNumber: '', longitude: '', latitude: '', note: '', sort: '',center:''
+          areaId: '', pastureName: '', pastureNumber: '', longitude: '', latitude: '', note: '', sort: '',center:'',empId:'',tel:''
         }
       },
       postDataParam: {},
@@ -193,6 +213,7 @@ export default {
       GetDataByNames(this.requestParams).then(response => {
         this.findAllPasture = response.data.findAllPasture.list
         this.regionList = response.data.getareaList.list
+        this.findAllEmploye = response.data.findAllEmploye.list
         this.regionList.forEach(row => {
           this.areaIds[row.id]= row.name
         });
@@ -225,6 +246,8 @@ export default {
       this.create.temp.note = ''
       this.create.temp.sort = ''
       this.create.temp.center = ''
+      this.create.temp.empId = ''
+      this.create.temp.tel = ''
     },
     form_add() {
       this.resetCreateTemp()
@@ -234,6 +257,10 @@ export default {
         this.$refs['createTemp'].clearValidate()
       })
     },
+    changeEmp(item){
+      console.log(item)
+      this.create.temp.tel = this.findAllEmploye.find(obj => obj.id == item).tel
+    },
     add_dialog_save() {
       this.$refs['createTemp'].validate(valid => {
         if (valid) {
@@ -250,7 +277,8 @@ export default {
             latitude: this.create.temp.latitude,
             note: this.create.temp.note,
             center:this.create.temp.center,
-            companyName: this.create.temp.companyName
+            companyName: this.create.temp.companyName,
+            empId: this.create.temp.empId
           }}
           this.postDataParam.data[1] = { 'name': 'insertPastureDept', 'type': 'e', 'parammaps': {
             pastureName: this.create.temp.pastureName,
@@ -295,7 +323,8 @@ export default {
             latitude: this.create.temp.latitude,
             note: this.create.temp.note,
             id: this.create.temp.id,
-            sort: this.create.temp.sort
+            sort: this.create.temp.sort,
+            empId: this.create.temp.empId
           }}
           this.postDataParam.data[1] = { 'name': 'updateDepartment', 'type': 'e', 'parammaps': {
             dname: this.create.temp.pastureName,

+ 83 - 48
src/views/custom/subscribe/index.vue

@@ -26,7 +26,7 @@
       <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
       <div>
 
-        <el-button v-if="isSubscribeAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
+        <el-button v-if="isSubscribeAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="apply_subscribe">新增</el-button>
         <el-button v-if="isSubscribeSpecial" class="filter-item" type="primary" icon="el-icon-edit" @click="handle_specialSubscription">特殊申购</el-button>
         <el-button v-if="isSubscribeExport" v-waves class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
         <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
@@ -574,44 +574,50 @@
     <!-- 查看备件 -->
     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_seepart" :close-on-click-modal="false" width="90%">
       <div>
-        <el-table
-          :key="tableKey"
-          v-loading="listLoading"
-          element-loading-text="给我一点时间"
-          :data="seepartList"
-          border
-          fit
-          highlight-current-row
-          style="width: 100%;margin-bottom:30px"
-          :row-style="rowStyle"
-          :cell-style="cellStyle"
-          class="elTable"
-          height="500"
-        >
-          <!-- table表格 -->
-          <el-table-column label="序号" align="center" type="index" width="50px" />
-          <el-table-column label="备件编号" prop="partCode" align="center" min-width="90" />
-          <el-table-column label="备件名称" prop="partCode" align="center" min-width="90" />
-          <el-table-column label="备件规格" prop="partCode" align="center" min-width="90" />
-          <el-table-column label="备件图片" prop="partCode" align="center" min-width="90">
-          <template slot-scope="scope">
-              <el-popover placement="right" title="" trigger="hover">
-                <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
-                <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
-              </el-popover>
-            </template>
-          </el-table-column>
-          <el-table-column label="备件品牌" prop="partCode" align="center" min-width="90" />
-          <el-table-column label="计量单位" prop="partCode" align="center" min-width="90" />
-          <el-table-column label="现有库存" prop="partCode" align="center" min-width="90" />
-          <el-table-column label="价格" prop="partCode" align="center" min-width="90" />
-          <el-table-column label="牧场" prop="partCode" align="center" min-width="90" />
-          <el-table-column label="负责人" prop="partCode" align="center" min-width="90" />
-          <el-table-column label="联系方式" prop="partCode" align="center" min-width="90" />
-        </el-table>
+        <el-input v-model="seepart.getdataListParm.parammaps.partName" placeholder="备件" style="width: 200px;" class="filter-item" />
+        <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="seepart_search">搜索</el-button>
+        <h3 v-if="seepartList.length == 0" style="text-align: center;height: 300px;line-height:300px;">呆滞库存查询(如可调拨使用,请优先消耗)</h3>
+        <div v-else>
+          <el-table
+            :key="seepart.tableKey"
+            v-loading="seepart.listLoading"
+            element-loading-text="给我一点时间"
+            :data="seepartList"
+            border
+            fit
+            highlight-current-row
+            style="width: 100%;margin-bottom:30px;margin-top:20px;"
+            :row-style="rowStyle"
+            :cell-style="cellStyle"
+            class="elTable"
+            height="300"
+          >
+            <el-table-column label="序号" align="center" type="index" width="50px" />
+            <el-table-column label="备件编号" prop="partCode" align="center" min-width="90" />
+            <el-table-column label="备件名称" prop="partName" align="center" min-width="90" />
+            <el-table-column label="备件规格" prop="specification" align="center" min-width="90" />
+            <el-table-column label="备件图片" prop="picpath" align="center" min-width="90">
+            <template slot-scope="scope">
+                <el-popover placement="right" title="" trigger="hover">
+                  <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
+                  <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
+                </el-popover>
+              </template>
+            </el-table-column>
+            <el-table-column label="备件品牌" prop="brand" align="center" min-width="90" />
+            <el-table-column label="计量单位" prop="unit" align="center" min-width="90" />
+            <el-table-column label="现有库存" sortable prop="reportery" align="center" min-width="60" />
+            <el-table-column label="价格" sortable prop="price" align="center" min-width="60" />
+            <el-table-column label="在库天数" sortable prop="daysInStorage" align="center" min-width="60" />
+            <el-table-column label="牧场" sortable prop="amount" align="center" min-width="60" />
+            <el-table-column label="负责人" prop="dutyPersonal" align="center" min-width="90" />
+            <el-table-column label="联系方式" prop="telphone" align="center" min-width="90" />
+          </el-table>
+          <pagination v-show="seepart.total>0" :total="seepart.total" :page.sync="seepart.getdataListParm.offset" :limit.sync="seepart.getdataListParm.pagecount" @pagination="get_seepart_data" />
+        </div>
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" :disabled="isokDisable" @click="apply_subscribe()">继续申购</el-button>
+        <el-button type="primary" :disabled="isokDisable" @click="form_add()">继续申购</el-button>
         <el-button @click="dialogFormVisible_seepart = false;">取消</el-button>
       </div>
     </el-dialog>
@@ -784,6 +790,18 @@ export default {
       providerList:[],
       dialogFormVisible_seepart:false,
       seepartList:[],
+      seepart:{
+        tableKey: 0,
+        listLoading: true,
+        total: 0,
+        getdataListParm: {
+          page: 1, offset: 1, pagecount: 10,
+          name:'getIdleSpareParts',
+          parammaps:{
+            partName:''
+          }
+        }
+      },
       apply_subscribeData:{},
       myHeight:document.documentElement.clientHeight - 85- 150
     }
@@ -1032,6 +1050,7 @@ export default {
       this.getCreateDepartDownList()
       this.dialogStatus = 'create'
       this.dialogFormVisible = true
+      this.dialogFormVisible_seepart = false
       this.$nextTick(() => {
         this.$refs['createTemp'].clearValidate()
       })
@@ -1098,19 +1117,35 @@ export default {
       if(this.dialogStatus==='special' && this.createTemp.purchaseType == '1' && this.createTemp.providerId == ''){
         this.createTemp.providerId = item.providerId
       }
-      if(this.dialogStatus==='special'){
-        this.public_select(item)
-      }else{
-        this.dialogStatus = 'seepart'
-        this.dialogFormVisible_seepart = true
-        this.$refs.autocomplete.activated = false;
-        this.seepartList = []
-        this.apply_subscribeData = item
-      }
+      this.public_select(item)
     },
     apply_subscribe(){
-      this.public_select(this.apply_subscribeData)
-      this.dialogFormVisible_seepart = false
+      this.dialogStatus = 'seepart'
+      this.seepartList = []
+      console.log(this.seepartList.length,'===')
+      this.dialogFormVisible_seepart = true
+      // this.apply_subscribeData = item
+    },
+    seepart_search(){
+      this.get_seepart_data()
+    },
+    get_seepart_data() {
+      this.seepart.listLoading = true
+      GetDataByName(this.seepart.getdataListParm).then(response => {
+        if (response.data.list !== null) {
+          console.log('table数据', response.data.list)
+          this.seepartList = response.data.list
+          this.seepart.pageNum = response.data.pageNum
+          this.seepart.pageSize = response.data.pageSize
+        } else {
+          this.seepartList = []
+        }
+        this.seepart.total = response.data.total
+
+        setTimeout(() => {
+          this.seepart.listLoading = false
+        }, 100)
+      })
     },
     public_select(item){
       if (this.createTemp.providerId == '') {

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません