|
@@ -1,25 +1,46 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
<view class="filedetails">
|
|
|
- <view class="cardBox">
|
|
|
- <view class="filedetails_left">
|
|
|
- <view>
|
|
|
- <u--input prefixIcon="account-fill"
|
|
|
- prefixIconStyle="fontSize:60rpx;color:#215476" placeholderStyle="fontSize:36rpx;color:#215476"
|
|
|
+
|
|
|
+ <view class="cardBox" @click="selectCustomer" style="margin-bottom: 0; border-bottom: 4rpx solid #f5f5f5; border-radius: 12rpx 12rpx 0 0;">
|
|
|
+ <!-- @click="pickerShowfun('KH')" -->
|
|
|
+ <view class="filedetails_left" style="width: 100%; margin-right: 20rpx;">
|
|
|
+ <view style="display: flex;align-items: center;">
|
|
|
+ <view class="shebetext" style="display: flex;align-items: center; color: #FD4B09;">
|
|
|
+ <u-icon name="account" color="#FD4B09" size="18"></u-icon>
|
|
|
+ <text style="font-size: 30rpx; margin-left: 10rpx;">客户</text>
|
|
|
+ </view>
|
|
|
+ <u--input
|
|
|
+ inputAlign="right"
|
|
|
disabled disabledColor="#fff" placeholder="客户" border="none"
|
|
|
v-model="form.corpName">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="filedetails_right" @click="pickerShowfun('KH')">
|
|
|
+ <view class="filedetails_right">
|
|
|
<u-icon name="arrow-right" color="#101010" size="22"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="cardBox">
|
|
|
- <view class="filedetails_left">
|
|
|
+
|
|
|
+ <view class="cardBox" style="margin-bottom: 0; border-bottom: 4rpx solid #f5f5f5; border-radius: 0;">
|
|
|
+ <!-- <view class="filedetails_left">
|
|
|
<view>
|
|
|
- <u--input prefixIcon="account-fill"
|
|
|
- prefixIconStyle="fontSize:50rpx;color:#215476" placeholderStyle="fontSize:34rpx;color:#215476"
|
|
|
+ <u--input prefixIcon="account"
|
|
|
+ prefixIconStyle="fontSize:50rpx;" placeholderStyle="fontSize:34rpx;"
|
|
|
+ placeholder="联系人" border="none"
|
|
|
+ v-model="form.contacts">
|
|
|
+ </u--input>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ -->
|
|
|
+ <view class="filedetails_left" style="width: 100%; margin-right: 20rpx;">
|
|
|
+ <view style="display: flex;align-items: center;">
|
|
|
+ <view class="shebetext" style="display: flex;align-items: center; color: #FD4B09;">
|
|
|
+ <u-icon name="account" color="#FD4B09" size="18"></u-icon>
|
|
|
+ <text style="font-size: 30rpx; margin-left: 10rpx;">联系人</text>
|
|
|
+ </view>
|
|
|
+ <u--input inputAlign="right"
|
|
|
+ prefixIconStyle="fontSize:50rpx;" placeholderStyle="fontSize:34rpx;"
|
|
|
placeholder="联系人" border="none"
|
|
|
v-model="form.contacts">
|
|
|
</u--input>
|
|
@@ -27,35 +48,64 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="cardBox">
|
|
|
- <view class="filedetails_left">
|
|
|
+ <view class="cardBox" style="margin-bottom: 0; border-bottom: 4rpx solid #f5f5f5; border-radius: 0;">
|
|
|
+ <!-- <view class="filedetails_left">
|
|
|
<view>
|
|
|
- <u--input prefixIcon="phone-fill"
|
|
|
- prefixIconStyle="fontSize:50rpx;color:#215476" placeholderStyle="fontSize:34rpx;color:#215476"
|
|
|
+ <u--input prefixIcon="phone"
|
|
|
+ prefixIconStyle="fontSize:50rpx;" placeholderStyle="fontSize:34rpx;"
|
|
|
placeholder="电话" border="none"
|
|
|
v-model="form.contactsTel">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
+ </view> -->
|
|
|
+
|
|
|
+ <view class="filedetails_left" style="width: 100%; margin-right: 20rpx;">
|
|
|
+ <view style="display: flex;align-items: center;">
|
|
|
+ <view class="shebetext" style="display: flex;align-items: center; color: #FD4B09;">
|
|
|
+ <u-icon name="account" color="#FD4B09" size="18"></u-icon>
|
|
|
+ <text style="font-size: 30rpx; margin-left: 10rpx;">电话</text>
|
|
|
+ </view>
|
|
|
+ <u--input inputAlign="right"
|
|
|
+ prefixIconStyle="fontSize:50rpx;" placeholderStyle="fontSize:34rpx;"
|
|
|
+ placeholder="电话" border="none"
|
|
|
+ v-model="form.contactsTel">
|
|
|
+ </u--input>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="cardBox">
|
|
|
- <view class="filedetails_left">
|
|
|
+ <view class="cardBox" style="margin-bottom: 0; border-bottom: 4rpx solid #f5f5f5; border-radius: 0;">
|
|
|
+ <!-- <view class="filedetails_left">
|
|
|
<view>
|
|
|
- <u--input prefixIcon="map-fill"
|
|
|
- prefixIconStyle="fontSize:50rpx;color:#215476" placeholderStyle="fontSize:34rpx;color:#215476"
|
|
|
+ <u--input prefixIcon="home"
|
|
|
+ prefixIconStyle="fontSize:50rpx;" placeholderStyle="fontSize:34rpx;"
|
|
|
placeholder="地址" border="none"
|
|
|
v-model="form.address">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
+ </view> -->
|
|
|
+
|
|
|
+ <view class="filedetails_left" style="width: 100%; margin-right: 20rpx;">
|
|
|
+ <view style="display: flex;align-items: center;">
|
|
|
+ <view class="shebetext" style="display: flex;align-items: center; color: #FD4B09;">
|
|
|
+ <u-icon name="account" color="#FD4B09" size="18"></u-icon>
|
|
|
+ <text style="font-size: 30rpx; margin-left: 10rpx;">地址</text>
|
|
|
+ </view>
|
|
|
+ <u--input inputAlign="right"
|
|
|
+ prefixIconStyle="fontSize:50rpx;" placeholderStyle="fontSize:34rpx;"
|
|
|
+ placeholder="地址" border="none"
|
|
|
+ v-model="form.address">
|
|
|
+ </u--input>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
- <view class="cardBox">
|
|
|
- <view class="filedetails_left">
|
|
|
+ <view class="cardBox" @click="calendarShowfun(1,1)" style="margin-bottom: 0; border-bottom: 4rpx solid #f5f5f5; border-radius: 0;">
|
|
|
+ <!-- <view class="filedetails_left">
|
|
|
<view>
|
|
|
<u--input prefixIcon="calendar"
|
|
|
- prefixIconStyle="fontSize:50rpx;color:#215476" placeholderStyle="fontSize:34rpx;color:#215476"
|
|
|
+ prefixIconStyle="fontSize:50rpx;" placeholderStyle="fontSize:34rpx;"
|
|
|
disabled disabledColor="#fff" placeholder="请选择合同起" border="none"
|
|
|
v-model="form.signingDateStart">
|
|
|
</u--input>
|
|
@@ -63,13 +113,31 @@
|
|
|
</view>
|
|
|
<view class="filedetails_right" @click="calendarShowfun(1,1)">
|
|
|
<u-icon name="arrow-right" color="#101010" size="22"></u-icon>
|
|
|
+ </view> -->
|
|
|
+
|
|
|
+ <view class="filedetails_left" style="width: 100%; margin-right: 20rpx;">
|
|
|
+ <view style="display: flex;align-items: center;">
|
|
|
+ <view class="shebetext" style="display: flex;align-items: center; color: #FD4B09;">
|
|
|
+ <u-icon name="calendar" color="#FD4B09" size="18"></u-icon>
|
|
|
+ <text style="font-size: 30rpx; margin-left: 10rpx;">合同日期起</text>
|
|
|
+ </view>
|
|
|
+ <u--input
|
|
|
+ inputAlign="right"
|
|
|
+ disabled disabledColor="#fff" placeholder="合同日期起" border="none"
|
|
|
+ v-model="form.signingDateStart">
|
|
|
+ </u--input>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="filedetails_right">
|
|
|
+ <u-icon name="arrow-right" color="#101010" size="22"></u-icon>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
- <view class="cardBox">
|
|
|
- <view class="filedetails_left">
|
|
|
+ <view class="cardBox" style="border-bottom: 4rpx solid #f5f5f5; border-radius: 0 0 12rpx 12rpx;">
|
|
|
+ <!-- <view class="filedetails_left">
|
|
|
<view>
|
|
|
<u--input prefixIcon="calendar"
|
|
|
- prefixIconStyle="fontSize:50rpx;color:#215476" placeholderStyle="fontSize:34rpx;color:#215476"
|
|
|
+ prefixIconStyle="fontSize:50rpx;" placeholderStyle="fontSize:34rpx;"
|
|
|
disabled disabledColor="#fff" placeholder="请选择合同止" border="none"
|
|
|
v-model="form.signingDateEnd">
|
|
|
</u--input>
|
|
@@ -77,6 +145,23 @@
|
|
|
</view>
|
|
|
<view class="filedetails_right" @click="calendarShowfun(1,2)">
|
|
|
<u-icon name="arrow-right" color="#101010" size="22"></u-icon>
|
|
|
+ </view> -->
|
|
|
+
|
|
|
+ <view class="filedetails_left" style="width: 100%; margin-right: 20rpx;" @click="calendarShowfun(1,2)">
|
|
|
+ <view style="display: flex;align-items: center;">
|
|
|
+ <view class="shebetext" style="display: flex;align-items: center; color: #FD4B09;">
|
|
|
+ <u-icon name="calendar" color="#FD4B09" size="18"></u-icon>
|
|
|
+ <text style="font-size: 30rpx; margin-left: 10rpx;">合同日期止</text>
|
|
|
+ </view>
|
|
|
+ <u--input
|
|
|
+ inputAlign="right"
|
|
|
+ disabled disabledColor="#fff" placeholder="合同日期止" border="none"
|
|
|
+ v-model="form.signingDateEnd">
|
|
|
+ </u--input>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="filedetails_right">
|
|
|
+ <u-icon name="arrow-right" color="#101010" size="22"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -91,18 +176,39 @@
|
|
|
></u-upload>
|
|
|
</view>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
<view class="cardBox">
|
|
|
- <view class="filedetails_left">
|
|
|
+ <!-- <view class="filedetails_left">
|
|
|
<view>
|
|
|
<u--input prefixIcon="file-text"
|
|
|
- prefixIconStyle="fontSize:50rpx;color:#215476" placeholderStyle="fontSize:34rpx;color:#215476"
|
|
|
+ prefixIconStyle="fontSize:50rpx;" placeholderStyle="fontSize:34rpx;"
|
|
|
disabled disabledColor="#fff" :placeholder="`设备列表(${form.corpEquipmentArchivesItemList.length})`" border="none">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="filedetails_right" @click="EquipmentAddition">
|
|
|
<u-icon name="list-dot" color="#101010" size="22"></u-icon>
|
|
|
+ </view> -->
|
|
|
+
|
|
|
+
|
|
|
+ <view class="filedetails_left" style="width: 100%; margin-right: 20rpx;">
|
|
|
+ <view style="display: flex;align-items: center;">
|
|
|
+ <view class="shebetext" style="display: flex;align-items: center; color: #FD4B09;">
|
|
|
+ <u-icon name="list-dot" color="#FD4B09" size="18"></u-icon>
|
|
|
+ <text style="font-size: 30rpx; margin-left: 10rpx;">设备列表({{form.corpEquipmentArchivesItemList.length}})</text>
|
|
|
+ </view>
|
|
|
+ <!-- <u--input
|
|
|
+ inputAlign="right"
|
|
|
+ disabled disabledColor="#fff" :placeholder="`设备列表(${form.corpEquipmentArchivesItemList.length})`" border="none">
|
|
|
+ </u--input> -->
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ <view class="filedetails_right" @click="EquipmentAddConfirm = true">
|
|
|
+ <u-icon name="file-text" color="#101010" size="22"></u-icon>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
<view class="cardBox" v-for="(item,index) in form.corpEquipmentArchivesItemList" :key="item.id"
|
|
@@ -112,12 +218,12 @@
|
|
|
<view class="listbox_titleXh">
|
|
|
设备{{index+1}}
|
|
|
</view>
|
|
|
- <view class="listbox_titleDe" @click="DeleteDevicefun(item,index)">删除</view>
|
|
|
+ <view class="listbox_titleDe" @click="DeleteWindow(item,index)">删除</view>
|
|
|
</view>
|
|
|
<view class="inputbox" @click="pickerShowfun('CP',index)">
|
|
|
<!-- <view class="shebetext">设备名称:</view> -->
|
|
|
<u--input
|
|
|
- prefixIconStyle="fontSize:60rpx;color:#215476"
|
|
|
+ prefixIconStyle="fontSize:60rpx;"
|
|
|
placeholderStyle="fontSize:30rpx;"
|
|
|
disabled disabledColor="#fff" placeholder="请选择设备名称" border="bottom"
|
|
|
v-model="item.cname" >
|
|
@@ -129,7 +235,7 @@
|
|
|
<view class="inputbox">
|
|
|
<!-- <view class="shebetext">设备编号:</view> -->
|
|
|
<u--input
|
|
|
- prefixIconStyle="fontSize:60rpx;color:#215476"
|
|
|
+ prefixIconStyle="fontSize:60rpx;"
|
|
|
placeholderStyle="fontSize:30rpx;"
|
|
|
disabledColor="#fff" placeholder="请输入设备编号" border="bottom"
|
|
|
v-model="item.code">
|
|
@@ -144,7 +250,7 @@
|
|
|
<view class="inputbox" @click="calendarShowfun(2,1,index)">
|
|
|
<!-- <view class="shebetext">出厂日期:</view> -->
|
|
|
<u--input
|
|
|
- prefixIconStyle="fontSize:60rpx;color:#215476"
|
|
|
+ prefixIconStyle="fontSize:60rpx;"
|
|
|
placeholderStyle="fontSize:30rpx;"
|
|
|
disabled disabledColor="#fff" placeholder="请选择出厂日期" border="bottom"
|
|
|
v-model="item.exitDate">
|
|
@@ -156,7 +262,7 @@
|
|
|
<view class="inputbox" @click="calendarShowfun(2,2,index)">
|
|
|
<!-- <view class="shebetext">保养日期:</view> -->
|
|
|
<u--input
|
|
|
- prefixIconStyle="fontSize:60rpx;color:#215476"
|
|
|
+ prefixIconStyle="fontSize:60rpx;"
|
|
|
placeholderStyle="fontSize:30rpx;"
|
|
|
disabled disabledColor="#fff" placeholder="请选择保养日期" border="bottom"
|
|
|
v-model="item.maintenanceDate">
|
|
@@ -256,11 +362,27 @@
|
|
|
@confirm="calendarConfirm" @close="calendarClose"></u-calendar>
|
|
|
<!-- 提示 -->
|
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
+
|
|
|
+ <!-- 添加设备弹框 -->
|
|
|
+ <u-modal :show="EquipmentAddConfirm" title="提示" showCancelButton @confirm="EquipmentAddition"
|
|
|
+ @cancel="EquipmentAddConfirm = false">
|
|
|
+ <view class="slot-content">
|
|
|
+ <rich-text nodes="确定要添加新设备吗?"></rich-text>
|
|
|
+ </view>
|
|
|
+ </u-modal>
|
|
|
+
|
|
|
+ <!-- 删除弹框 -->
|
|
|
+ <u-modal :show="EquipmentDeleteConfirm" title="提示" showCancelButton @confirm="DeleteDevicefun"
|
|
|
+ @cancel="EquipmentDeleteConfirm = false">
|
|
|
+ <view class="slot-content">
|
|
|
+ <rich-text nodes="确定要删除该设备吗?"></rich-text>
|
|
|
+ </view>
|
|
|
+ </u-modal>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { corpequipmentarchivesDetail,corpequipmentarchivesSubmit,goodsdescDescList } from '@/api/device/index.js'
|
|
|
+ import { corpequipmentarchivesDetail,corpequipmentarchivesSubmit,goodsdescDescList,corpequipmentarchivesitemRemove } from '@/api/device/index.js'
|
|
|
import { corpsDescList } from '@/api/views/sale/index.js'
|
|
|
import { queryDetail } from '@/api/views/customer/index.js'
|
|
|
import http from '@/http/api.js'
|
|
@@ -271,6 +393,13 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 弹框
|
|
|
+ // 设备添加
|
|
|
+ EquipmentAddConfirm: false,
|
|
|
+ // 设备删除
|
|
|
+ EquipmentDeleteConfirm: false,
|
|
|
+ EquipmentDeleteRow:{},
|
|
|
+ EquipmentDeleteIndex: -1,
|
|
|
// 传递过来的id
|
|
|
id:null,
|
|
|
// 绑定的数据
|
|
@@ -386,6 +515,26 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 跳转选择用户
|
|
|
+ selectCustomer() {
|
|
|
+ console.log("跳转");
|
|
|
+ this.$u.route('/pages/views/salesSlip/selectCustomer', {
|
|
|
+ corpType: 'KH'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 选中用户赋值
|
|
|
+ otherFun(user) {
|
|
|
+ console.log(user);
|
|
|
+
|
|
|
+ queryDetail({id:user.id}).then(res=>{
|
|
|
+ this.$set(this.form,'address',res.data.corpsAddrList[0].detailedAddress)
|
|
|
+ this.form.corpId = user.id
|
|
|
+ this.form.corpName = res.data.cname
|
|
|
+ this.form.contacts = res.data.attn
|
|
|
+ this.form.contactsTel = res.data.tel
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
// 设备新增
|
|
|
EquipmentAddition(){
|
|
|
this.form.corpEquipmentArchivesItemList.push({
|
|
@@ -408,6 +557,8 @@
|
|
|
maintenanceSecond:'',
|
|
|
filesList:[],
|
|
|
})
|
|
|
+
|
|
|
+ this.EquipmentAddConfirm = false
|
|
|
},
|
|
|
// 弹窗的开启
|
|
|
pickerShowfun(type,index){
|
|
@@ -442,7 +593,7 @@
|
|
|
})
|
|
|
}else if (this.pickerType.type == 'CP'){
|
|
|
this.form.corpEquipmentArchivesItemList[this.pickerType.index].cname = val.value[0].cname
|
|
|
- this.form.corpEquipmentArchivesItemList[this.pickerType.index].code = val.value[0].code
|
|
|
+ // this.form.corpEquipmentArchivesItemList[this.pickerType.index].code = val.value[0].code
|
|
|
this.form.corpEquipmentArchivesItemList[this.pickerType.index].brand = val.value[0].brand
|
|
|
this.form.corpEquipmentArchivesItemList[this.pickerType.index].brandId = val.value[0].brandId
|
|
|
this.form.corpEquipmentArchivesItemList[this.pickerType.index].specs = val.value[0].specs
|
|
@@ -500,14 +651,32 @@
|
|
|
this.form = res.data
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ // 删除弹窗
|
|
|
+ DeleteWindow(row, index) {
|
|
|
+ this.EquipmentDeleteRow = row;
|
|
|
+ this.EquipmentDeleteIndex = index;
|
|
|
+ this.EquipmentDeleteConfirm = true;
|
|
|
+ },
|
|
|
+
|
|
|
// 删除设备
|
|
|
- DeleteDevicefun(row,index){
|
|
|
+ DeleteDevicefun(){
|
|
|
+
|
|
|
+ var row = this.EquipmentDeleteRow
|
|
|
+ var index = this.EquipmentDeleteIndex
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if (row.id) {
|
|
|
this.form.corpEquipmentArchivesItemList.splice(index,1)
|
|
|
this.corpequipmentarchivesitemRemovefun(row.id)
|
|
|
}else {
|
|
|
this.form.corpEquipmentArchivesItemList.splice(index,1)
|
|
|
}
|
|
|
+
|
|
|
+ this.EquipmentDeleteRow = null;
|
|
|
+ this.EquipmentDeleteIndex = -1;
|
|
|
+ this.EquipmentDeleteConfirm = false;
|
|
|
},
|
|
|
// 删除接口
|
|
|
corpequipmentarchivesitemRemovefun(id){
|
|
@@ -688,7 +857,7 @@
|
|
|
background: #fff;
|
|
|
border-radius: 12rpx;
|
|
|
width: 100%;
|
|
|
- padding: 30rpx;
|
|
|
+ padding: 20rpx 30rpx;
|
|
|
box-sizing: border-box;
|
|
|
display: flex;
|
|
|
align-content: center;
|
|
@@ -708,9 +877,11 @@
|
|
|
z-index: 99;
|
|
|
.savebutton {
|
|
|
border-radius: 30rpx;
|
|
|
- color: #3f7cef;
|
|
|
+ // color: #3f7cef;
|
|
|
+ color: #FD4B09;
|
|
|
font-size: 34rpx;
|
|
|
- border: 2rpx solid #3f7cef;
|
|
|
+ // border: 2rpx solid #3f7cef;
|
|
|
+ border: 2rpx solid #FD4B09;
|
|
|
padding: 15rpx 40rpx;
|
|
|
font-weight: 500;
|
|
|
}
|