| | |
| | | </view> |
| | | <!-- 客户列表 --> |
| | | <view class="searchResultList"> |
| | | <view class="balanceNo" v-if="accountDetails.balanceTotal < 0"> |
| | | <text>客户账户当前处于欠款状态</text> |
| | | </view> |
| | | <u-collapse accordion> |
| | | <u-collapse-item :title="item.customerFullName" v-for="(item, index) in customerData"> |
| | | <view class="customerDetails"> |
| | |
| | | </view> |
| | | <view class="searchCustomerBtn"> |
| | | <u-button text="搜索" type="primary" @click="selectContractOpen()"></u-button> |
| | | <u-button text="清空" @click="selectCustomerResetFields"></u-button> |
| | | <u-button text="清空" @click="selectContractResetFields"></u-button> |
| | | </view> |
| | | <!-- 合同列表 --> |
| | | <view class="searchResultList"> |
| | | <uni-table border stripe emptyText="暂无更多数据"> |
| | | <uni-tr> |
| | | <uni-th width="220" align="center">合同编号</uni-th> |
| | | <uni-th width="80" align="center">组织结构</uni-th> |
| | | <uni-th width="200" align="center">客户名称</uni-th> |
| | | <uni-th width="140" align="center">煤种名称</uni-th> |
| | | <uni-th width="90" align="center">合同类型</uni-th> |
| | | <uni-th width="130" align="center">签订日期</uni-th> |
| | | <uni-th width="130" align="center">终止日期</uni-th> |
| | | <uni-th width="100" align="center">合同总量</uni-th> |
| | | <uni-th width="100" align="center">合同金额</uni-th> |
| | | <uni-th width="70" align="center">状态</uni-th> |
| | | <uni-th width="150" align="center" style="position:relative;right:0;">操作</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in contractData" :key="index"> |
| | | <uni-td align="left">{{ item.num }}</uni-td> |
| | | <uni-td align="center">{{ item.compName }}</uni-td> |
| | | <uni-td align="left">{{ item.customerName }}</uni-td> |
| | | <uni-td align="center">{{ item.coalNames }}</uni-td> |
| | | <uni-td align="center">{{ item.type }}</uni-td> |
| | | <uni-td align="center">{{ item.startDate }}</uni-td> |
| | | <uni-td align="center">{{ item.endDate }}</uni-td> |
| | | <uni-td align="center">{{ item.countExecutive }}</uni-td> |
| | | <uni-td align="center">{{ item.executive }}</uni-td> |
| | | <uni-td align="center">{{ item.status }}</uni-td> |
| | | <uni-td align="center" style="position:relative;right:0;"> |
| | | <view class="uni-group"><button class="uni-button" size="mini" type="primary">选择该合同</button></view> |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | | <view class="tableContract"> |
| | | <view class="tableBody"> |
| | | <uni-table border emptyText="暂无更多数据"> |
| | | <uni-tr> |
| | | <uni-th width="100" align="center">组织结构</uni-th> |
| | | <uni-th width="250" align="center">客户名称</uni-th> |
| | | <uni-th width="180" align="center">煤种名称</uni-th> |
| | | <uni-th width="220" align="center">合同编号</uni-th> |
| | | <uni-th width="90" align="center">合同类型</uni-th> |
| | | <uni-th width="130" align="center">签订日期</uni-th> |
| | | <uni-th width="130" align="center">终止日期</uni-th> |
| | | <uni-th width="100" align="center">合同总量</uni-th> |
| | | <uni-th width="100" align="center">合同金额</uni-th> |
| | | <uni-th width="70" align="center">状态</uni-th> |
| | | </uni-tr> |
| | | <uni-tr v-for="(item, index) in contractData" :key="index"> |
| | | |
| | | <uni-td align="center"> |
| | | <view :style="tdStyle">{{ item.compName }}</view> |
| | | </uni-td> |
| | | <uni-td align="left"> |
| | | <view :style="tdStyle">{{ item.customerName }}</view> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <view :style="tdStyle">{{ item.coalNames }}</view> |
| | | </uni-td> |
| | | <uni-td align="left"> |
| | | <view :style="tdStyle">{{ item.num }}</view> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <view :style="tdStyle">{{ item.type }}</view> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <view :style="tdStyle">{{ item.startDate }}</view> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <view :style="tdStyle">{{ item.endDate }}</view> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <view :style="tdStyle">{{ item.countExecutive }}</view> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <view :style="tdStyle">{{ item.executive }}</view> |
| | | </uni-td> |
| | | <uni-td align="center"> |
| | | <view :style="tdStyle">{{ item.status }}</view> |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | | </view> |
| | | |
| | | <view class="TableUtilBtn"> |
| | | <uni-table border emptyText="暂无更多数据"> |
| | | <uni-tr><uni-th align="center">操作</uni-th></uni-tr> |
| | | <uni-tr v-for="(item, index) in contractData" :key="index"> |
| | | <uni-td align="center"> |
| | | <view class="TableUtilBtnContainer"><u-button type="primary" @click="selectContractClick(item)" icon="checkbox-mark" size="mini"></u-button></view> |
| | | </uni-td> |
| | | </uni-tr> |
| | | </uni-table> |
| | | </view> |
| | | </view> |
| | | <!-- 合同类型选择器 --> |
| | | <view class="selectContractTypePicker"> |
| | |
| | | </view> |
| | | <!-- 时间选择器 --> |
| | | <view class="selectContractStartTime"> |
| | | <u-calendar :show="selectContractStartTimeShow" @close="selectContractStartTimeClose" :mode="selectContractTimeMode" @confirm="selectContractStartTimeConfirm"></u-calendar> |
| | | <u-calendar |
| | | :show="selectContractStartTimeShow" |
| | | @close="selectContractStartTimeClose" |
| | | :mode="selectContractTimeMode" |
| | | @confirm="selectContractStartTimeConfirm" |
| | | ></u-calendar> |
| | | </view> |
| | | <view class="selectContractEndTime"> |
| | | <u-calendar :show="selectContractEndTimeShow" @close="selectContractEndTimeClose" :mode="selectContractTimeMode" @confirm="selectContractEndTimeConfirm"></u-calendar> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | tdStyle: 'max-height: 30px;overflow: scroll;', |
| | | spanStyle: 'overflow:auto', |
| | | newFormData: { |
| | | amount: 0, |
| | |
| | | startDate: '2022-07-05', |
| | | type: '外销' |
| | | }, |
| | | accountDetails:0, |
| | | // 时间 |
| | | timeDataStr: '', |
| | | menuShow: false, |
| | |
| | | startDate: '', |
| | | endDate: '', |
| | | result: 2, |
| | | type: '外销', |
| | | type: '', |
| | | customerName: '' |
| | | }, |
| | | contractData: [], |
| | |
| | | // 时间 |
| | | selectContractTimeMode: 'single', |
| | | selectContractStartTimeShow: false, |
| | | selectContractEndTimeShow: false, |
| | | selectContractEndTimeShow: false |
| | | }; |
| | | }, |
| | | onShow() { |
| | |
| | | this.$reqGet('customer', this.selectCustomerData).then(res => { |
| | | uni.hideLoading(); |
| | | if (res.code == 0) { |
| | | |
| | | this.customerData = res.data.records; |
| | | } |
| | | }); |
| | |
| | | console.log('id', v); |
| | | this.$reqGet('getAccount', { customerId: v }).then(res => { |
| | | console.log('获取账号', res); |
| | | this.accountDetails = res.data |
| | | this.newFormData.customerName = res.data.customerName; |
| | | this.newFormData.customerId = res.data.id; |
| | | this.searchContractForm.customerName = res.data.customerName; |
| | |
| | | this.selectContractShow = true; |
| | | }, |
| | | // 选择合同类型输入框获取焦点触发 |
| | | searchContractFormTypeFocus(){ |
| | | // 类型弹出框 |
| | | this.selectContractTypeShow = true |
| | | searchContractFormTypeFocus() { |
| | | // 类型弹出框 |
| | | this.selectContractTypeShow = true; |
| | | // 弹出框类型请求 |
| | | this.$nextTick(()=>{ |
| | | this.$nextTick(() => { |
| | | this.$reqGet('contract_type').then(res => { |
| | | console.log('contract_type', res); |
| | | res.data.forEach(item => { |
| | |
| | | this.searchContractForm.type = v.value[0]; |
| | | this.selectContractTypeShow = false; |
| | | console.log('选择器确定后的值', v, this.searchContractForm.type); |
| | | |
| | | }, |
| | | selectContractTypeClose(v) { |
| | | // 初始化合同类型选择器 |
| | | this.selectContractTypeData[0] = []; |
| | | |
| | | |
| | | this.selectContractTypeShow = false; |
| | | if (v) { |
| | | this.searchContractForm.type = v.value[0]; |
| | | } |
| | | }, |
| | | // 合同时间选择器 |
| | | selectContractStartTimeConfirm(){ |
| | | selectContractStartTimeConfirm(e) { |
| | | this.selectContractStartTimeShow = false; |
| | | this.searchContractForm.startDate = e[0]; |
| | | }, |
| | | selectContractStartTimeClose() { |
| | | this.selectContractStartTimeShow = false; |
| | | }, |
| | | selectContractEndTimeConfirm(){ |
| | | selectContractEndTimeConfirm(e) { |
| | | this.selectContractEndTimeShow = false; |
| | | this.searchContractForm.endDate = e[0]; |
| | | }, |
| | | selectContractEndTimeClose() { |
| | | this.selectContractEndTimeShow = false; |
| | | }, |
| | | // 重置表单所有字段 |
| | | selectContractResetFields() { |
| | | this.searchContractForm.num = ''; |
| | | this.searchContractForm.startDate = ''; |
| | | this.searchContractForm.endDate = ''; |
| | | this.searchContractForm.customerName = ''; |
| | | this.searchContractForm.type = ''; |
| | | }, |
| | | selectContractClick(e) { |
| | | console.log(e); |
| | | }, |
| | | // 初始数据请求 |
| | | operato() { |
| | |
| | | } |
| | | } |
| | | |
| | | // 合同表格 |
| | | .tableContract { |
| | | margin-top:vww(30); |
| | | display: flex; |
| | | justify-content: center; |
| | | .uni-table-scroll { |
| | | min-width: 0 !important; |
| | | .uni-table { |
| | | .uni-table-tr { |
| | | padding: 0; |
| | | font-size: vww(13); |
| | | .uni-table-th { |
| | | width: vww(100); |
| | | height: vww(32); |
| | | line-height: vww(20); |
| | | padding: vww(5) vww(10); |
| | | color: #111111; |
| | | font-weight: 400; |
| | | background: #f5f5f5; |
| | | } |
| | | |
| | | .uni-table-td { |
| | | line-height: vww(20); |
| | | padding: vww(5) vww(10); |
| | | color: #111111; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .tableBody { |
| | | width: 80%; |
| | | } |
| | | .TableUtilBtn { |
| | | width: 20%; |
| | | overflow: hidden; |
| | | .uni-table{ |
| | | min-width:0!important; |
| | | } |
| | | .TableUtilBtnContainer{ |
| | | .u-button{ |
| | | width:vww(20); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 合同类型选择器 |
| | | .selectContractTypePicker { |
| | | .u-popup { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // 时间选择器 |
| | | .selectContractStartTime{ |
| | | .selectContractStartTime { |
| | | .u-popup { |
| | | .u-transition { |
| | | height: auto; |
| | | } |
| | | } |
| | | } |
| | | .selectContractEndTime{ |
| | | .selectContractEndTime { |
| | | .u-popup { |
| | | .u-transition { |
| | | height: auto; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |