Bladeren bron

1.将查询改为搜索
2.按钮顺序调整,确认在左,取消在右,整体在明细框右上
3.解决采购订单维护编辑保存的出现手工单物料信息全部删除与还能保存的问题
4.调整采购订单维护列表分页
5.采购订单维护界面中台采购订单号,OA需求单号需要去掉
6.采购订单维护界面编辑累计付款金额和发票金额不能修改
7.采购订单维护界面提示弹框放右边

002390 1 jaar geleden
bovenliggende
commit
b78d2ca262

+ 4 - 3
src/components/popover-select-v2/index.vue

@@ -213,9 +213,6 @@ export default {
       append-to-body
     >
       <div slot="footer">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
         <el-button
           type="primary"
           :size="$attrs.size"
@@ -223,6 +220,10 @@ export default {
           @click="useConfirm(selectData)"
           >确 认</el-button
         >
+        <el-button :size="$attrs.size" :loading="loading" @click="hide"
+          >取 消</el-button
+        >
+        
       </div>
       <el-form
         v-loading="loading"

+ 4 - 3
src/components/popover-select-v2/multiple.vue

@@ -179,9 +179,6 @@ export default {
       append-to-body
     >
       <div slot="footer">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
         <el-button
           type="primary"
           :size="$attrs.size"
@@ -189,6 +186,10 @@ export default {
           @click="useConfirm(selectData)"
           >确 认</el-button
         >
+        <el-button :size="$attrs.size" :loading="loading" @click="hide"
+          >取 消</el-button
+        >
+        
       </div>
       <el-form
         v-loading="loading"

+ 4 - 3
src/components/popover-select/index.vue

@@ -331,12 +331,13 @@ export default {
         />
       </el-form>
       <div style="margin-top: 20px; text-align: right">
-        <el-button :size="size" @click="useCancel(lastSelectData)">
-          取 消
-        </el-button>
         <el-button :size="size" @click="useConfirm(selectData)">
           确 定
         </el-button>
+        <el-button :size="size" @click="useCancel(lastSelectData)">
+          取 消
+        </el-button>
+        
       </div>
     </el-dialog>
     <div

+ 4 - 3
src/components/popover-tree-select/index.vue

@@ -210,9 +210,6 @@ export default {
       append-to-body
     >
       <div slot="footer">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
         <el-button
           type="primary"
           :size="$attrs.size"
@@ -220,6 +217,10 @@ export default {
           @click="useConfirm(selectData)"
           >确 认</el-button
         >
+        <el-button :size="$attrs.size" :loading="loading" @click="hide"
+          >取 消</el-button
+        >
+        
       </div>
       <el-form
         v-loading="loading"

+ 4 - 3
src/components/popover-tree-select/multiple.vue

@@ -196,9 +196,6 @@ export default {
       append-to-body
     >
       <div slot="footer">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
         <el-button
           type="primary"
           :size="$attrs.size"
@@ -206,6 +203,10 @@ export default {
           @click="useConfirm(selectData)"
           >确 认</el-button
         >
+        <el-button :size="$attrs.size" :loading="loading" @click="hide"
+          >取 消</el-button
+        >
+        
       </div>
       <el-form
         v-loading="loading"

+ 1 - 1
src/components/super-search/index.vue

@@ -169,7 +169,7 @@ export default {
           icon="el-icon-search"
           @click="$emit('submit')"
         >
-          查 询
+          搜 索
         </el-button>
         <el-button
           :size="$attrs.size"

+ 7 - 7
src/views/purchase/purchase-order/add/column.js

@@ -21,12 +21,12 @@ export const Columns = [
     isShow:true,
     require: true,
   },
-  { 
-    key: "oaDemandNo", 
-    title: "OA需求单号", 
-    inputType: "Input",  
-    isShow:true,
-  },
+  // { 
+  //   key: "oaDemandNo", 
+  //   title: "OA需求单号", 
+  //   inputType: "Input",  
+  //   isShow:true,
+  // },
   { 
     key: "erpOrderCode", 
     title: "erp订单编号", 
@@ -465,7 +465,7 @@ export const Columns = [
 
   },
   { key: "isArrivalReson", title: "到货超期原因", inputType: "Input", isShow:true, },
-  { key: "midOrderNo", title: "中台采购订单号", inputType: "Input", isShow:true, },
+  // { key: "midOrderNo", title: "中台采购订单号", inputType: "Input", isShow:true, },
   { key: "marketingCode", title: "销售订单号", inputType: "Input", isShow:true, },
   { key: "isArrival", title: "到货超期", inputType: "Checkbox",  isShow:true,},
   { key: "createByName", title: "创建人", inputType: "Input", isShow:false, },

+ 16 - 10
src/views/purchase/purchase-order/add/index.vue

@@ -248,8 +248,10 @@ export default {
         if (valid) {
 
           if(!this.params['puOrderItemList'].length || !this.params['puOrderExecuteList'].length){
-
-            this.$message.error('请填写订单行!');
+            this.$notify.error({
+              title: '错误',
+              message: '请填写订单行!'
+            });
             return false;
           }
 
@@ -258,14 +260,20 @@ export default {
 
          if(isPrice.length){
 
-            this.$message.error('询价失败!');
+            this.$notify.error({
+              title: '错误',
+              message: '询价失败!'
+            });
             return false
 
          }
          console.log(isPrice,'isPrice');
           cb();
         } else {
-          this.$message.error('存在必填项未填写');
+          this.$notify.error({
+              title: '错误',
+              message: '存在必填项未填写'
+            });
           console.log('error submit!!');
           return false;
         }
@@ -534,15 +542,12 @@ export default {
         >
           <h3>新增</h3>
           <div style="text-align: right">
-            <el-button size="mini" @click="handleCancel">取消</el-button>
             <el-button 
               size="mini" 
-              type="danger"
+              type="primary"
               @click="handleSava"
             >保存</el-button>
-            <!-- <el-button size="mini" type="info" @click="handleSubmit">
-              保存并新增
-            </el-button> -->
+            <el-button size="mini" @click="handleCancel">取消</el-button>
           </div>
         </div>
         <el-row style="display: flex; flex-wrap: wrap">
@@ -592,6 +597,7 @@ export default {
 
               <el-input-number
                 v-if="column.inputType === 'InputNumber'"
+                :min="column.min || 0"
                 v-model="params[column.key]"
                 :precision="column.precision"
                 :controls-position="column.controlsPosition"
@@ -694,7 +700,6 @@ export default {
               <el-table-column
                 v-for="(cColumn, cIndex) in column.tableColumns"
                 :key="cIndex"
-                
                 :label="cColumn.title"
                 :width="cColumn.width || 80"
               >
@@ -739,6 +744,7 @@ export default {
                       v-if="cColumn.inputType === 'InputNumber'"
                       v-model="scope.row[cColumn.key]"
                       :precision="cColumn.precision"
+                      :min="column.min || 0"
                       :controls-position="cColumn.controlsPosition"
                       :placeholder="cColumn.placeholder"
                       @change="handleInputChange(scope.row, cColumn.key)"

+ 6 - 6
src/views/purchase/purchase-order/column.js

@@ -303,12 +303,12 @@ export const TableColumns = [
     },
   },
   // { item:{key: "flowId", title: "OA流程ID" },
-  { 
-    item:{ key: "oaDemandNo", title: "OA需求单号" ,},
-    attr:{
-      isHidden:true,
-    },
-  },
+  // { 
+  //   item:{ key: "oaDemandNo", title: "OA需求单号" ,},
+  //   attr:{
+  //     isHidden:true,
+  //   },
+  // },
   { 
     item:{
       key: "erpOrderCode", 

+ 24 - 10
src/views/purchase/purchase-order/edit/index.vue

@@ -69,13 +69,15 @@ export default {
     handleSynchronousMaterial(tableOne, tableTwo) {
       let _this = this;
       // this.params[tableOne]-- -> this.params[tableTwo]
-      this.params[tableOne] &&
+      this.params[tableOne] && this.params[tableOne].length &&
 
         this.params[tableOne].forEach((item, index) => {
 
           for (const key in item) {
 
-            if (key in _this.params[tableTwo][index]) {
+            if ( _this.params[tableTwo][index] &&
+              ( key in _this.params[tableTwo][index])
+            ) {
 
                 _this.params[tableTwo][index].material = item.material;
 
@@ -178,21 +180,29 @@ export default {
     },
     // 判断保存条件
     judgeSaveCondition(cb){
+      const _this = this;
       this.$refs['orderEditForm'].validate(async (valid) => {
         if (valid) {
 
-          // 执行结果在审批之后出现 !this.params['puOrderExecuteList'].length
-          if(!this.params['puOrderItemList'].length ){
-
-            this.$message.error('请填写订单行!');
+          // 执行结果在审批之后出现 
+          let validList = _this.params['puOrderItemList'].filter(item => item.delFlag === '0');
+          if(!validList.length ){
+            _this.$notify.error({
+              title: '错误',
+              message: '请填写订单行!'
+            });
+            
             return false;
           }
 
-          let isPrice =  this.params.puOrderItemList.filter(item => !item.whetherCompleteInquiry);
+          let isPrice =  _this.params.puOrderItemList.filter(item => !item.whetherCompleteInquiry);
 
          if(isPrice.length){
 
-            this.$message.error('询价失败!');
+          _this.$notify.error({
+              title: '错误',
+              message: '询价失败!'
+            });
             return false
 
          }
@@ -200,7 +210,10 @@ export default {
           cb();
 
         } else {
-          this.$message.error('存在必填项未填写');
+          _this.$notify.error({
+              title: '错误',
+              message: '存在必填项未填写'
+            });
           console.log('error submit!!');
           return false;
         }
@@ -487,8 +500,8 @@ export default {
           ">
           <h3>{{ handleIsRevise() ? '修订' : '编辑' }}</h3>
           <div style="text-align: right">
+            <el-button :size="size" type="primary" @click="handleSava">更 新</el-button>
             <el-button :size="size" @click="handleCancel">取 消</el-button>
-            <el-button :size="size" type="danger" @click="handleSava">更 新</el-button>
           </div>
         </div>
         <el-row style="display:flex; flex-wrap: wrap;">
@@ -531,6 +544,7 @@ export default {
               <el-input-number v-if="column.inputType === 'InputNumber'" 
                 v-model="params[column.key]"
                 :precision="column.precision"
+                :min="column.min || 0"
                 :max="handleIsRevise() ? params[column.key] : Infinity"
                 :controls-position="column.controlsPosition" 
                 :placeholder="column.placeholder"

+ 9 - 0
src/views/purchase/purchase-order/edit/initColumn.js

@@ -49,6 +49,15 @@ export const forbidden = (isEdit,source) => {
 
       })
     }
+
+    updateColumns.forEach(item => {
+
+      if (item.key == 'paymentMoney' || item.key == 'invoiceMoney') {
+        item.disabled = true;
+      }
+    })
+
+
   }
   else{  
 

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

@@ -224,12 +224,7 @@ export default {
 
           success();
 
-        }).catch(() => {
-
-          this.$message({
-            type: 'info',
-            message: '已取消操作!'
-          });          
+        }).catch(() => {        
         });
     },
 
@@ -269,7 +264,8 @@ export default {
         this.fetchSubmit(puOrderIds);
       
       }else{
-        this.$message({
+        this.$notify({
+          title: '警告',
           message: '当前选中存在不满足提交条件的数据!',
           type: 'warning'
         });
@@ -499,6 +495,9 @@ export default {
       }
     },
     judgeIsOption(type,source){
+      // status: 0=自由态,1=审批中,2=已审核,3=已驳回 4=提交中
+      // source: 1=自动协议直采,2=协议直采,3=手工
+      // isEnd:整单关闭标识
       switch(type){
         case 'edit':
           return (source.status == '0' || source.status == '3') && source.isEnd === 'N';
@@ -542,8 +541,8 @@ export default {
     ></el-super-search>
   
     <!-- 操作 -->
-    <el-row :gutter="24" style="padding: 0 20px">
-      <el-col :span="24" style="text-align: right;margin: 0 10px 0 0">
+    <el-row :gutter="24" type="flex" justify="end">
+      <el-col :span="24" style="text-align: right;">
         <el-button size="mini" type="primary" @click="handleOpenAddDrawer"
           v-hasPermi="['material:order:add']">新增</el-button>
        
@@ -574,6 +573,7 @@ export default {
     <el-super-table
       v-model="tableData"
       size="mini"
+      max-height="480"
       :dict="dict"
       :columns="tableColumns"
       hideOperationColumns
@@ -629,6 +629,7 @@ export default {
       :total="page.total"
       :page.sync="page.pageNum"
       :limit.sync="page.pageSize"
+      :page-sizes="[10,20,50,100,500,1000]"
       @pagination="fetchList(params, page)"
     />
    
@@ -651,6 +652,7 @@ export default {
           <el-super-table
             v-model="tabTableDatas[column.key]"
             size="mini"
+            max-height="200"
             :dict="dict"
             hideOperationColumns
             stroage