Forráskód Böngészése

辅配件销售订单收款管理

pengyh 1 éve
szülő
commit
420560db07

+ 16 - 0
src/api/auxiliaryFittings/auxiliarySalesOrder.js

@@ -94,4 +94,20 @@ export function getGoods(params) {
     method: 'post',
     params
   })
+}
+
+export function getProject(data) {
+  return request({
+    url: `/order/engin/base/list`,
+    method: 'post',
+    data
+  })
+}
+
+export function getProjectCollectionList(params) {
+  return request({
+    url: `/order/engin/manger/detailPrice`,
+    method: 'post',
+    params
+  })
 }

+ 2 - 2
src/api/auxiliaryFittings/projectAuxiliaryManage.js

@@ -37,10 +37,10 @@ export function givePrice(data) {
 }
 
 // 收款详情
-export function getPriceDetail(data) {
+export function getPriceDetail(params) {
   return request({
     url: `/order/engin/manger/detailPrice`,
     method: 'post',
-    data
+    params
   })
 }

+ 121 - 87
src/views/auxiliaryFittings/projectAttachmentManage/detail.vue

@@ -15,50 +15,47 @@
 							</el-form-item>
 						</el-col>
 						<el-col :span="12">
-							<el-form-item label="工程名称" prop="source" :required="true">
-								<el-select v-model="formData.source" :disabled="formType==2" placeholder="请选择" style="width: 100%;">
-								    <el-option
-									  v-for="item in [{name: '在线订单',id: 'ONLINE'},{name: '自建订单',id: 'SELF'}]"
-								      :key="item.id"
-								      :label="item.name"
-								      :value="item.id">
-								    </el-option>
-								  </el-select>
+							<el-form-item label="工程名称" :required="true">
+								<el-input type="text" v-model="formData.projectName" disabled></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
-							<el-form-item label="工程编号" prop="projectNo" :required="true">
-								<el-input type="text" :disabled="formType==2" v-model="formData.projectNo" placeholder="请输入"></el-input>
+							<el-form-item label="工程编号" :required="true">
+								<el-input type="text" disabled v-model="formData.projectNo" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
-							<el-form-item label="负责人" prop="projectNo" :required="true">
-								<el-input type="text" :disabled="formType==2" v-model="formData.projectNo" placeholder="请输入"></el-input>
+							<el-form-item label="负责人" :required="true">
+								<el-input type="text" disabled v-model="formData.manger" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
-							<el-form-item label="联系电话" prop="projectNo" :required="true">
-								<el-input type="text" :disabled="formType==2" v-model="formData.projectNo" placeholder="请输入"></el-input>
+							<el-form-item label="联系电话" :required="true">
+								<el-input type="text" disabled v-model="formData.mobile" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
-							<el-form-item label="项目时间" prop="projectNo" :required="true">
+							<el-form-item label="项目时间" :required="true">
 								<el-date-picker
-									style="width: 100%"
-								    v-model="formData.projectDate"
-									:disabled="formData.flag != 'SAVE' && formType!=0"
-								    type="daterange"
-								    align="right"
-								    unlink-panels
-								    range-separator="至"
-								    start-placeholder="开始日期"
-								    end-placeholder="结束日期"
-								    :picker-options="pickerOptions">
+									style="width:50%"
+								    v-model="formData.startTime"
+								    type="date"
+									:disabled="true"
+									value-format="yyyy-MM-dd"
+								    placeholder="开始日期">
+								</el-date-picker>
+								<el-date-picker
+									style="width:50%"
+								    v-model="formData.endTime"
+								    type="date"
+									:disabled="true"
+									value-format="yyyy-MM-dd"
+								    placeholder="结束日期">
 								</el-date-picker>
 							</el-form-item>
 						</el-col>
 						<el-col :span="24">
-							<el-form-item label="项目地址" prop="province" :required="true">
+							<el-form-item label="项目地址" :required="true">
 								<el-row>
 									<el-col :span="5" style="margin-right: 12px;">
 										<el-input type="text" v-model="formData.province" disabled placeholder="请选择省"></el-input>
@@ -79,7 +76,7 @@
 							<el-form-item label="" prop="address">
 								<el-row :gutter="20">
 									<el-col :span="24">
-										<el-input type="text" v-model="formData.address" :disabled="formType==2" placeholder="详细地址"></el-input>
+										<el-input type="text" v-model="formData.address" disabled placeholder="详细地址"></el-input>
 									</el-col>
 									<!-- <el-col :span="2">
 										<geographicalPosi :disabled="formType==2" :formData="this.formData" @selectPosi="selectAddress"/>
@@ -89,14 +86,49 @@
 						</el-col>
 						<el-col :span="24">
 							<el-form-item label="项目说明">
-								<el-input type="textarea" :rows="4" :disabled="formType==2" v-model="formData.remark" placeholder="请输入"></el-input>
+								<el-input type="textarea" :rows="4" disabled v-model="formData.remark" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="销售订单数" :required="true">
+								<el-input type="text" disabled v-model="detail.salesNum" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="销售金额" :required="true">
+								<el-input type="text" disabled v-model="detail.salesPrice" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="返还单数量" :required="true">
+								<el-input type="text" disabled v-model="detail.retNum" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="退货金额" :required="true">
+								<el-input type="text" disabled v-model="detail.retPrice" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="应收金额" :required="true">
+								<el-input type="text" disabled v-model="detail.price" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="已收金额" :required="true">
+								<el-input type="text" disabled v-model="detail.givePrice" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="待收金额" :required="true">
+								<el-input type="text" disabled v-model="detail.waitPrice" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 					</el-row>
 				</el-form>
 			</div>
 		</el-card>
-		<el-card class="box-card">
+		<el-card class="box-card" v-if="detail.waitPrice > 0">
 			<div slot="header" class="clearfix">
 				<span>收款信息</span>
 			</div>
@@ -104,12 +136,12 @@
 				<el-form ref="formData1" :rules="rules1" :model="formData1" label-width="110px" size="small" label-position="left">
 					<el-row :gutter="20" justify="start">
 						<el-col :span="24">
-							<el-form-item label="收款金额">
-								<el-input type="text" v-model="formData1.amount" placeholder="请输入"></el-input>
+							<el-form-item label="收款金额" prop="price">
+								<el-input type="text" v-model="formData1.price" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="24">
-							<el-form-item label="收款凭证">
+							<el-form-item label="收款凭证" prop="fileUrl">
 								<ImageUpload :fileList="formData1.fileUrl" :limit="1" />
 							</el-form-item>
 						</el-col>
@@ -128,22 +160,26 @@
 			</div>
 			<div class="table">
 				<el-table :data="collectionList" element-loading-text="Loading" border fit highlight-current-row stripe>
-					<el-table-column prop="" label="收款结果" align="center"></el-table-column>
-					<el-table-column prop="" label="收款金额" align="center"></el-table-column>
+					<el-table-column prop="status" label="收款结果" align="center">
+						<template slot-scope="scope">
+							{{scope.row.status == 'NO'?'未付款':scope.row.status == 'WAIT'?'部分付款':scope.row.status == 'OK'?'已完成':''}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="price" label="收款金额" align="center"></el-table-column>
 					<el-table-column prop="" align="center" label="收款凭证" >
 						<template slot-scope="scope">
-							<el-image src=""></el-image>
+							<el-image :src="scope.row.urlPrc" fit="scale-down"></el-image>
 						</template>
 					</el-table-column>
-					<el-table-column prop="" label="备注" align="center"></el-table-column>
-					<el-table-column prop="" align="center" label="收款人" ></el-table-column>
-					<el-table-column prop="" align="center" label="收款时间" ></el-table-column>
+					<el-table-column prop="remark" label="备注" align="center"></el-table-column>
+					<el-table-column prop="updateBy" align="center" label="收款人" ></el-table-column>
+					<el-table-column prop="updateTime" align="center" label="收款时间" ></el-table-column>
 				</el-table>
 			</div>
 		</el-card>
 		<div class="page-footer">
 			<div class="footer">
-				<el-button v-if="true" size="small" type="primary"  @click="confirm()">确定</el-button>
+				<el-button v-if="detail.waitPrice > 0" size="small" type="primary"  @click="confirm()">确定</el-button>
 				<el-button size="small" type="info" @click="goBack">返回</el-button>
 			</div>
 		</div>
@@ -154,7 +190,7 @@
 	import ImageUpload from '@/components/file-upload'
 	import { lbsAmapRegion } from '@/api/common.js'
 	import geographicalPosi from '@/components/geographicalPosi/index.vue'
-	import { getDetail, confirm } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
+	import { getDetail, givePrice, getPriceDetail } from "@/api/auxiliaryFittings/projectAuxiliaryManage";
 	export default {
 		components: {geographicalPosi,ImageUpload},
 		props: ['id','title','formType'],
@@ -166,9 +202,12 @@
 				areaList: [],
 				streetList: [],
 				collectionList: [],
-				formData: {},
+				detail: {},
+				formData: {
+					projectName: ''
+				},
 				formData1: {
-					amount: '',
+					price: '',
 					remark: '',
 					fileUrl: []
 				},
@@ -181,33 +220,13 @@
 						{ required: true, message: '请输入客户姓名', trigger: 'blur' }
 					],
 				},
-				rules1: {},
-				pickerOptions: {
-					shortcuts: [{
-						text: '最近一周',
-						onClick(picker) {
-						const end = new Date();
-						const start = new Date();
-						start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-						picker.$emit('pick', [start, end]);
-						}
-					}, {
-						text: '最近一个月',
-						onClick(picker) {
-						const end = new Date();
-						const start = new Date();
-						start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-						picker.$emit('pick', [start, end]);
-						}
-					}, {
-						text: '最近三个月',
-						onClick(picker) {
-						const end = new Date();
-						const start = new Date();
-						start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-						picker.$emit('pick', [start, end]);
-						}
-					}]
+				rules1: {
+					price: [
+						{ required: true, message: '请输入收款金额', trigger: 'blur' }
+					],
+					fileUrl: [
+						{ required: true, message: '请上传收款凭证', trigger: 'change' }
+					],
 				},
 			};
 		},
@@ -225,8 +244,15 @@
 			},
 			async getDetail(){
 				const that = this
-				getDetail({salesId: this.id}).then( async res => {
-					Object.assign(this.formData, res.data)
+				getDetail({id: this.id}).then( async res => {
+					this.detail = res.data
+					Object.assign(this.formData, res.data.orderEnginBase)
+					this.getPriceDetail(res.data.orderEnginBaseId)
+				})
+			},
+			getPriceDetail(orderEnginBaseId){
+				getPriceDetail({orderEnginBaseId,goodsType: 'P'}).then(res => {
+					this.collectionList = res.data
 				})
 			},
 			getinitlbslist() {
@@ -306,21 +332,29 @@
 				})
 			},
 			confirm(){
-				this.$confirm(`请确定是否确认提货, 是否继续?`, '提示', {
-					confirmButtonText: '确定',
-					cancelButtonText: '取消',
-					type: 'warning'
-				}).then(() => {
-					confirm({
-						salesId: this.formData.salesId
-					}).then(res => {
-						if(res.code == 200){
-							this.$message.success('审核成功!')
-							this.goBack()
-						}
-					})
-				});
-			},
+				this.$refs.formData1.validate((valid, invalidFields, errLabels) => {
+					if (valid) {
+						this.$confirm(`请确定是否确认提交收款信息, 是否继续?`, '提示', {
+							confirmButtonText: '确定',
+							cancelButtonText: '取消',
+							type: 'warning'
+						}).then(() => {
+							givePrice({
+								orderEnginBaseId: this.detail.orderEnginBaseId,
+								orderId: this.detail.orderEnginBaseId,
+								price: this.formData1.price,
+								remark: this.formData1.remark,
+								urlPrc: this.formData1.fileUrl[0].url
+							}).then(res => {
+								if(res.code == 200){
+									this.$message.success('提交成功!')
+									this.goBack()
+								}
+							})
+						});
+					}
+				})
+			}
 		}
 	};
 </script>

+ 11 - 10
src/views/auxiliaryFittings/projectAttachmentManage/index.vue

@@ -4,11 +4,11 @@
 			:table-events="tableEvents" :operationColumnWidth="170" :options-evens-group="optionsEvensGroup"
 			:moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
 			<div slot="moreSearch">
-				<el-radio-group v-model="flag" size="mini" @change="changeType">
+				<el-radio-group v-model="status" size="mini" @change="changeType">
 					<el-radio-button label="">全部</el-radio-button>
-					<el-radio-button label="SAVE">未付款</el-radio-button>
-					<el-radio-button label="SUBMIT">部分付款</el-radio-button>
-					<el-radio-button label="PAY_NOT_TAKE">已完成</el-radio-button>
+					<el-radio-button label="NO">未付款</el-radio-button>
+					<el-radio-button label="WAIT">部分付款</el-radio-button>
+					<el-radio-button label="OK">已完成</el-radio-button>
 				</el-radio-group>
 				<br><br>
 			</div>
@@ -26,7 +26,7 @@ import import_mixin from '@/components/template/import_mixin.js'
 import ImageUpload from '@/components/file-upload'
 import { downloadFiles } from '@/utils/util'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
-import { listPageV2, pageExport, getDetail, add, edit, submit } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
+import { listPage, pageExport } from "@/api/auxiliaryFittings/projectAuxiliaryManage";
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 	components: { TemplatePage, ImageUpload, detail },
@@ -49,7 +49,7 @@ export default {
 			formDialogTitles: ["新增", "编辑", "详情"],
 			formDialog: false,
 			id: '',
-			flag: 'SAVE',
+			status: 'NO',
 			isShowTab: true
 		}
 	},
