|
@@ -8,12 +8,12 @@
|
|
|
<span style="font-size:16px;">{{ scope.row.name }}</span>
|
|
<span style="font-size:16px;">{{ scope.row.name }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template #table-column-showUsePrice="{ scope }">
|
|
|
|
|
- <el-input v-model="scope.row.showUsePrice" placeholder="单价"></el-input>
|
|
|
|
|
|
|
+ <template #table-column-zbPrice="{ scope }">
|
|
|
|
|
+ <el-input v-model="scope.row.zbPrice" placeholder="单价"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template #table-column-bigCount="{ scope }">
|
|
|
|
|
- <el-input v-model="scope.row.bigCount" placeholder="数量"></el-input>
|
|
|
|
|
|
|
+ <template #table-column-zbNum="{ scope }">
|
|
|
|
|
+ <el-input v-model="scope.row.zbNum" placeholder="数量"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #slot-column-option="{scope}">
|
|
<template #slot-column-option="{scope}">
|
|
@@ -22,6 +22,13 @@
|
|
|
|
|
|
|
|
<template #slot-option-area-list>
|
|
<template #slot-option-area-list>
|
|
|
<el-input v-model="search" placeholder="搜索客户" size="big" style="width:200px;" :clearable="true" ref="customSearchRef" @input="changeSearch()" @focus="search=''"></el-input>
|
|
<el-input v-model="search" placeholder="搜索客户" size="big" style="width:200px;" :clearable="true" ref="customSearchRef" @input="changeSearch()" @focus="search=''"></el-input>
|
|
|
|
|
+
|
|
|
|
|
+ <el-input v-model="name1" placeholder="客户名称" size="big" style="width:150px;margin-left:30px;"></el-input>
|
|
|
|
|
+ <el-input v-model="mobile1" placeholder="手机号" size="big" style="width:150px;margin-left:5px;"></el-input>
|
|
|
|
|
+ <el-popconfirm title="确认添加?" @confirm="addCustom()" @onConfirm="addCustom()" style="margin-left:5px;">
|
|
|
|
|
+ <el-button size="big" type="primary" slot="reference">添加</el-button>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
|
|
+
|
|
|
</template>
|
|
</template>
|
|
|
</x-crud>
|
|
</x-crud>
|
|
|
</div>
|
|
</div>
|
|
@@ -40,10 +47,27 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
showArea: false,
|
|
showArea: false,
|
|
|
- search:''
|
|
|
|
|
|
|
+ search:'',
|
|
|
|
|
+ mobile1:'',
|
|
|
|
|
+ name1:''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ addCustom(){
|
|
|
|
|
+ if(this.mobile1.length != 11){
|
|
|
|
|
+ this.$message.error('手机号错误')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.$util.isEmpty(this.name1)){
|
|
|
|
|
+ this.$message.error('请填写客户名称')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$service.custom.createCustomers({ name1:this.name1,mobile1:this.mobile1,confirmMobile1:this.mobile1}).then(data => {
|
|
|
|
|
+ this.name1=''
|
|
|
|
|
+ this.mobile1=''
|
|
|
|
|
+ this.$notify({ title: '添加成功,15秒后生效', message: 'success', type: 'success'})
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
changeSearch(){
|
|
changeSearch(){
|
|
|
let that = this
|
|
let that = this
|
|
|
if(this.T != null){
|
|
if(this.T != null){
|
|
@@ -67,15 +91,17 @@ export default {
|
|
|
this.showArea = false;
|
|
this.showArea = false;
|
|
|
},
|
|
},
|
|
|
confirmAdd(info){
|
|
confirmAdd(info){
|
|
|
- if(Number(info.bigCount)<=0){
|
|
|
|
|
|
|
+ if(Number(info.zbNum)<=0){
|
|
|
this.$message.error('请填写数量')
|
|
this.$message.error('请填写数量')
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
- let showUsePrice = Number(info.showUsePrice)>0 ? info.showUsePrice: 100
|
|
|
|
|
- let data = [{id:info.id,bigCount:info.bigCount,price:showUsePrice}]
|
|
|
|
|
- this.$service.orderItem.addItem({data:JSON.stringify(data),id:this.customData.id}).then(res => {
|
|
|
|
|
- that.$message.success('添加成功')
|
|
|
|
|
- this.$emit('renewArrival',this.customData)
|
|
|
|
|
|
|
+ if(Number(info.zbPrice)<=0){
|
|
|
|
|
+ this.$message.error('请填写价格')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$service.liveOrder.addCustom({customId:info.id,customName:info.name,num:info.zbNum,price:info.zbPrice,id:this.customData.id}).then(res => {
|
|
|
|
|
+ this.$message.success('添加成功')
|
|
|
|
|
+ this.$emit('renewAddCustom',this.customData)
|
|
|
this.closeFn()
|
|
this.closeFn()
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -90,28 +116,28 @@ export default {
|
|
|
.set('table', {
|
|
.set('table', {
|
|
|
columns: [
|
|
columns: [
|
|
|
{
|
|
{
|
|
|
- label: '数量',
|
|
|
|
|
- prop: 'bigCount',
|
|
|
|
|
|
|
+ label: 'ID',
|
|
|
|
|
+ prop: 'id',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- width:135
|
|
|
|
|
|
|
+ width:100
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '单价',
|
|
|
|
|
- prop: 'showUsePrice',
|
|
|
|
|
|
|
+ label: '名称',
|
|
|
|
|
+ prop: 'name',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- width:135
|
|
|
|
|
|
|
+ width:240
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- label: '名称',
|
|
|
|
|
- prop: 'name',
|
|
|
|
|
|
|
+ label: '数量',
|
|
|
|
|
+ prop: 'zbNum',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- width:230
|
|
|
|
|
|
|
+ width:110
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- label: 'ID',
|
|
|
|
|
- prop: 'id',
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '单价',
|
|
|
|
|
+ prop: 'zbPrice',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- width:100
|
|
|
|
|
|
|
+ width:110
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|
|
|
op: {
|
|
op: {
|
|
@@ -119,7 +145,7 @@ export default {
|
|
|
props: {
|
|
props: {
|
|
|
width: 160,
|
|
width: 160,
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
- fixed: 'left',
|
|
|
|
|
|
|
+ fixed: 'right',
|
|
|
label: '操作'
|
|
label: '操作'
|
|
|
},
|
|
},
|
|
|
layout: ['slot-column-option']
|
|
layout: ['slot-column-option']
|