ymy 2 年之前
父节点
当前提交
b6efbb2031

+ 9 - 9
src/benyun/components/byForm/byForm.vue

@@ -10,7 +10,7 @@
     v-bind="$attrs" 
     :disabled="attrs.disabled"
     :label-width="attrs.labelWidth"
-    :rules="attrs.readonly?[]:attrs.rules"
+    :rules="attrs.readonly?{}:attrs.rules"
     :label-position="attrs.labelPosition ? attrs.labelPosition : ''">
       <el-row class="form-row" v-for="(itemChild,index) of columns" :key="index">
         <el-col v-for="(item,_ind) of itemChild" :span="item.span" :key="'itemChild'+_ind">
@@ -25,7 +25,7 @@
             <component v-bind:is="item.component" 
               class="form-comp"
               :propConfig="item.compConfig" 
-              :ref="item.prop+'Comp'" 
+              :ref="item.prop+suffixCode" 
               :parentValue="value"
               :propValue="value[item.prop]" 
               @onChange="onChange($event,item)" 
@@ -79,7 +79,7 @@ import VueViews from '@/benyun/compVue/VueViews'
 @Component
 export default class ByForm extends VueViews {
   value:any={}
-  
+  suffixCode="--comp"
   get columns(){
     let columns:Array<any> = this.config?.columns ? this.config.columns : []
       //分栏设置
@@ -149,8 +149,8 @@ export default class ByForm extends VueViews {
     if(this.columns.length > 0){
       for(const itemData of this.columns){
         for(const item of itemData){
-          if(this.$refs[item.prop+'Comp'] && (this.$refs[item.prop+'Comp'] as any)[0] && (this.$refs[item.prop+'Comp'] as any)[0].setConfig){
-            (this.$refs[item.prop+'Comp'] as any)[0].setConfig(item.compConfig)
+          if(this.$refs[item.prop+this.suffixCode] && (this.$refs[item.prop+this.suffixCode] as any)[0] && (this.$refs[item.prop+this.suffixCode] as any)[0].setConfig){
+            (this.$refs[item.prop+this.suffixCode] as any)[0].setConfig(item.compConfig)
           }
         }
       }
@@ -160,7 +160,7 @@ export default class ByForm extends VueViews {
   //清除下级组件组件值
   clearChildrenComp(){
     for(const key in this.$refs){
-      if(key.indexOf('Comp') >= 0 && (this as any).$refs[key][0] && (this as any).$refs[key][0].clearValue){
+      if(key.indexOf(this.suffixCode) >= 0 && (this as any).$refs[key][0] && (this as any).$refs[key][0].clearValue){
         (this as any).$refs[key][0].clearValue()
       }
     }
@@ -168,7 +168,7 @@ export default class ByForm extends VueViews {
   //下级组件默认值
   defaultHandle(){
     for(const key in this.$refs){
-      if(key.indexOf('Comp') >= 0 && (this as any).$refs[key][0] && (this as any).$refs[key][0].defaultHandle){
+      if(key.indexOf(this.suffixCode) >= 0 && (this as any).$refs[key][0] && (this as any).$refs[key][0].defaultHandle){
         (this as any).$refs[key][0].defaultHandle()
       }
     }
@@ -177,8 +177,8 @@ export default class ByForm extends VueViews {
   //设置下级组件值
   setChildrenComValue(){
     for(const key in (this as any).$refs){
-      if(key.indexOf('Comp') >= 0 && (this as any).$refs[key] && (this as any).$refs[key][0] && (this as any).$refs[key][0].setValue){
-        const code = key.split('Comp')[0];
+      if(key.indexOf(this.suffixCode) >= 0 && (this as any).$refs[key] && (this as any).$refs[key][0] && (this as any).$refs[key][0].setValue){
+        const code = key.split(this.suffixCode)[0];
         if(this.value){
           (this as any).$refs[key][0].setValue(this.value[code])
         }else{

+ 1 - 0
src/benyun/components/byTool/byTool.vue

@@ -83,6 +83,7 @@ export default class GmTools extends Vue {
         this.showTools.push(obj)
       }
     }
+    console.log('工具栏:',this.showTools)
   }
   //自定义工具栏按钮设置
   setCustomTools(tools:Array<any>){

+ 17 - 17
src/views/audit/orderTask/index.vue

@@ -178,13 +178,13 @@
 								{
 									title: '实际金额',
 									field: 'realityPrice',
-									component: 'by-input',
-									compConfig: {
-										attr: {
-											size: 'mini',
-											readonly: true
-										},
-									}
+									// component: 'by-input',
+									// compConfig: {
+									// 	attr: {
+									// 		size: 'mini',
+									// 		readonly: true
+									// 	},
+									// }
 								},
 								{
 									title: '优惠金额',
@@ -200,13 +200,13 @@
 								{
 									title: '合计金额',
 									field: 'totalPrice',
-									component: 'by-input',
-									compConfig: {
-										attr: {
-											size: 'mini',
-											readonly: true
-										},
-									}
+									// component: 'by-input',
+									// compConfig: {
+									// 	attr: {
+									// 		size: 'mini',
+									// 		readonly: true
+									// 	},
+									// }
 								},
 								{
 									width: 80,
@@ -849,7 +849,7 @@
 		// 设置只读
 		setReadonly() {
 			let readonly = (this as any).$lodash.cloneDeep(this.config.bill);
-			// readonly.form.attr.readonly = true; // 设置只可读
+			readonly.form.attr.readonly = true; // 设置只可读
 			for (let key in readonly.tool) {
 				delete readonly.tool[key]
 			};
@@ -862,9 +862,9 @@
 		}
 		// 监听表格数据变化
 		onChangeRow(e : any) {
-			this.tableData[e.dataIndex].realityPrice = e.number * e.unitPrice;
+			e.realityPrice = e.number * e.unitPrice;
 			// console.log(this.tableData);
-			(this.$refs.bill as any).setBillTableValue(this.tableData, 0);// 设置第1张单据表格数据
+			// (this.$refs.bill as any).setBillTableValue(this.tableData, 0);// 设置第1张单据表格数据
 		}
 		// 保存
 		onSave(e : any) {

+ 3 - 4
src/views/audit/saleOrder/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<div>
 		<by-bill :propConfig="config" @search="search" @onSmt="doSave" ref="bill" @onAdd="onAdd" @onOrder="onOrder"
-			@resert="resert" @clickHandle="clickHandle" @detail="openEdit">
+			@resert="resert" @detail="openEdit" @onRefresh="onRefresh">
 		</by-bill>
 	</div>
 </template>
@@ -284,9 +284,8 @@
 				this.getDataList()
 			}, 500)
 		}
-		// 工具栏方法
-		clickHandle(e : any) {
-			console.log(e);
+		onRefresh(n:string){
+			console.log(n)
 		}
 		// 保存新增
 		doSave() {

+ 4 - 1
src/views/oms/order/components/addOrder.vue

@@ -217,7 +217,7 @@ export default class AddOrder extends Vue {
         compConfig:{
           attr:{
             // placeholder:'请输入订单日期',
-            disabled:true,
+            // disabled:true,
             data:[{
               label:'手工下单',
               value:'ERP'
@@ -750,6 +750,7 @@ export default class AddOrder extends Vue {
       info.note = data.note;
       info.buyerMessage = data.buyerMessage;
       info.remark = data.remark;
+      info.sourceFrom = data.sourceFrom;
       this.baseConfig.attr.data = info;
       (this.$refs.baseform as any).setValue(info);
       //买家
@@ -1116,6 +1117,8 @@ export default class AddOrder extends Vue {
       addOrder(this.orderValue).then((res:any) => {
         if(n != 'continue'){
           this.value = false;
+        }else{
+          this.clearValue();
         }
         this.load = false;
         (this as any).$message({

+ 9 - 1
src/views/oms/order/index.vue

@@ -174,7 +174,6 @@ import loadOrderModal from './components/loadOrderModal.vue'
 import { query,getProvince,smt,unSmt,purchaseQty } from '@/api/omsOrder'
 @Component({components:{filterInput,OrderCheckbox,OrderRadio,filterDate,OrderTool,OrderTable,AddOrder,InputSelect,OrderProduct,filterMinMax,loadOrderModal}})
 export default class Order extends Vue {
-  test={}
   activeNames:Array<any>=['1','status']
   radio=''
   radio2=''
@@ -446,9 +445,18 @@ export default class Order extends Vue {
     let data:Array<any>= (this.$refs.orderTable as any).getSelectData();
     if(data.length == 0){
       this.$message('请选择订单!');
+      return
     }
+    let msg:string='';
     let ids:Array<any>=[];
     for(const item of data){
+      if(item.isSubmitted != 1){
+        if(msg){
+          msg = msg + ',' + item.sourceId
+        }else{
+          msg = item.sourceId
+        }
+      }
       ids.push(item.id)
     }
     purchaseQty({