@@ -74,7 +74,7 @@ export default {
 	},
 	created(){},
 	watch: {
-		flag(){
+		status(){
 			this.isShowTab = false
 			this.$nextTick(()=>{
 				this.isShowTab = true
@@ -95,9 +95,9 @@ export default {
 		getList(p, cb) {
 			try {
 				var pam = JSON.parse(JSON.stringify(p))
-				pam.params.push({ "param": "a.goods_type", "compare": "=", "value": 'M' }, { 'param': 'a.flag', "compare": "=", "value": this.flag })
+				pam.params.push({ "param": "a.goods_type", "compare": "=", "value": 'P' }, { 'param': 'a.status', "compare": "=", "value": this.status })
 				cb && cb(pam)
-				return listPageV2(pam)
+				return listPage(pam)
 			} catch (error) {
 				console.log(error)
 			}
@@ -117,7 +117,7 @@ export default {
 			return this.operationBtn({
 				detail: {
 					click: ({ row, index, column }) => {
-						this.id = row.salesId
+						this.id = row.websitSalesManagerId
 						this.formDialogType = 2
 						this.openForm()
 					}
@@ -128,6 +128,7 @@ export default {
 					}
 				},
 				returnGoodsDetail: {
+					name:"返还单明细",
 					click: ({ row, index, column }) => {
 						
 					}

+ 120 - 86
src/views/auxiliaryFittings/projectAuxiliaryManage/detail.vue

@@ -15,50 +15,47 @@
 							</el-form-item>
 						</el-col>
 						<el-col :span="12">
-							<el-form-item label="工程名称" prop="source" :required="true">
-								<el-select v-model="formData.source" :disabled="formType==2" placeholder="请选择" style="width: 100%;">
-								    <el-option
-									  v-for="item in [{name: '在线订单',id: 'ONLINE'},{name: '自建订单',id: 'SELF'}]"
-								      :key="item.id"
-								      :label="item.name"
-								      :value="item.id">
-								    </el-option>
-								  </el-select>
+							<el-form-item label="工程名称" :required="true">
+								<el-input type="text" v-model="formData.projectName" disabled></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
-							<el-form-item label="工程编号" prop="projectNo" :required="true">
-								<el-input type="text" :disabled="formType==2" v-model="formData.projectNo" placeholder="请输入"></el-input>
+							<el-form-item label="工程编号" :required="true">
+								<el-input type="text" disabled v-model="formData.projectNo" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
-							<el-form-item label="负责人" prop="projectNo" :required="true">
-								<el-input type="text" :disabled="formType==2" v-model="formData.projectNo" placeholder="请输入"></el-input>
+							<el-form-item label="负责人" :required="true">
+								<el-input type="text" disabled v-model="formData.manger" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
-							<el-form-item label="联系电话" prop="projectNo" :required="true">
-								<el-input type="text" :disabled="formType==2" v-model="formData.projectNo" placeholder="请输入"></el-input>
+							<el-form-item label="联系电话" :required="true">
+								<el-input type="text" disabled v-model="formData.mobile" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6">
-							<el-form-item label="项目时间" prop="projectNo" :required="true">
+							<el-form-item label="项目时间" :required="true">
 								<el-date-picker
-									style="width: 100%"
-								    v-model="formData.projectDate"
-									:disabled="formData.flag != 'SAVE' && formType!=0"
-								    type="daterange"
-								    align="right"
-								    unlink-panels
-								    range-separator="至"
-								    start-placeholder="开始日期"
-								    end-placeholder="结束日期"
-								    :picker-options="pickerOptions">
+									style="width:50%"
+								    v-model="formData.startTime"
+								    type="date"
+									:disabled="true"
+									value-format="yyyy-MM-dd"
+								    placeholder="开始日期">
+								</el-date-picker>
+								<el-date-picker
+									style="width:50%"
+								    v-model="formData.endTime"
+								    type="date"
+									:disabled="true"
+									value-format="yyyy-MM-dd"
+								    placeholder="结束日期">
 								</el-date-picker>
 							</el-form-item>
 						</el-col>
 						<el-col :span="24">
-							<el-form-item label="项目地址" prop="province" :required="true">
+							<el-form-item label="项目地址" :required="true">
 								<el-row>
 									<el-col :span="5" style="margin-right: 12px;">
 										<el-input type="text" v-model="formData.province" disabled placeholder="请选择省"></el-input>
@@ -79,7 +76,7 @@
 							<el-form-item label="" prop="address">
 								<el-row :gutter="20">
 									<el-col :span="24">
-										<el-input type="text" v-model="formData.address" :disabled="formType==2" placeholder="详细地址"></el-input>
+										<el-input type="text" v-model="formData.address" disabled placeholder="详细地址"></el-input>
 									</el-col>
 									<!-- <el-col :span="2">
 										<geographicalPosi :disabled="formType==2" :formData="this.formData" @selectPosi="selectAddress"/>
@@ -89,14 +86,49 @@
 						</el-col>
 						<el-col :span="24">
 							<el-form-item label="项目说明">
-								<el-input type="textarea" :rows="4" :disabled="formType==2" v-model="formData.remark" placeholder="请输入"></el-input>
+								<el-input type="textarea" :rows="4" disabled v-model="formData.remark" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="销售订单数" :required="true">
+								<el-input type="text" disabled v-model="detail.salesNum" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="销售金额" :required="true">
+								<el-input type="text" disabled v-model="detail.salesPrice" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="退货单数量" :required="true">
+								<el-input type="text" disabled v-model="detail.retNum" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="退货金额" :required="true">
+								<el-input type="text" disabled v-model="detail.retPrice" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="应收金额" :required="true">
+								<el-input type="text" disabled v-model="detail.price" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="已收金额" :required="true">
+								<el-input type="text" disabled v-model="detail.givePrice" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6">
+							<el-form-item label="待收金额" :required="true">
+								<el-input type="text" disabled v-model="detail.waitPrice" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 					</el-row>
 				</el-form>
 			</div>
 		</el-card>
-		<el-card class="box-card">
+		<el-card class="box-card" v-if="detail.waitPrice > 0">
 			<div slot="header" class="clearfix">
 				<span>收款信息</span>
 			</div>
@@ -104,12 +136,12 @@
 				<el-form ref="formData1" :rules="rules1" :model="formData1" label-width="110px" size="small" label-position="left">
 					<el-row :gutter="20" justify="start">
 						<el-col :span="24">
-							<el-form-item label="收款金额">
-								<el-input type="text" v-model="formData1.amount" placeholder="请输入"></el-input>
+							<el-form-item label="收款金额" prop="price">
+								<el-input type="text" v-model="formData1.price" placeholder="请输入"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="24">
-							<el-form-item label="收款凭证">
+							<el-form-item label="收款凭证" prop="fileUrl">
 								<ImageUpload :fileList="formData1.fileUrl" :limit="1" />
 							</el-form-item>
 						</el-col>
@@ -128,22 +160,26 @@
 			</div>
 			<div class="table">
 				<el-table :data="collectionList" element-loading-text="Loading" border fit highlight-current-row stripe>
-					<el-table-column prop="" label="收款结果" align="center"></el-table-column>
-					<el-table-column prop="" label="收款金额" align="center"></el-table-column>
+					<el-table-column prop="status" label="收款结果" align="center">
+						<template slot-scope="scope">
+							{{scope.row.status == 'NO'?'未付款':scope.row.status == 'WAIT'?'部分付款':scope.row.status == 'OK'?'已完成':''}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="price" label="收款金额" align="center"></el-table-column>
 					<el-table-column prop="" align="center" label="收款凭证" >
 						<template slot-scope="scope">
-							<el-image src=""></el-image>
+							<el-image :src="scope.row.urlPrc" fit="scale-down"></el-image>
 						</template>
 					</el-table-column>
-					<el-table-column prop="" label="备注" align="center"></el-table-column>
-					<el-table-column prop="" align="center" label="收款人" ></el-table-column>
-					<el-table-column prop="" align="center" label="收款时间" ></el-table-column>
+					<el-table-column prop="remark" label="备注" align="center"></el-table-column>
+					<el-table-column prop="updateBy" align="center" label="收款人" ></el-table-column>
+					<el-table-column prop="updateTime" align="center" label="收款时间" ></el-table-column>
 				</el-table>
 			</div>
 		</el-card>
 		<div class="page-footer">
 			<div class="footer">
-				<el-button v-if="true" size="small" type="primary"  @click="confirm()">确定</el-button>
+				<el-button v-if="detail.waitPrice > 0" size="small" type="primary"  @click="confirm()">确定</el-button>
 				<el-button size="small" type="info" @click="goBack">返回</el-button>
 			</div>
 		</div>
@@ -166,9 +202,12 @@
 				areaList: [],
 				streetList: [],
 				collectionList: [],
-				formData: {},
+				detail: {},
+				formData: {
+					projectName: ''
+				},
 				formData1: {
-					amount: '',
+					price: '',
 					remark: '',
 					fileUrl: []
 				},
@@ -181,33 +220,13 @@
 						{ required: true, message: '请输入客户姓名', trigger: 'blur' }
 					],
 				},
-				rules1: {},
-				pickerOptions: {
-					shortcuts: [{
-						text: '最近一周',
-						onClick(picker) {
-						const end = new Date();
-						const start = new Date();
-						start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-						picker.$emit('pick', [start, end]);
-						}
-					}, {
-						text: '最近一个月',
-						onClick(picker) {
-						const end = new Date();
-						const start = new Date();
-						start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-						picker.$emit('pick', [start, end]);
-						}
-					}, {
-						text: '最近三个月',
-						onClick(picker) {
-						const end = new Date();
-						const start = new Date();
-						start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-						picker.$emit('pick', [start, end]);
-						}
-					}]
+				rules1: {
+					price: [
+						{ required: true, message: '请输入收款金额', trigger: 'blur' }
+					],
+					fileUrl: [
+						{ required: true, message: '请上传收款凭证', trigger: 'change' }
+					],
 				},
 			};
 		},
@@ -225,8 +244,15 @@
 			},
 			async getDetail(){
 				const that = this
-				getDetail({salesId: this.id}).then( async res => {
-					Object.assign(this.formData, res.data)
+				getDetail({id: this.id}).then( async res => {
+					this.detail = res.data
+					Object.assign(this.formData, res.data.orderEnginBase)
+					this.getPriceDetail(res.data.orderEnginBaseId)
+				})
+			},
+			getPriceDetail(orderEnginBaseId){
+				getPriceDetail({orderEnginBaseId,goodsType: 'M'}).then(res => {
+					this.collectionList = res.data
 				})
 			},
 			getinitlbslist() {
@@ -306,21 +332,29 @@
 				})
 			},
 			confirm(){
-				this.$confirm(`请确定是否确认提货, 是否继续?`, '提示', {
-					confirmButtonText: '确定',
-					cancelButtonText: '取消',
-					type: 'warning'
-				}).then(() => {
-					confirm({
-						salesId: this.formData.salesId
-					}).then(res => {
-						if(res.code == 200){
-							this.$message.success('审核成功!')
-							this.goBack()
-						}
-					})
-				});
-			},
+				this.$refs.formData1.validate((valid, invalidFields, errLabels) => {
+					if (valid) {
+						this.$confirm(`请确定是否确认提交收款信息, 是否继续?`, '提示', {
+							confirmButtonText: '确定',
+							cancelButtonText: '取消',
+							type: 'warning'
+						}).then(() => {
+							givePrice({
+								orderEnginBaseId: this.detail.orderEnginBaseId,
+								orderId: this.detail.orderEnginBaseId,
+								price: this.formData1.price,
+								remark: this.formData1.remark,
+								urlPrc: this.formData1.fileUrl[0].url
+							}).then(res => {
+								if(res.code == 200){
+									this.$message.success('提交成功!')
+									this.goBack()
+								}
+							})
+						});
+					}
+				})
+			}
 		}
 	};
 </script>

+ 8 - 8
src/views/auxiliaryFittings/projectAuxiliaryManage/index.vue

@@ -4,11 +4,11 @@
 			:table-events="tableEvents" :operationColumnWidth="170" :options-evens-group="optionsEvensGroup"
 			:moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
 			<div slot="moreSearch">
-				<el-radio-group v-model="flag" size="mini" @change="changeType">
+				<el-radio-group v-model="status" size="mini" @change="changeType">
 					<el-radio-button label="">全部</el-radio-button>
-					<el-radio-button label="SAVE">未付款</el-radio-button>
-					<el-radio-button label="SUBMIT">部分付款</el-radio-button>
-					<el-radio-button label="PAY_NOT_TAKE">已完成</el-radio-button>
+					<el-radio-button label="NO">未付款</el-radio-button>
+					<el-radio-button label="WAIT">部分付款</el-radio-button>
+					<el-radio-button label="OK">已完成</el-radio-button>
 				</el-radio-group>
 				<br><br>
 			</div>
@@ -49,7 +49,7 @@ export default {
 			formDialogTitles: ["新增", "编辑", "详情"],
 			formDialog: false,
 			id: '',
-			flag: '',
+			status: 'NO',
 			isShowTab: true
 		}
 	},
@@ -74,7 +74,7 @@ export default {
 	},
 	created(){},
 	watch: {
-		flag(){
+		status(){
 			this.isShowTab = false
 			this.$nextTick(()=>{
 				this.isShowTab = true
@@ -95,7 +95,7 @@ export default {
 		getList(p, cb) {
 			try {
 				var pam = JSON.parse(JSON.stringify(p))
-				// pam.params.push({ "param": "a.goods_type", "compare": "=", "value": 'M' }, { 'param': 'a.flag', "compare": "=", "value": this.flag })
+				pam.params.push({ "param": "a.goods_type", "compare": "=", "value": 'M' }, { 'param': 'a.status', "compare": "=", "value": this.status })
 				cb && cb(pam)
 				return listPage(pam)
 			} catch (error) {
@@ -117,7 +117,7 @@ export default {
 			return this.operationBtn({
 				detail: {
 					click: ({ row, index, column }) => {
-						this.id = row.salesId
+						this.id = row.websitSalesManagerId
 						this.formDialogType = 2
 						this.openForm()
 					}

+ 308 - 30
src/views/auxiliaryFittings/salesManagement/components/attachmentSalesOrderDetail.vue

@@ -82,32 +82,20 @@
 								</el-form-item>
 							</el-col>
 						</template>
-						<el-col :span="6" v-if="id">
-							<el-form-item label="单据金额">
-								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6" v-if="id">
-							<el-form-item label="制单人">
-								<el-input type="text" :value="formData.createBy" disabled></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6" v-if="id">
-							<el-form-item label="制单时间">
-								<el-input type="text" :value="formData.createTime" disabled></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6" v-if="id">
-							<el-form-item label="审核人">
-								<el-input type="text" :value="formData.confirmBy" disabled></el-input>
+						<el-col :span="8">
+							<el-form-item label="销售类型" :required="true" style="padding-bottom: 1px;">
+								<el-radio-group v-model="formData.salesType" @change="changeSale">
+								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="零售">零售</el-radio>
+								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="工程">工程</el-radio>
+								</el-radio-group>
 							</el-form-item>
 						</el-col>
 						<el-col :span="6" v-if="id">
-							<el-form-item label="审核时间">
-								<el-input type="text" :value="formData.confirmTime" disabled></el-input>
+							<el-form-item label="单据金额">
+								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="12">
+						<el-col :span="8">
 							<el-form-item label="订单来源" prop="source" :required="true">
 								<el-select v-model="formData.source" :disabled="true" placeholder="请选择" style="width: 100%;">
 								    <el-option
@@ -119,17 +107,122 @@
 								  </el-select>
 							</el-form-item>
 						</el-col>
-						<el-col :span="9">
+						<el-col :span="6">
 							<el-form-item label="支付方式" prop="payType" :required="true">
 								<el-radio-group v-model="formData.payType">
 								    <el-radio :disabled="formType == 2" label="CASH">现金</el-radio>
 								    <el-radio :disabled="formType == 2" label="WECHAT">微信</el-radio>
+									<el-radio v-if="formData.salesType == '工程'" :disabled="formData.flag != 'SAVE' && formType!=0" label="ENGIN">工程支付</el-radio>
 								</el-radio-group>
 							</el-form-item>
 						</el-col>
-						<el-col :span="3" v-if="formData.flag == 'SUBMIT' && formData.payType == 'WECHAT'">
+						<el-col :span="2" v-if="formData.flag == 'SUBMIT' && formData.payType == 'WECHAT'">
 							<div style="height: 32px;display: flex;align-items: center;cursor: pointer;" @click="wxPay()">微信支付<i class="el-icon-full-screen"></i></div>
 						</el-col>
+						<el-col :span="2" v-else>
+							<div style="opacity: 0;">隐藏</div>
+						</el-col>
+						<template v-if="formData.salesType == '工程'">
+							<el-col :span="8">
+								<el-form-item label="工程名称" prop="project" :required="true">
+									<el-select v-model="formData.project" value-key="id" @change="(e)=>{
+											formData.orderEnginBaseId = e.id
+										}" :disabled="formData.flag != 'SAVE' && formType!=0" placeholder="请选择" style="width: 100%;">
+									    <el-option
+										  v-for="(item,index) in projectList"
+									      :key="index"
+									      :label="item.projectName"
+									      :value="item">
+									    </el-option>
+									</el-select>
+								</el-form-item>
+							</el-col>
+							<el-col :span="6">
+								<el-form-item label="工程编号" :required="true">
+									<el-input type="text" :disabled="true" v-model="formData.project.projectNo" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="6">
+								<el-form-item label="负责人" :required="true">
+									<el-input type="text" :disabled="true" v-model="formData.project.projectNo" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="6">
+								<el-form-item label="联系电话" :required="true">
+									<el-input type="text" :disabled="true" v-model="formData.project.projectNo" placeholder="请输入"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="6">
+								<el-form-item label="项目时间" :required="true">
+									<el-date-picker
+										style="width:50%"
+									    v-model="formData.project.startTime"
+									    type="date"
+										:disabled="true"
+										value-format="yyyy-MM-dd"
+									    placeholder="开始日期">
+									</el-date-picker>
+									<el-date-picker
+										style="width:50%"
+									    v-model="formData.project.endTime"
+									    type="date"
+										:disabled="true"
+										value-format="yyyy-MM-dd"
+									    placeholder="结束日期">
+									</el-date-picker>
+								</el-form-item>
+							</el-col>
+							<el-col :span="24">
+								<el-form-item label="项目地址" prop="province" :required="true">
+									<el-row>
+										<el-col :span="5" style="margin-right: 12px;">
+											<el-input type="text" v-model="formData.project.province" disabled placeholder="请选择省"></el-input>
+										</el-col>
+										<el-col :span="5" style="margin-right: 12px;">
+											<el-input type="text" v-model="formData.project.city" disabled placeholder="请选择市"></el-input>
+										</el-col>
+										<el-col :span="5" style="margin-right: 12px;">
+											<el-input type="text" v-model="formData.project.area" disabled placeholder="请选择区"></el-input>
+										</el-col>
+										<el-col :span="8">
+											<el-input type="text" v-model="formData.project.street" disabled placeholder="请选择街道"></el-input>
+										</el-col>
+									</el-row>
+								</el-form-item>
+							</el-col>
+							<el-col :span="24">
+								<el-form-item label="" prop="address">
+									<el-row :gutter="20">
+										<el-col :span="24">
+											<el-input type="text" v-model="formData.project.address" :disabled="true" placeholder="详细地址"></el-input>
+										</el-col>
+										<!-- <el-col :span="2">
+											<geographicalPosi :disabled="formType==2" :formData="this.formData" @selectPosi="selectAddress"/>
+										</el-col> -->
+									</el-row>
+								</el-form-item>
+							</el-col>
+						</template>
+						<el-col :span="6" v-if="id">
+							<el-form-item label="制单人">
+								<el-input type="text" :value="formData.createBy" disabled></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6" v-if="id">
+							<el-form-item label="制单时间">
+								<el-input type="text" :value="formData.createTime" disabled></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6" v-if="id">
+							<el-form-item label="审核人">
+								<el-input type="text" :value="formData.confirmBy" disabled></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="6" v-if="id">
+							<el-form-item label="审核时间">
+								<el-input type="text" :value="formData.confirmTime" disabled></el-input>
+							</el-form-item>
+						</el-col>
 						<el-col :span="24">
 							<el-form-item label="备注">
 								<el-input type="textarea" :rows="4" v-model="formData.remark" :disabled="formType == 2" placeholder="请输入"></el-input>
@@ -183,6 +276,56 @@
 				</el-table>
 			</div>
 		</el-card>
+		<el-card class="box-card" v-if="formData.salesType == '工程' && formType != 0 && formData.flag == 'SAVE'">
+			<div slot="header" class="clearfix">
+				<span>收款信息</span>
+			</div>
+			<div class="mymain-container">
+				<el-form ref="formData1" :rules="rules1" :model="formData1" label-width="110px" size="small" label-position="left">
+					<el-row :gutter="20" justify="start">
+						<el-col :span="24">
+							<el-form-item label="收款金额">
+								<el-input type="text" style="width: 30%" v-model="formData1.price" placeholder="请输入"></el-input>
+								<span style="color: #FF8F47;margin-left: 10px">注:操作【提交】时,系统方可记录收款信息</span>
+							</el-form-item>
+						</el-col>
+						<el-col :span="24">
+							<el-form-item label="收款凭证">
+								<ImageUpload :fileList="formData1.fileUrl" :limit="1" :isEdit="formType !== 2" />
+							</el-form-item>
+						</el-col>
+						<el-col :span="24">
+							<el-form-item label="备注">
+								<el-input type="textarea" :rows="4" v-model="formData1.remark" placeholder="请输入"></el-input>
+							</el-form-item>
+						</el-col>
+					</el-row>
+				</el-form>
+			</div>
+		</el-card>
+		<el-card class="box-card" v-if="formData.salesType == '工程' && formType != 0">
+			<div slot="header" class="clearfix">
+				<span>收款记录</span>
+			</div>
+			<div class="table">
+				<el-table :data="collectionList" element-loading-text="Loading" border fit highlight-current-row stripe>
+					<el-table-column prop="status" label="收款结果" align="center">
+						<template slot-scope="scope">
+							{{scope.row.status == 'NO'?'未付款':scope.row.status == 'WAIT'?'部分付款':scope.row.status == 'OK'?'已完成':''}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="price" label="收款金额" align="center"></el-table-column>
+					<el-table-column prop="" align="center" label="收款凭证" >
+						<template slot-scope="scope">
+							<el-image :src="scope.row.urlPrc" fit="scale-down"></el-image>
+						</template>
+					</el-table-column>
+					<el-table-column prop="remark" label="备注" align="center"></el-table-column>
+					<el-table-column prop="updateBy" align="center" label="收款人" ></el-table-column>
+					<el-table-column prop="updateTime" align="center" label="收款时间" ></el-table-column>
+				</el-table>
+			</div>
+		</el-card>
 		<div class="page-footer">
 			<div class="footer">
 				<el-button v-if="formType == 0 || (formType == 1 && formData.flag == 'SAVE')" size="small" type="primary" @click="save()">保存</el-button>
@@ -211,14 +354,20 @@
 <script>
 	import { getWebsit } from "@/api/customerManagement";
 	import QRCode from "qrcodejs2";
-	import { getWorker, getCategory, getGoods, getDetail, add, edit, confirm, submit, getCode } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
+	import { lbsAmapRegion } from '@/api/common.js'
+	import geographicalPosi from '@/components/geographicalPosi/index.vue'
+	import ImageUpload from '@/components/file-upload'
+	import { getWorker, getCategory, getGoods, getDetail, add, edit, confirm, submit, getCode, getProject, getProjectCollectionList } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
 	export default {
+		components: {geographicalPosi,ImageUpload},
 		props: ['id','title','formType'],
 		data() {
 			return {
 				dataList: [],
 				websitList: [],
 				workerList: [],
+				projectList: [],
+				collectionList: [],
 				isPay: false,
 				is_submit: true,
 				payCodeUrl: '',
@@ -242,8 +391,31 @@
 					payType: '',
 					totalAmount: '',
 					remark: '',
-					buyPeople: 'WORKER'
+					buyPeople: 'WORKER',
+					salesType: '零售',
+					province: '',
+					provinceId: '',
+					city: '',
+					cityId: '',
+					area: '',
+					areaId: '',
+					street: '',
+					streetId: '',
+					address: '',
+					lat: '',
+					lng: '',
+					project: {},
+					orderEnginBaseId: '',
+				},
+				formData1: {
+					price: '',
+					remark: '',
+					fileUrl: []
 				},
+				provinceList: [],
+				cityList: [],
+				areaList: [],
+				streetList: [],
 				isEdit: 0,
 				timer: '',
 				companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
@@ -280,7 +452,9 @@
 			if(this.id){
 				this.getDetail()
 			}
+			this.getinitlbslist()
 			this.getWebsit()
+			this.getProject()
 		},
 		methods: {
 			// 返回
@@ -292,9 +466,13 @@
 				getDetail({salesId: this.id}).then(async res => {
 					Object.assign(this.formData, res.data, {
 						websit: {websitId: res.data.websitId,name: res.data.websitName},
-						worker: {nickName: res.data.workerName,userId: res.data.workerId}	  
+						worker: {nickName: res.data.workerName,userId: res.data.workerId},
+						project: {id: res.data.orderEnginBaseId,projectName: res.data.projectName,projectNo: res.data.projectNo,manger: res.data.manger,mobile: res.data.mobile,startTime: res.data.startTime,endTime: res.data.endTime,province: res.data.province,provinceId: res.data.provinceId,city: res.data.city,cityId: res.data.cityId,area: res.data.area,areaId: res.data.areaId,street: res.data.street,streetId: res.data.streetId,address: res.data.address,lat: res.data.lat,lng: res.data.lng}
 					})
 					this.getWorker()
+					if(res.data.salesType == '工程'){
+						this.getProjectCollectionList(res.data.orderEnginBaseId)
+					}
 					for(var item of res.data.items){
 						var ress = await that.getGoods(item.goodsName, 1)
 						item.goods = {...ress.data,oldPrice:ress.data.price}
@@ -313,6 +491,20 @@
 				this.formData.websitName = e.name
 				this.getWorker()
 			},
+			getProject(){
+				getProject({
+					pageNum: 1,
+					pageSize: -1,
+					params:[]
+				}).then(res => {
+					this.projectList = res.data.records
+				})
+			},
+			getProjectCollectionList(orderEnginBaseId){
+				getProjectCollectionList({orderEnginBaseId}).then(res => {
+					this.collectionList = res.data
+				})
+			},
 			async getGoods(goodsName,type){
 				const that = this
 				if(type == 1){
@@ -386,7 +578,10 @@
 					type: 'warning'
 				}).then(() => {
 					submit({
-						salesId: this.formData.salesId
+						salesId: this.formData.salesId,
+						price: this.formData1.price,
+						urlPrc: this.formData1.fileUrl[0].url,
+						remark: this.formData1.remark
 					}).then(res => {
 						if(res.code == 200){
 							this.$message.success('提交成功!')
@@ -476,7 +671,9 @@
 								identity: this.formData.identity,
 								workerMobile: this.formData.workerMobile,
 								buyPeople: this.formData.buyPeople,
-								items: this.dataList
+								items: this.dataList,
+								orderEnginBaseId: this.formData.orderEnginBaseId,
+								salesType: this.formData.salesType
 							}).then(res => {
 								if(res.code == 200){
 									this.$message.success('提交成功!')
@@ -497,7 +694,9 @@
 								identity: this.formData.identity,
 								workerMobile: this.formData.workerMobile,
 								buyPeople: this.formData.buyPeople,
-								items: this.dataList
+								items: this.dataList,
+								orderEnginBaseId: this.formData.orderEnginBaseId,
+								salesType: this.formData.salesType
 							}).then(res => {
 								if(res.code == 200){
 									this.dataList = []
@@ -508,7 +707,86 @@
 						}
 					}
 				})
-			}
+			},
+			changeSale(){
+				
+			},
+			getinitlbslist() {
+			  // 初始化请求省市区街道下拉选项数据
+			  lbsAmapRegion({ pid: 0 }).then(res => {
+			    this.provinceList = res.data
+			    // 创建工单时获取ip地址定位赋值
+			    if (!this.id && this.$IpAdd.province) {
+			      var item = this.provinceList.find(item => item.name === this.$IpAdd.province)
+			      if (item) {
+			        this.formData.provinceId = item.id
+			        this.formData.province = item.name
+			      }
+			    }
+			    if (this.formData.provinceId) {
+			      lbsAmapRegion({ pid: this.formData.provinceId }).then(res => {
+			        this.cityList = res.data
+			        // 创建工单时获取ip地址定位赋值
+			        if (!this.id && this.$IpAdd.city) {
+			          var item2 = this.cityList.find(item => item.name === this.$IpAdd.city)
+			          if (item2) {
+			            this.formData.cityId = item2.id
+			            this.formData.city = item2.name
+			          }
+			        }
+			        if (this.formData.cityId) {
+			          lbsAmapRegion({ pid: this.formData.cityId }).then(res => {
+			            this.areaList = res.data
+			          })
+			        }
+			        if (this.formData.areaId) {
+			          lbsAmapRegion({ pid: this.formData.areaId }).then(res => {
+			            this.streetList = res.data
+			          })
+			        }
+			      })
+			    }
+			  })
+			},
+			selectAddress(data){
+				this.formData.lng = data.center[0]
+				this.formData.lat = data.center[1]
+				// 获取定位的省市区街道
+				var { province, city, district, township } = data.data.addressComponent
+				// 获取选中省名称id
+				var { id, name } = this.provinceList.find(item => item.name === province)
+				this.formData.provinceId = id
+				this.formData.province = name
+				// 请求市选项
+				lbsAmapRegion({ pid: this.formData.provinceId }).then(res => {
+				  // 赋值市选项
+				  this.cityList = res.data
+				  // 获取选中市名称id
+				  var { id, name } = res.data.find(item => item.name === city)
+				  this.formData.cityId = id
+				  this.formData.city = name
+				  // 请求区选项
+				  lbsAmapRegion({ pid: this.formData.cityId }).then(res => {
+				    // 赋值区选项
+				    this.areaList = res.data
+				    // 获取选中区名称id
+				    var { id, name } = res.data.find(item => item.name === district)
+				    this.formData.areaId = id
+				    this.formData.area = name
+				    // 请求街道选项
+				    lbsAmapRegion({ pid: this.formData.areaId }).then(res => {
+				      // 赋值街道选项
+				      this.streetList = res.data
+				      // 获取选中街道名称id
+				      var { id, name } = res.data.find(item => item.name === township)
+				      this.formData.streetId = id
+				      this.formData.street = name
+				      // 赋值GPS详细地址
+				      this.formData.address = data.name
+				    })
+				  })
+				})
+			},
 		}
 	};
 </script>

+ 100 - 86
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesOrderDetail.vue

@@ -81,15 +81,15 @@
 									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.workerMobile" placeholder="请输入"></el-input>
 								</el-form-item>
 							</el-col>
-							<el-col :span="8">
-								<el-form-item label="销售类型" :required="true" style="padding-bottom: 1px;">
-									<el-radio-group v-model="formData.saleType" @change="changeSale">
-									    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="1">零售</el-radio>
-									    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="2">工程</el-radio>
-									</el-radio-group>
-								</el-form-item>
-							</el-col>
 						</template>
+						<el-col :span="8">
+							<el-form-item label="销售类型" :required="true" style="padding-bottom: 1px;">
+								<el-radio-group v-model="formData.salesType" @change="changeSale">
+								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="零售">零售</el-radio>
+								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="工程">工程</el-radio>
+								</el-radio-group>
+							</el-form-item>
+						</el-col>
 						<el-col :span="8" v-if="id">
 							<el-form-item label="单据金额">
 								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
@@ -112,7 +112,7 @@
 								<el-radio-group v-model="formData.payType">
 								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="CASH">现金</el-radio>
 								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="WECHAT">微信</el-radio>
-									<el-radio v-if="formData.saleType == 2" :disabled="formData.flag != 'SAVE' && formType!=0" label="project">工程支付</el-radio>
+									<el-radio v-if="formData.salesType == '工程'" :disabled="formData.flag != 'SAVE' && formType!=0" label="ENGIN">工程支付</el-radio>
 								</el-radio-group>
 							</el-form-item>
 						</el-col>
@@ -122,47 +122,53 @@
 						<el-col :span="2" v-else>
 							<div style="opacity: 0;">隐藏</div>
 						</el-col>
-						<template v-if="formData.saleType == 2">
+						<template v-if="formData.salesType == '工程'">
 							<el-col :span="8">
-								<el-form-item label="工程名称" prop="source" :required="true">
-									<el-select v-model="formData.source" :disabled="true" placeholder="请选择" style="width: 100%;">
+								<el-form-item label="工程名称" prop="project" :required="true">
+									<el-select v-model="formData.project" value-key="id" @change="(e)=>{
+											formData.orderEnginBaseId = e.id
+										}" :disabled="formData.flag != 'SAVE' && formType!=0" placeholder="请选择" style="width: 100%;">
 									    <el-option
-										  v-for="item in [{name: '在线订单',id: 'ONLINE'},{name: '自建订单',id: 'SELF'}]"
-									      :key="item.id"
-									      :label="item.name"
-									      :value="item.id">
+										  v-for="(item,index) in projectList"
+									      :key="index"
+									      :label="item.projectName"
+									      :value="item">
 									    </el-option>
-									  </el-select>
+									</el-select>
 								</el-form-item>
 							</el-col>
 							<el-col :span="6">
-								<el-form-item label="工程编号" prop="projectNo" :required="true">
-									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.projectNo" placeholder="请输入"></el-input>
+								<el-form-item label="工程编号" :required="true">
+									<el-input type="text" :disabled="true" v-model="formData.project.projectNo" placeholder="请输入"></el-input>
 								</el-form-item>
 							</el-col>
 							<el-col :span="6">
-								<el-form-item label="负责人" prop="projectNo" :required="true">
-									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.projectNo" placeholder="请输入"></el-input>
+								<el-form-item label="负责人" :required="true">
+									<el-input type="text" :disabled="true" v-model="formData.project.projectNo" placeholder="请输入"></el-input>
 								</el-form-item>
 							</el-col>
 							<el-col :span="6">
-								<el-form-item label="联系电话" prop="projectNo" :required="true">
-									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.projectNo" placeholder="请输入"></el-input>
+								<el-form-item label="联系电话" :required="true">
+									<el-input type="text" :disabled="true" v-model="formData.project.projectNo" placeholder="请输入"></el-input>
 								</el-form-item>
 							</el-col>
 							<el-col :span="6">
-								<el-form-item label="项目时间" prop="projectNo" :required="true">
+								<el-form-item label="项目时间" :required="true">
 									<el-date-picker
-										style="width: 100%"
-									    v-model="formData.projectDate"
-										:disabled="formData.flag != 'SAVE' && formType!=0"
-									    type="daterange"
-									    align="right"
-									    unlink-panels
-									    range-separator="至"
-									    start-placeholder="开始日期"
-									    end-placeholder="结束日期"
-									    :picker-options="pickerOptions">
+										style="width:50%"
+									    v-model="formData.project.startTime"
+									    type="date"
+										:disabled="true"
+										value-format="yyyy-MM-dd"
+									    placeholder="开始日期">
+									</el-date-picker>
+									<el-date-picker
+										style="width:50%"
+									    v-model="formData.project.endTime"
+									    type="date"
+										:disabled="true"
+										value-format="yyyy-MM-dd"
+									    placeholder="结束日期">
 									</el-date-picker>
 								</el-form-item>
 							</el-col>
@@ -170,16 +176,16 @@
 								<el-form-item label="项目地址" prop="province" :required="true">
 									<el-row>
 										<el-col :span="5" style="margin-right: 12px;">
-											<el-input type="text" v-model="formData.province" disabled placeholder="请选择省"></el-input>
+											<el-input type="text" v-model="formData.project.province" disabled placeholder="请选择省"></el-input>
 										</el-col>
 										<el-col :span="5" style="margin-right: 12px;">
-											<el-input type="text" v-model="formData.city" disabled placeholder="请选择市"></el-input>
+											<el-input type="text" v-model="formData.project.city" disabled placeholder="请选择市"></el-input>
 										</el-col>
 										<el-col :span="5" style="margin-right: 12px;">
-											<el-input type="text" v-model="formData.area" disabled placeholder="请选择区"></el-input>
+											<el-input type="text" v-model="formData.project.area" disabled placeholder="请选择区"></el-input>
 										</el-col>
 										<el-col :span="8">
-											<el-input type="text" v-model="formData.street" disabled placeholder="请选择街道"></el-input>
+											<el-input type="text" v-model="formData.project.street" disabled placeholder="请选择街道"></el-input>
 										</el-col>
 									</el-row>
 								</el-form-item>
@@ -187,12 +193,12 @@
 							<el-col :span="24">
 								<el-form-item label="" prop="address">
 									<el-row :gutter="20">
-										<el-col :span="22">
-											<el-input type="text" v-model="formData.address" :disabled="formType==2" placeholder="详细地址"></el-input>
+										<el-col :span="24">
+											<el-input type="text" v-model="formData.project.address" :disabled="true" placeholder="详细地址"></el-input>
 										</el-col>
-										<el-col :span="2">
+										<!-- <el-col :span="2">
 											<geographicalPosi :disabled="formType==2" :formData="this.formData" @selectPosi="selectAddress"/>
-										</el-col>
+										</el-col> -->
 									</el-row>
 								</el-form-item>
 							</el-col>
@@ -295,7 +301,7 @@
 				</el-table>
 			</div>
 		</el-card>
-		<el-card class="box-card" v-if="formData.saleType == 2">
+		<el-card class="box-card" v-if="formData.salesType == '工程' && formType != 0 && formData.flag == 'SAVE'">
 			<div slot="header" class="clearfix">
 				<span>收款信息</span>
 			</div>
@@ -304,7 +310,8 @@
 					<el-row :gutter="20" justify="start">
 						<el-col :span="24">
 							<el-form-item label="收款金额">
-								<el-input type="text" v-model="formData1.amount" placeholder="请输入"></el-input>
+								<el-input type="text" style="width: 30%" v-model="formData1.price" placeholder="请输入"></el-input>
+								<span style="color: #FF8F47;margin-left: 10px">注:操作【提交】时,系统方可记录收款信息</span>
 							</el-form-item>
 						</el-col>
 						<el-col :span="24">
@@ -321,22 +328,26 @@
 				</el-form>
 			</div>
 		</el-card>
-		<el-card class="box-card" v-if="formData.saleType == 2">
+		<el-card class="box-card" v-if="formData.salesType == '工程' && formType != 0">
 			<div slot="header" class="clearfix">
 				<span>收款记录</span>
 			</div>
 			<div class="table">
 				<el-table :data="collectionList" element-loading-text="Loading" border fit highlight-current-row stripe>
-					<el-table-column prop="" label="收款结果" align="center"></el-table-column>
-					<el-table-column prop="" label="收款金额" align="center"></el-table-column>
+					<el-table-column prop="status" label="收款结果" align="center">
+						<template slot-scope="scope">
+							{{scope.row.status == 'NO'?'未付款':scope.row.status == 'WAIT'?'部分付款':scope.row.status == 'OK'?'已完成':''}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="price" label="收款金额" align="center"></el-table-column>
 					<el-table-column prop="" align="center" label="收款凭证" >
 						<template slot-scope="scope">
-							<el-image src=""></el-image>
+							<el-image :src="scope.row.urlPrc" fit="scale-down"></el-image>
 						</template>
 					</el-table-column>
-					<el-table-column prop="" label="备注" align="center"></el-table-column>
-					<el-table-column prop="" align="center" label="收款人" ></el-table-column>
-					<el-table-column prop="" align="center" label="收款时间" ></el-table-column>
+					<el-table-column prop="remark" label="备注" align="center"></el-table-column>
+					<el-table-column prop="updateBy" align="center" label="收款人" ></el-table-column>
+					<el-table-column prop="updateTime" align="center" label="收款时间" ></el-table-column>
 				</el-table>
 			</div>
 		</el-card>
@@ -371,7 +382,7 @@
 	import { lbsAmapRegion } from '@/api/common.js'
 	import geographicalPosi from '@/components/geographicalPosi/index.vue'
 	import ImageUpload from '@/components/file-upload'
-	import { getWorker, getCategory, getGoods, getDetail, add, edit, confirm, submit, getCode } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
+	import { getWorker, getCategory, getGoods, getDetail, add, edit, confirm, submit, getCode, getProject, getProjectCollectionList } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
 	export default {
 		components: {geographicalPosi,ImageUpload},
 		props: ['id','title','formType'],
@@ -381,6 +392,8 @@
 				websitList: [],
 				workerList: [],
 				mainList: [],
+				projectList: [],
+				collectionList: [],
 				isPay: false,
 				payCodeUrl: '',
 				formData: {
@@ -404,7 +417,7 @@
 					remark: '',
 					totalAmount: '',
 					buyPeople: 'WORKER',
-					saleType: '1',
+					salesType: '零售',
 					province: '',
 					provinceId: '',
 					city: '',
@@ -416,9 +429,11 @@
 					address: '',
 					lat: '',
 					lng: '',
+					project: {},
+					orderEnginBaseId: '',
 				},
 				formData1: {
-					amount: '',
+					price: '',
 					remark: '',
 					fileUrl: []
 				},
@@ -456,34 +471,7 @@
 						{ required: true, message: '请输入客户姓名', trigger: 'blur' }
 					],
 				},
-				rules1: {},
-				pickerOptions: {
-					shortcuts: [{
-						text: '最近一周',
-						onClick(picker) {
-						const end = new Date();
-						const start = new Date();
-						start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-						picker.$emit('pick', [start, end]);
-						}
-					}, {
-						text: '最近一个月',
-						onClick(picker) {
-						const end = new Date();
-						const start = new Date();
-						start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-						picker.$emit('pick', [start, end]);
-						}
-					}, {
-						text: '最近三个月',
-						onClick(picker) {
-						const end = new Date();
-						const start = new Date();
-						start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-						picker.$emit('pick', [start, end]);
-						}
-					}]
-				},
+				rules1: {}
 			};
 		},
 		computed: {},
@@ -493,6 +481,7 @@
 			}
 			this.getinitlbslist()
 			this.getWebsit()
+			this.getProject()
 		},
 		methods: {
 			// 返回
@@ -504,10 +493,14 @@
 				getDetail({salesId: this.id}).then( async res => {
 					Object.assign(this.formData, res.data, {
 						websit: {websitId: res.data.websitId,name: res.data.websitName},
-						worker: {nickName: res.data.workerName,userId: res.data.workerId}	  
+						worker: {nickName: res.data.workerName,userId: res.data.workerId},
+						project: {id: res.data.orderEnginBaseId,projectName: res.data.projectName,projectNo: res.data.projectNo,manger: res.data.manger,mobile: res.data.mobile,startTime: res.data.startTime,endTime: res.data.endTime,province: res.data.province,provinceId: res.data.provinceId,city: res.data.city,cityId: res.data.cityId,area: res.data.area,areaId: res.data.areaId,street: res.data.street,streetId: res.data.streetId,address: res.data.address,lat: res.data.lat,lng: res.data.lng}
 					})
 					this.getWorker()
 					this.getCategory(res.data.websitId)
+					if(res.data.salesType == '工程'){
+						this.getProjectCollectionList(res.data.orderEnginBaseId)
+					}
 					this.formData.remark = res.data.remark
 					for(var item of res.data.items){
 						item.parentCategory = {categoryId: item.parentCategoryId,categoryName: item.parentCategoryName, items: [{categoryId: item.goodsCategoryId,categoryName: item.goodsCategoryName}]}
@@ -535,6 +528,20 @@
 					this.mainList = res.data
 				})
 			},
+			getProject(){
+				getProject({
+					pageNum: 1,
+					pageSize: -1,
+					params:[]
+				}).then(res => {
+					this.projectList = res.data.records
+				})
+			},
+			getProjectCollectionList(orderEnginBaseId){
+				getProjectCollectionList({orderEnginBaseId}).then(res => {
+					this.collectionList = res.data
+				})
+			},
 			async getGoods(categoryId,goodsName,type){
 				const that = this
 				if(type == 1){
@@ -647,7 +654,10 @@
 					type: 'warning'
 				}).then(() => {
 					submit({
-						salesId: this.formData.salesId
+						salesId: this.formData.salesId,
+						price: this.formData1.price,
+						urlPrc: this.formData1.fileUrl[0].url,
+						remark: this.formData1.remark
 					}).then(res => {
 						if(res.code == 200){
 							this.$message.success('提交成功!')
@@ -737,7 +747,9 @@
 								identity: this.formData.identity,
 								workerMobile: this.formData.workerMobile,
 								buyPeople: this.formData.buyPeople,
-								items: this.dataList
+								items: this.dataList,
+								orderEnginBaseId: this.formData.orderEnginBaseId,
+								salesType: this.formData.salesType
 							}).then(res => {
 								if(res.code == 200){
 									this.$message.success('提交成功!')
@@ -758,7 +770,9 @@
 								identity: this.formData.identity,
 								workerMobile: this.formData.workerMobile,
 								buyPeople: this.formData.buyPeople,
-								items: this.dataList
+								items: this.dataList,
+								orderEnginBaseId: this.formData.orderEnginBaseId,
+								salesType: this.formData.salesType
 							}).then(res => {
 								if(res.code == 200){
 									this.dataList = []

+ 2 - 0
src/views/auxiliaryFittings/settleAccountManagement/settleAccountOfflinePay/index.vue

@@ -163,6 +163,8 @@ export default {
   		this.$nextTick(() => {
 			if(this.tabIndex == 1){
 				this.status = ''
+				this.workerId = ''
+				this.websitId = ''
 			}
   			this.tabIndexShow = true
   		})

+ 2 - 0
src/views/auxiliaryFittings/settleAccountManagement/settleAccountWeixinPay/index.vue

@@ -210,6 +210,8 @@ export default {
 			this.$nextTick(() => {
 				if(this.tabIndex == 1){
 					this.status = ''
+					this.workerId = ''
+					this.websitId = ''
 				}
 				this.tabIndexShow = true
 			})