|
@@ -104,10 +104,20 @@
|
|
|
</vxe-input>
|
|
|
<span v-else>{{ row.qty }}</span>
|
|
|
</template>
|
|
|
- <template v-slot:price='{ row }'>
|
|
|
+ <template v-slot:price='{ row,rowIndex }'>
|
|
|
<span v-if="row.isGift == 1">0</span>
|
|
|
- <vxe-input v-else-if="!orderValue.id" v-model="row.price" placeholder="单价" align="center" size="mini" type="number" @input="priceChange($event, row)" >
|
|
|
- </vxe-input>
|
|
|
+
|
|
|
+ <!-- <el-input :placeholder="!orderValue.id?'请选择标签':''" :value="value.shopName" :disabled="orderValue.id?true:false" @clear="clearShop" size="small" class="myinpuy-with-select" clearable>
|
|
|
+ <el-button slot="append" v-if="!orderValue.id" icon="el-icon-more" @click="showShop"></el-button>
|
|
|
+ </el-input> -->
|
|
|
+
|
|
|
+ <el-input v-else-if="!orderValue.id" v-model="row.price" placeholder="单价" align="center" size="mini" @input="priceChange($event, row)" >
|
|
|
+ <el-button slot="append" class="price-btn" icon="el-icon-more" @click="showPrice(rowIndex)"></el-button>
|
|
|
+ </el-input>
|
|
|
+
|
|
|
+ <!-- <el-select v-else-if="!orderValue.id" v-model="row.price" size="mini" filterable allow-create @input="priceChange($event, row)" default-first-option style="width:140px" placeholder="请选择或输入价格">
|
|
|
+ <el-option v-for="item in priceOption" :key="item.id" :label="item.price" :value="item.id"></el-option>
|
|
|
+ </el-select> -->
|
|
|
<span v-else>{{ row.price }}</span>
|
|
|
</template>
|
|
|
</by-table>
|
|
@@ -176,6 +186,8 @@
|
|
|
<el-drawer class="log-drawer" :size="600" append-to-body title="操作日志" :visible.sync="drawer" direction="rtl">
|
|
|
<byLog :propConfig="logConfig" ref="log" />
|
|
|
</el-drawer>
|
|
|
+ <!-- 价格弹窗 -->
|
|
|
+ <priceModal ref="priceModal" @priceHandle="priceHandle" />
|
|
|
</template>
|
|
|
<template #footer>
|
|
|
<div class="btn">
|
|
@@ -197,7 +209,8 @@ import EditProductModal from "./editProductModal.vue";
|
|
|
import LabelsModal from "./labelsModal.vue";
|
|
|
import ShopModal from "./shopModal.vue";
|
|
|
import BuyerInfoModal from "./buyerInfoModal.vue";
|
|
|
-@Component({components:{AddProductModal,EditProductModal,LabelsModal,ShopModal,BuyerInfoModal}})
|
|
|
+import priceModal from "./priceModal.vue"
|
|
|
+@Component({components:{AddProductModal,EditProductModal,LabelsModal,ShopModal,BuyerInfoModal, priceModal}})
|
|
|
export default class AddOrder extends Vue {
|
|
|
logConfig:any={
|
|
|
request:{
|
|
@@ -216,6 +229,7 @@ export default class AddOrder extends Vue {
|
|
|
orderValue:any={}; //新增订单值
|
|
|
radioPay=1;
|
|
|
stepActive:number=0;
|
|
|
+ priceOption:Array<any>=[]; //价格列表
|
|
|
topStep=['WaitPay','WaitConfirm','Delivering']
|
|
|
stepCon=['WaitPay','WaitConfirm','WaitFConfirm','WaitOuterSent','Sent','Delivering']
|
|
|
activeNames:Array<any> =['1','2','3','4','5','save'];
|
|
@@ -871,6 +885,30 @@ export default class AddOrder extends Vue {
|
|
|
callback();
|
|
|
}
|
|
|
}
|
|
|
+ proCurrentIndex:any=null;
|
|
|
+ // 显示价格弹窗
|
|
|
+ showPrice(v:any) {
|
|
|
+ this.proCurrentIndex = v;
|
|
|
+ if(this.$refs.priceModal) {
|
|
|
+ (this.$refs.priceModal as any).setShow(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 已选择的价格
|
|
|
+ priceHandle(v:any) {
|
|
|
+ let data = (this.$refs.table as any).getValue();
|
|
|
+ data[this.proCurrentIndex].price = v;
|
|
|
+
|
|
|
+ if(v && data[this.proCurrentIndex].qty){
|
|
|
+ data[this.proCurrentIndex].amount =multiply(Number(v),Number(data[this.proCurrentIndex].qty))
|
|
|
+ }else{
|
|
|
+ data[this.proCurrentIndex].amount = 0
|
|
|
+ }
|
|
|
+ this.totalAmount();
|
|
|
+ this.amountChange();
|
|
|
+ this.payAmountChange();
|
|
|
+ (this.$refs.table as any).setValue(data);
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
//订单来源转换文字信息
|
|
|
getFromText(f:any){
|
|
|
let t='';
|
|
@@ -1627,6 +1665,7 @@ export default class AddOrder extends Vue {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
+
|
|
|
.btn-save{
|
|
|
width: 100%;
|
|
|
display: flex;
|
|
@@ -1761,4 +1800,10 @@ export default class AddOrder extends Vue {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.price-btn{
|
|
|
+ width: 25px !important;
|
|
|
+ display: flex !important;
|
|
|
+ justify-content: center !important;
|
|
|
+ align-items: center !important;
|
|
|
+}
|
|
|
</style>
|