فهرست منبع

Merge branch 'feature/pyh_工程调整'

pengyh 1 سال پیش
والد
کامیت
b2bb53aa4e
24فایلهای تغییر یافته به همراه2885 افزوده شده و 233 حذف شده
  1. 16 0
      src/api/auxiliaryFittings/auxiliarySalesOrder.js
  2. 46 0
      src/api/auxiliaryFittings/projectAuxiliaryManage.js
  3. 18 0
      src/api/engineeringMaintenance/basicData.js
  4. 402 0
      src/views/auxiliaryFittings/projectAttachmentManage/detail.vue
  5. 168 0
      src/views/auxiliaryFittings/projectAttachmentManage/index.vue
  6. 402 0
      src/views/auxiliaryFittings/projectAuxiliaryManage/detail.vue
  7. 167 0
      src/views/auxiliaryFittings/projectAuxiliaryManage/index.vue
  8. 8 2
      src/views/auxiliaryFittings/salesManagement/attachmentNewReturn/index.vue
  9. 17 5
      src/views/auxiliaryFittings/salesManagement/attachmentSalesOrder/index.vue
  10. 17 5
      src/views/auxiliaryFittings/salesManagement/auxiliarySalesOrder/index.vue
  11. 8 2
      src/views/auxiliaryFittings/salesManagement/auxiliarySalesReturnOrder/index.vue
  12. 189 11
      src/views/auxiliaryFittings/salesManagement/components/attachmentNewReturnDetail.vue
  13. 98 5
      src/views/auxiliaryFittings/salesManagement/components/attachmentOldReturnDetail.vue
  14. 337 41
      src/views/auxiliaryFittings/salesManagement/components/attachmentSalesOrderDetail.vue
  15. 345 48
      src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesOrderDetail.vue
  16. 198 15
      src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesReturnOrderDetail.vue
  17. 2 0
      src/views/auxiliaryFittings/settleAccountManagement/settleAccountOfflinePay/index.vue
  18. 2 0
      src/views/auxiliaryFittings/settleAccountManagement/settleAccountWeixinPay/index.vue
  19. 256 6
      src/views/engineeringMaintenance/basicData/detail.vue
  20. 7 1
      src/views/mallManagement/order/order_list/index.vue
  21. 27 0
      src/views/setting/organizationManagement/tenantDetails/index.vue
  22. 143 89
      src/views/userManagement/distributorManagement/index.vue
  23. 2 2
      src/views/workOrder/basicConfiguration/settlementStandard/components/repair.vue
  24. 10 1
      src/views/workOrder/settleAccountsManagement/settleAccountsOrder/index.vue

+ 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
+  })
 }

+ 46 - 0
src/api/auxiliaryFittings/projectAuxiliaryManage.js

@@ -0,0 +1,46 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+// 获取列表
+export function listPage(data) {
+  return request({
+    url: `/order/engin/manger/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+//导出
+export function pageExport(data, name) {
+  return postBlob({
+    url: '/order/engin/manger/list/export',
+    data,
+    name
+  })
+}
+
+// 详情
+export function getDetail(params) {
+  return request({
+    url: `/order/engin/manger/detail`,
+    method: 'post',
+    params
+  })
+}
+
+// 确定
+export function givePrice(params) {
+  return request({
+    url: `/order/engin/manger/givePrice`,
+    method: 'post',
+    params
+  })
+}
+
+// 收款详情
+export function getPriceDetail(params) {
+  return request({
+    url: `/order/engin/manger/detailPrice`,
+    method: 'post',
+    params
+  })
+}

+ 18 - 0
src/api/engineeringMaintenance/basicData.js

@@ -34,4 +34,22 @@ export function getDetail(params) {
     method: 'post',
     params
   })
+}
+
+// 获取辅材收费标准
+export function getAuxiliaryList(data) {
+  return request({
+    url: `/material/norm/list`,
+    method: 'post',
+    data
+  })
+}
+
+// 获取配件资料
+export function getAttachmentList(data) {
+  return request({
+    url: `/websit/goods/p/list`,
+    method: 'post',
+    data
+  })
 }

+ 402 - 0
src/views/auxiliaryFittings/projectAttachmentManage/detail.vue

@@ -0,0 +1,402 @@
+<template>
+	<div class="s-page">
+		<el-page-header @back="goBack" :content="title"></el-page-header>
+		<el-divider></el-divider>
+		<el-card class="box-card">
+			<div slot="header" class="clearfix">
+				<span>项目信息</span>
+			</div>
+			<div class="mymain-container">
+				<el-form ref="formData" :rules="rules" :model="formData" label-width="110px" size="small" label-position="left">
+					<el-row :gutter="20" justify="start">
+						<el-col :span="12">
+							<el-form-item label="所属商户" :required="true" >
+								<el-input type="text" :value="companyName" disabled></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<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="工程编号" :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="负责人" :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="联系电话" :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="项目时间" :required="true">
+								<el-date-picker
+									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="项目地址" :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-col>
+									<el-col :span="5" style="margin-right: 12px;">
+										<el-input type="text" v-model="formData.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-col>
+									<el-col :span="8">
+										<el-input type="text" v-model="formData.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.address" disabled 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>
+						<el-col :span="24">
+							<el-form-item label="项目说明">
+								<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">
+			<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="收款金额" 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="收款凭证" prop="fileUrl">
+								<ImageUpload :fileList="formData1.fileUrl" :limit="1" />
+							</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">
+			<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" v-if="scope.row.urlPrc">
+							<el-image style="width: 80px;" :src="scope.row.urlPrc" fit="scale-down" :preview-src-list="[scope.row.urlPrc]"></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 size="small" type="primary"  @click="confirm()">确定</el-button>
+				<el-button size="small" type="info" @click="goBack">返回</el-button>
+			</div>
+		</div>
+	</div>
+</template>
+
+<script>
+	import ImageUpload from '@/components/file-upload'
+	import { lbsAmapRegion } from '@/api/common.js'
+	import geographicalPosi from '@/components/geographicalPosi/index.vue'
+	import { getDetail, givePrice, getPriceDetail } from "@/api/auxiliaryFittings/projectAuxiliaryManage";
+	export default {
+		components: {geographicalPosi,ImageUpload},
+		props: ['id','title','formType'],
+		data() {
+			return {
+				dataList: [],
+				provinceList: [],
+				cityList: [],
+				areaList: [],
+				streetList: [],
+				collectionList: [],
+				detail: {},
+				formData: {
+					projectName: ''
+				},
+				formData1: {
+					price: '',
+					remark: '',
+					fileUrl: []
+				},
+				companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
+				rules: {
+					websitId: [
+						{ required: true, message: '请选择网点', trigger: 'change' }
+					],
+					workerName: [
+						{ required: true, message: '请输入客户姓名', trigger: 'blur' }
+					],
+				},
+				rules1: {
+					price: [
+						{ required: true, message: '请输入收款金额', trigger: 'blur' },
+						{ pattern:/^[1-9]\d*(\.\d+)?$|^0\.[1-9]\d*$/, message: '请输入大于0的数字', trigger: 'blur' }
+					],
+					fileUrl: [
+						{ required: true, message: '请上传收款凭证', trigger: 'change' }
+					],
+				},
+			};
+		},
+		computed: {},
+		created() {
+			if(this.id){
+				this.getDetail()
+			}
+			this.getinitlbslist()
+		},
+		methods: {
+			// 返回
+			goBack() {
+				this.$emit('back');
+			},
+			async getDetail(){
+				const that = this
+				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() {
+			  // 初始化请求省市区街道下拉选项数据
+			  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
+				    })
+				  })
+				})
+			},
+			confirm(){
+				this.$refs.formData1.validate((valid, invalidFields, errLabels) => {
+					if (valid) {
+						this.$confirm(`请确定是否确认提交收款信息, 是否继续?`, '提示', {
+							confirmButtonText: '确定',
+							cancelButtonText: '取消',
+							type: 'warning'
+						}).then(() => {
+							givePrice({
+								goodsType: this.detail.goodsType,
+								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>
+
+<style scoped="scoped" lang="scss">
+	.s-page {
+		padding: 20px;
+		background-color: #ffffff;
+	}
+	.page-footer {
+		height: 70px;
+	}
+	
+	.footer {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		z-index: 1;
+		width: 100%;
+		background: #fff;
+		padding: 15px 40px;
+		box-sizing: border-box;
+		transition: all 0.28s;
+		text-align: right;
+		box-shadow: 0 2px 5px 0 rgb(0 0 0 / 50%), 0 2px 5px 0 rgb(0 0 0 / 10%);
+	
+		&.hideSidebar {
+			margin-left: 54px;
+			width: calc(100vw - 54px);
+		}
+	
+		&.openSidebar {
+			margin-left: 210px;
+			width: calc(100vw - 210px);
+		}
+	
+		.tips {
+			font-size: 12px;
+			color: red;
+			margin-top: 10px;
+		}
+	}
+</style>

+ 168 - 0
src/views/auxiliaryFittings/projectAttachmentManage/index.vue

@@ -0,0 +1,168 @@
+<template>
+	<div class="page">
+		<template-page v-if="isShowTab && !formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
+			: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="status" size="mini" @change="changeType">
+					<el-radio-button label="">全部</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>
+		</template-page>
+		<div class="detail" v-if="formDialog">
+			<detail :id="id" @back="backList" :formType="formDialogType" title="工程配件收款详情"></detail>
+		</div>
+	</div>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import detail from './detail.vue'
+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 { listPage, pageExport } from "@/api/auxiliaryFittings/projectAuxiliaryManage";
+import operation_mixin from '@/components/template/operation_mixin.js'
+export default {
+	components: { TemplatePage, ImageUpload, detail },
+	mixins: [import_mixin, operation_mixin],
+	data() {
+		return {
+			// 表格属性
+			tableAttributes: {
+				// 启用勾选列
+				selectColumn: true
+			},
+			// 表格事件
+			tableEvents: {
+				'selection-change': this.selectionChange
+			},
+			// 勾选选中行
+			recordSelected: [],
+			/** 表单变量 */
+			formDialogType: 0,
+			formDialogTitles: ["新增", "编辑", "详情"],
+			formDialog: false,
+			id: '',
+			status: 'NO',
+			isShowTab: true
+		}
+	},
+	computed: {
+		// 事件组合
+		optionsEvensGroup() {
+			return [
+				// [
+				// 	[
+				// 		this.optionsEvensAuth("add", {
+				// 			click: this.addData
+				// 		}),
+				// 	]
+				// ]
+			]
+		},
+		// 更多参数
+		moreParameters() {
+			return []
+		},
+		formItems() { }
+	},
+	created(){},
+	watch: {
+		status(){
+			this.isShowTab = false
+			this.$nextTick(()=>{
+				this.isShowTab = true
+			})
+		}
+	},
+	methods: {
+		// 切换状态
+		changeType(val) {
+			this.$refs?.pageRef?.refreshList()
+		},
+		backList() {
+			this.id = ''
+			this.formDialog = false;
+			this.$refs?.pageRef?.refreshList()
+		},
+		// 列表请求函数
+		getList(p, cb) {
+			try {
+				var pam = JSON.parse(JSON.stringify(p))
+				pam.params.push({ "param": "a.goods_type", "compare": "=", "value": 'P' }, { 'param': 'a.status', "compare": "=", "value": this.status })
+				cb && cb(pam)
+				return listPage(pam)
+			} catch (error) {
+				console.log(error)
+			}
+		},
+		// 列表导出函数
+		exportList: pageExport,
+		// 表格列解析渲染数据更改
+		columnParsing(item, defaultData) {
+			return defaultData
+		},
+		// 监听勾选变化
+		selectionChange(data) {
+			this.recordSelected = data
+		},
+
+		operation() {
+			return this.operationBtn({
+				detail: {
+					click: ({ row, index, column }) => {
+						this.id = row.websitSalesManagerId
+						this.formDialogType = 2
+						this.openForm()
+					}
+				},
+				sellOrderDetail: {
+					click: ({ row, index, column }) => {
+						this.$router.push({
+							name: 'attachmentSalesOrder',
+							params: {
+								pageName: row.orderEnginBaseId,
+								pageType: '-',
+								pageCode: row.orderEnginBaseId,
+							},
+						})
+					}
+				},
+				returnGoodsDetail: {
+					name:"返还单明细",
+					click: ({ row, index, column }) => {
+						this.$router.push({
+							name: 'attachmentNewReturn',
+							params: {
+								pageName: row.orderEnginBaseId,
+								pageType: '-',
+								pageCode: row.orderEnginBaseId,
+							},
+						})
+					}
+				},
+			})
+		},
+
+		openForm() {
+			this.formDialog = true;
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+.page {
+	height: 100%;
+}
+
+.tab {
+	padding: 20px 20px 0 20px;
+}
+</style>

+ 402 - 0
src/views/auxiliaryFittings/projectAuxiliaryManage/detail.vue

@@ -0,0 +1,402 @@
+<template>
+	<div class="s-page">
+		<el-page-header @back="goBack" :content="title"></el-page-header>
+		<el-divider></el-divider>
+		<el-card class="box-card">
+			<div slot="header" class="clearfix">
+				<span>项目信息</span>
+			</div>
+			<div class="mymain-container">
+				<el-form ref="formData" :rules="rules" :model="formData" label-width="110px" size="small" label-position="left">
+					<el-row :gutter="20" justify="start">
+						<el-col :span="12">
+							<el-form-item label="所属商户" :required="true" >
+								<el-input type="text" :value="companyName" disabled></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<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="工程编号" :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="负责人" :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="联系电话" :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="项目时间" :required="true">
+								<el-date-picker
+									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="项目地址" :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-col>
+									<el-col :span="5" style="margin-right: 12px;">
+										<el-input type="text" v-model="formData.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-col>
+									<el-col :span="8">
+										<el-input type="text" v-model="formData.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.address" disabled 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>
+						<el-col :span="24">
+							<el-form-item label="项目说明">
+								<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">
+			<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="收款金额" 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="收款凭证" prop="fileUrl">
+								<ImageUpload :fileList="formData1.fileUrl" :limit="1" />
+							</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">
+			<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" v-if="scope.row.urlPrc">
+							<el-image style="width: 80px;" :src="scope.row.urlPrc" fit="scale-down" :preview-src-list="[scope.row.urlPrc]"></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 size="small" type="primary"  @click="confirm()">确定</el-button>
+				<el-button size="small" type="info" @click="goBack">返回</el-button>
+			</div>
+		</div>
+	</div>
+</template>
+
+<script>
+	import ImageUpload from '@/components/file-upload'
+	import { lbsAmapRegion } from '@/api/common.js'
+	import geographicalPosi from '@/components/geographicalPosi/index.vue'
+	import { getDetail, givePrice, getPriceDetail } from "@/api/auxiliaryFittings/projectAuxiliaryManage";
+	export default {
+		components: {geographicalPosi,ImageUpload},
+		props: ['id','title','formType'],
+		data() {
+			return {
+				dataList: [],
+				provinceList: [],
+				cityList: [],
+				areaList: [],
+				streetList: [],
+				collectionList: [],
+				detail: {},
+				formData: {
+					projectName: ''
+				},
+				formData1: {
+					price: '',
+					remark: '',
+					fileUrl: []
+				},
+				companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
+				rules: {
+					websitId: [
+						{ required: true, message: '请选择网点', trigger: 'change' }
+					],
+					workerName: [
+						{ required: true, message: '请输入客户姓名', trigger: 'blur' }
+					],
+				},
+				rules1: {
+					price: [
+						{ required: true, message: '请输入收款金额', trigger: 'blur' },
+						{ pattern:/^[1-9]\d*(\.\d+)?$|^0\.[1-9]\d*$/, message: '请输入大于0的数字', trigger: 'blur' }
+					],
+					fileUrl: [
+						{ required: true, message: '请上传收款凭证', trigger: 'change' }
+					],
+				},
+			};
+		},
+		computed: {},
+		created() {
+			if(this.id){
+				this.getDetail()
+			}
+			this.getinitlbslist()
+		},
+		methods: {
+			// 返回
+			goBack() {
+				this.$emit('back');
+			},
+			async getDetail(){
+				const that = this
+				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() {
+			  // 初始化请求省市区街道下拉选项数据
+			  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
+				    })
+				  })
+				})
+			},
+			confirm(){
+				this.$refs.formData1.validate((valid, invalidFields, errLabels) => {
+					if (valid) {
+						this.$confirm(`请确定是否确认提交收款信息, 是否继续?`, '提示', {
+							confirmButtonText: '确定',
+							cancelButtonText: '取消',
+							type: 'warning'
+						}).then(() => {
+							givePrice({
+								goodsType: this.detail.goodsType,
+								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>
+
+<style scoped="scoped" lang="scss">
+	.s-page {
+		padding: 20px;
+		background-color: #ffffff;
+	}
+	.page-footer {
+		height: 70px;
+	}
+	
+	.footer {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		z-index: 1;
+		width: 100%;
+		background: #fff;
+		padding: 15px 40px;
+		box-sizing: border-box;
+		transition: all 0.28s;
+		text-align: right;
+		box-shadow: 0 2px 5px 0 rgb(0 0 0 / 50%), 0 2px 5px 0 rgb(0 0 0 / 10%);
+	
+		&.hideSidebar {
+			margin-left: 54px;
+			width: calc(100vw - 54px);
+		}
+	
+		&.openSidebar {
+			margin-left: 210px;
+			width: calc(100vw - 210px);
+		}
+	
+		.tips {
+			font-size: 12px;
+			color: red;
+			margin-top: 10px;
+		}
+	}
+</style>

+ 167 - 0
src/views/auxiliaryFittings/projectAuxiliaryManage/index.vue

@@ -0,0 +1,167 @@
+<template>
+	<div class="page">
+		<template-page v-if="isShowTab && !formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
+			: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="status" size="mini" @change="changeType">
+					<el-radio-button label="">全部</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>
+		</template-page>
+		<div class="detail" v-if="formDialog">
+			<detail :id="id" @back="backList" :formType="formDialogType" title="工程辅材收款详情"></detail>
+		</div>
+	</div>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import detail from './detail.vue'
+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 { listPage, pageExport } from "@/api/auxiliaryFittings/projectAuxiliaryManage";
+import operation_mixin from '@/components/template/operation_mixin.js'
+export default {
+	components: { TemplatePage, ImageUpload, detail },
+	mixins: [import_mixin, operation_mixin],
+	data() {
+		return {
+			// 表格属性
+			tableAttributes: {
+				// 启用勾选列
+				selectColumn: true
+			},
+			// 表格事件
+			tableEvents: {
+				'selection-change': this.selectionChange
+			},
+			// 勾选选中行
+			recordSelected: [],
+			/** 表单变量 */
+			formDialogType: 0,
+			formDialogTitles: ["新增", "编辑", "详情"],
+			formDialog: false,
+			id: '',
+			status: 'NO',
+			isShowTab: true
+		}
+	},
+	computed: {
+		// 事件组合
+		optionsEvensGroup() {
+			return [
+				// [
+				// 	[
+				// 		this.optionsEvensAuth("add", {
+				// 			click: this.addData
+				// 		}),
+				// 	]
+				// ]
+			]
+		},
+		// 更多参数
+		moreParameters() {
+			return []
+		},
+		formItems() { }
+	},
+	created(){},
+	watch: {
+		status(){
+			this.isShowTab = false
+			this.$nextTick(()=>{
+				this.isShowTab = true
+			})
+		}
+	},
+	methods: {
+		// 切换状态
+		changeType(val) {
+			this.$refs?.pageRef?.refreshList()
+		},
+		backList() {
+			this.id = ''
+			this.formDialog = false;
+			this.$refs?.pageRef?.refreshList()
+		},
+		// 列表请求函数
+		getList(p, cb) {
+			try {
+				var pam = JSON.parse(JSON.stringify(p))
+				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) {
+				console.log(error)
+			}
+		},
+		// 列表导出函数
+		exportList: pageExport,
+		// 表格列解析渲染数据更改
+		columnParsing(item, defaultData) {
+			return defaultData
+		},
+		// 监听勾选变化
+		selectionChange(data) {
+			this.recordSelected = data
+		},
+
+		operation() {
+			return this.operationBtn({
+				detail: {
+					click: ({ row, index, column }) => {
+						this.id = row.websitSalesManagerId
+						this.formDialogType = 2
+						this.openForm()
+					}
+				},
+				sellOrderDetail: {
+					click: ({ row, index, column }) => {
+						this.$router.push({
+							name: 'auxiliarySalesOrder',
+							params: {
+								pageName: row.orderEnginBaseId,
+								pageType: '-',
+								pageCode: row.orderEnginBaseId,
+							},
+						})
+					}
+				},
+				returnGoodsDetail: {
+					click: ({ row, index, column }) => {
+						this.$router.push({
+							name: 'auxiliarySalesReturnOrder',
+							params: {
+								pageName: row.orderEnginBaseId,
+								pageType: '-',
+								pageCode: row.orderEnginBaseId,
+							},
+						})
+					}
+				},
+			})
+		},
+
+		openForm() {
+			this.formDialog = true;
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+.page {
+	height: 100%;
+}
+
+.tab {
+	padding: 20px 20px 0 20px;
+}
+</style>

+ 8 - 2
src/views/auxiliaryFittings/salesManagement/attachmentNewReturn/index.vue

@@ -52,7 +52,8 @@ export default {
 			formDialog: false,
 			id: '',
 			flag: '',
-			isShowTab: true
+			isShowTab: true,
+			orderEnginBaseId: ''
 		}
 	},
 	computed: {
@@ -74,6 +75,11 @@ export default {
 		},
 		formItems() { }
 	},
+	created(){
+		if(this.pageCode){
+			this.orderEnginBaseId = this.pageCode
+		}
+	},
 	watch: {
 		flag(){
 			this.isShowTab = false
@@ -96,7 +102,7 @@ export default {
 		getList(p, cb) {
 			try {
 				var pam = JSON.parse(JSON.stringify(p))
-				pam.params.push({ "param": "a.goods_type", "compare": "=", "value": 'P' }, { "param": "a.type", "compare": "=", "value": 'NEW' }, { 'param': 'a.flag', "compare": "=", "value": this.flag })
+				pam.params.push({ "param": "a.goods_type", "compare": "=", "value": 'P' }, { "param": "a.type", "compare": "=", "value": 'NEW' }, { 'param': 'a.flag', "compare": "=", "value": this.flag }, { 'param': 'a.order_engin_base_id', "compare": "=", "value": this.orderEnginBaseId })
 				cb && cb(pam)
 				return listPageV2(pam)
 			} catch (error) {

+ 17 - 5
src/views/auxiliaryFittings/salesManagement/attachmentSalesOrder/index.vue

@@ -59,7 +59,9 @@ export default {
 			id: '',
 			flag: '',
 			websitList: [],
-			isShowTab: true
+			isShowTab: true,
+			orderEnginBaseId: '',
+			payQrcode: JSON.parse(localStorage.getItem('greemall_user')).payQrcode,
 		}
 	},
 	computed: {
@@ -100,6 +102,9 @@ export default {
 			this.formDialogType = 2
 			this.openForm()
 		}
+		if(this.pageCode){
+			this.orderEnginBaseId = this.pageCode
+		}
 	},
 	watch: {
 		flag(){
@@ -123,7 +128,7 @@ export default {
 		getList(p, cb) {
 			try {
 				var pam = JSON.parse(JSON.stringify(p))
-				pam.params.push({ "param": "a.goods_type", "compare": "=", "value": 'P' }, { 'param': 'a.flag', "compare": "=", "value": this.flag })
+				pam.params.push({ "param": "a.goods_type", "compare": "=", "value": 'P' }, { 'param': 'a.flag', "compare": "=", "value": this.flag }, { 'param': 'a.order_engin_base_id', "compare": "=", "value": this.orderEnginBaseId })
 				cb && cb(pam)
 				return listPageV2(pam)
 			} catch (error) {
@@ -304,11 +309,11 @@ export default {
 		  </div>
 		  <div style="display: flex;justify-content: space-between;font-size: 16px;margin: 10px 0;">
 		  	<div>客户: ${data.workerName}</div>
-		  	<div>摘要: ${data.payType == 'CASH' ? '现金' : '微信'}</div>
+		  	<div>摘要: ${data.payType == 'CASH' ? '现金' : data.payType == 'WECHAT' ? '微信': '工程支付'}</div>
 		  </div>
 		  <div style="display: flex;justify-content: space-between;font-size: 16px;margin-bottom: 10px;">
 		  	<div>联系电话: ${data.workerMobile}</div>
-		  	<div>收货地址: </div>
+		  	<div>收货地址: ${data.province?(data.province + data.city + data.area + data.street + data.address):''}</div>
 			<div style="width: 28%;"></div>
 		  </div>
 	      <div >
@@ -351,7 +356,14 @@ export default {
 			<div>业务员: </div>
 			<div>签收人: </div>
 		  </div>
-		  ${websitHtml}
+		  <div style="display: flex;justify-content: space-between;">
+		  	<div>
+		  		${websitHtml}
+		  	</div>
+		  	${data.payType == 'CASH'?`<div style="">
+		  		<img style="width: 80px;height: 80px;" src="${this.payQrcode}"/>
+		  	</div>`:''}
+		  </div>
 	      <div style="margin:100px 0 0 0">
 	        <div></div>
 	      </div>

+ 17 - 5
src/views/auxiliaryFittings/salesManagement/auxiliarySalesOrder/index.vue

@@ -59,7 +59,9 @@ export default {
 			id: '',
 			flag: '',
 			websitList: [],
-			isShowTab: true
+			isShowTab: true,
+			orderEnginBaseId: '',
+			payQrcode: JSON.parse(localStorage.getItem('greemall_user')).payQrcode,
 		}
 	},
 	computed: {
@@ -100,6 +102,9 @@ export default {
 			this.formDialogType = 2
 			this.openForm()
 		}
+		if(this.pageCode){
+			this.orderEnginBaseId = this.pageCode
+		}
 	},
 	watch: {
 		flag(){
@@ -123,7 +128,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.flag', "compare": "=", "value": this.flag }, { 'param': 'a.order_engin_base_id', "compare": "=", "value": this.orderEnginBaseId })
 				cb && cb(pam)
 				return listPageV2(pam)
 			} catch (error) {
@@ -302,11 +307,11 @@ export default {
 		  </div>
 		  <div style="display: flex;justify-content: space-between;font-size: 16px;margin: 10px 0;">
 		  	<div>客户: ${data.workerName}</div>
-		  	<div>摘要: ${data.payType == 'CASH' ? '现金' : '微信'}</div>
+		  	<div>摘要: ${data.payType == 'CASH' ? '现金' : data.payType == 'WECHAT' ? '微信': '工程支付'}</div>
 		  </div>
 		  <div style="display: flex;font-size: 16px;margin-bottom: 10px;">
 		  	<div>联系电话: ${data.workerMobile}</div>
-		  	<div style="margin-left: 50px;">收货地址: </div>
+		  	<div style="margin-left: 50px;">收货地址: ${data.province?(data.province + data.city + data.area + data.street + data.address):''}</div>
 		  </div>
 	      <div >
 	        <table border=".5" cellspacing="0" width="856"
@@ -348,7 +353,14 @@ export default {
 			<div>业务员: </div>
 			<div>签收人: </div>
 		  </div>
-		  ${websitHtml}
+		  <div style="display: flex;justify-content: space-between;">
+			<div>
+				${websitHtml}
+			</div>
+			${data.payType == 'CASH'?`<div style="">
+				<img style="width: 80px;height: 80px;" src="${this.payQrcode}"/>
+			</div>`:''}
+		  </div>
 	      <div style="margin:100px 0 0 0">
 	        <div></div>
 	      </div>

+ 8 - 2
src/views/auxiliaryFittings/salesManagement/auxiliarySalesReturnOrder/index.vue

@@ -52,7 +52,8 @@ export default {
 			formDialog: false,
 			id: '',
 			retState: '',
-			isShowTab: true
+			isShowTab: true,
+			orderEnginBaseId: ''
 		}
 	},
 	computed: {
@@ -74,6 +75,11 @@ export default {
 		},
 		formItems() { }
 	},
+	created(){
+		if(this.pageCode){
+			this.orderEnginBaseId = this.pageCode
+		}
+	},
 	watch: {
 		retState(){
 			this.isShowTab = false
@@ -96,7 +102,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.ret_state', "compare": "=", "value": this.retState })
+				pam.params.push({ "param": "a.goods_type", "compare": "=", "value": 'M' }, { 'param': 'a.ret_state', "compare": "=", "value": this.retState }, { 'param': 'a.order_engin_base_id', "compare": "=", "value": this.orderEnginBaseId })
 				cb && cb(pam)
 				return listPageV2(pam)
 			} catch (error) {

+ 189 - 11
src/views/auxiliaryFittings/salesManagement/components/attachmentNewReturnDetail.vue

@@ -74,20 +74,100 @@
 							</el-col>
 						</template>
 						<el-col :span="8">
+							<el-form-item label="销售类型" :required="true" style="padding-bottom: 1px;">
+								<el-radio-group v-model="formData.salesType">
+								    <el-radio disabled label="零售">零售</el-radio>
+								    <el-radio disabled label="工程">工程</el-radio>
+								</el-radio-group>
+							</el-form-item>
+						</el-col>
+						<el-col :span="8">
 							<el-form-item label="销售订单号" :required="true">
 								<el-input type="text" v-model="formData.salesId" :disabled="formType == 2" @change="getDetail" placeholder="请输入销售订单号"></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="8">
+						<el-col :span="5">
 							<el-form-item label="销售金额">
 								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="6">
+						<el-col :span="5">
 							<el-form-item label="时间">
 								<el-input type="text" :value="formData.payTime" disabled></el-input>
 							</el-form-item>
 						</el-col>
+						<template v-if="formData.salesType == '工程'">
+							<el-col :span="6">
+								<el-form-item label="工程名称" :required="true">
+									<el-input type="text" :value="formData.projectName" disabled></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.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.manger" 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.mobile" 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.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-row>
+										<el-col :span="5" style="margin-right: 12px;">
+											<el-input type="text" v-model="formData.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-col>
+										<el-col :span="5" style="margin-right: 12px;">
+											<el-input type="text" v-model="formData.area" disabled placeholder="请选择区"></el-input>
+										</el-col>
+										<el-col :span="8">
+											<el-input type="text" v-model="formData.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.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>
@@ -150,10 +230,10 @@
 					<el-table-column prop="goods.goodsCode" align="center" label="配件编码"></el-table-column>
 					<el-table-column prop="goods.brandRelaName" align="center" label="适用品牌"></el-table-column>
 					<el-table-column prop="goods.productRelaName" align="center" label="适用产品大类"></el-table-column>
-					<el-table-column prop="goods.price" align="center" label="销售价格"></el-table-column>
+					<el-table-column prop="price" align="center" label="销售价格"></el-table-column>
 					<el-table-column prop="" align="center" label="销售金额" >
-						<template slot-scope="scope" v-if="scope.row.newRefundQty && scope.row.goods && scope.row.goods.price">
-							{{(scope.row.goods.price * 100) * scope.row.newRefundQty / 100}}
+						<template slot-scope="scope" v-if="scope.row.newRefundQty && scope.row.price">
+							{{(scope.row.price * 100) * scope.row.newRefundQty / 100}}
 						</template>
 					</el-table-column>
 					<!-- <el-table-column prop="goods.qty" align="center" label="库存数量"></el-table-column> -->
@@ -188,11 +268,13 @@
 
 <script>
 	import { getWebsit } from "@/api/customerManagement";
+	import { lbsAmapRegion } from '@/api/common.js'
+	import geographicalPosi from '@/components/geographicalPosi/index.vue'
 	import ImageUpload from '@/components/file-upload'
 	import { getWorker, getCategory, getGoods, getDetail } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
 	import { add, edit, getNewDetail } from "@/api/auxiliaryFittings/attachmentNewReturn";
 	export default {
-		components: { ImageUpload },
+		components: { ImageUpload, geographicalPosi },
 		props: ['id','title','formType'],
 		data() {
 			return {
@@ -220,7 +302,20 @@
 					identity: '',
 					workerMobile: '',
 					totalAmount: '',
-					remark: ''
+					remark: '',
+					salesType: '零售',
+					province: '',
+					provinceId: '',
+					city: '',
+					cityId: '',
+					area: '',
+					areaId: '',
+					street: '',
+					streetId: '',
+					address: '',
+					lat: '',
+					lng: '',
+					orderEnginBaseId: '',
 				},
 				isEdit: 0,
 				companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
@@ -248,6 +343,7 @@
 				this.getNewDetail()
 			}
 			this.getWebsit()
+			this.getinitlbslist()
 		},
 		methods: {
 			// 返回
@@ -304,14 +400,14 @@
 				const that = this
 				if(type == 1){
 					return new Promise((resolve, reject) => {
-						getGoods({websitId: this.formData.websitId,type: 'P',goodsName: goodsName}).then(res => {
+						getGoods({websitId: this.formData.websitId,type: 'P',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
 							resolve({
 								data: res.data[0]
 							})
 						})
 					})
 				}else{
-					getGoods({websitId: this.formData.websitId,type: 'P'}).then(res => {
+					getGoods({websitId: this.formData.websitId,type: 'P',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
 						that.dataList[that.isEdit].goodsList = res.data
 						console.log(this.dataList)
 					})
@@ -342,6 +438,9 @@
 				this.dataList[this.isEdit].price = e.price
 				this.dataList[this.isEdit].goodsCode = e. goodsCode
 				this.dataList[this.isEdit].qty = e.qty
+				this.dataList[this.isEdit].itemSourceType = e.itemSourceType
+				this.dataList[this.isEdit].itemSourceId = e.itemSourceId
+				this.dataList[this.isEdit].normType = e.normType
 			},
 			add(){
 				if(this.dataList.length != 0){this.isEdit += 1}
@@ -359,7 +458,10 @@
 					saleAmount: '',
 					newRefundQty: 1,
 					qty: '',
-					goodsType: 'P'
+					goodsType: 'P',
+					itemSourceType: '',
+					itemSourceId: '',
+					normType: ''
 				})
 			},
 			confirm(){
@@ -473,7 +575,83 @@
 						}
 					}
 				})
-			}
+			},
+			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>

+ 98 - 5
src/views/auxiliaryFittings/salesManagement/components/attachmentOldReturnDetail.vue

@@ -74,20 +74,100 @@
 							</el-col>
 						</template>
 						<el-col :span="8">
+							<el-form-item label="销售类型" :required="true" style="padding-bottom: 1px;">
+								<el-radio-group v-model="formData.salesType">
+								    <el-radio disabled label="零售">零售</el-radio>
+								    <el-radio disabled label="工程">工程</el-radio>
+								</el-radio-group>
+							</el-form-item>
+						</el-col>
+						<el-col :span="8">
 							<el-form-item label="销售订单号" :required="true">
 								<el-input type="text" v-model="formData.salesId" :disabled="formType == 2" @change="getDetail" placeholder="请输入销售订单号"></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="8">
+						<el-col :span="5">
 							<el-form-item label="销售金额">
 								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="6">
+						<el-col :span="5">
 							<el-form-item label="时间">
 								<el-input type="text" :value="formData.payTime" disabled></el-input>
 							</el-form-item>
 						</el-col>
+						<template v-if="formData.salesType == '工程'">
+							<el-col :span="6">
+								<el-form-item label="工程名称" :required="true">
+									<el-input type="text" :value="formData.projectName" disabled></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.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.manger" 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.mobile" 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.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-row>
+										<el-col :span="5" style="margin-right: 12px;">
+											<el-input type="text" v-model="formData.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-col>
+										<el-col :span="5" style="margin-right: 12px;">
+											<el-input type="text" v-model="formData.area" disabled placeholder="请选择区"></el-input>
+										</el-col>
+										<el-col :span="8">
+											<el-input type="text" v-model="formData.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.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>
@@ -283,7 +363,20 @@
 					workerMobile: '',
 					remark: '',
 					totalAmount: '',
-					orderUseType: 'INSIDE'
+					orderUseType: 'INSIDE',
+					salesType: '零售',
+					province: '',
+					provinceId: '',
+					city: '',
+					cityId: '',
+					area: '',
+					areaId: '',
+					street: '',
+					streetId: '',
+					address: '',
+					lat: '',
+					lng: '',
+					orderEnginBaseId: '',
 				},
 				isEdit: 0,
 				companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
@@ -369,14 +462,14 @@
 				const that = this
 				if(type == 1){
 					return new Promise((resolve, reject) => {
-						getGoods({websitId: this.formData.websitId,type: 'P',goodsName: goodsName}).then(res => {
+						getGoods({websitId: this.formData.websitId,type: 'P',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
 							resolve({
 								data: res.data[0]
 							})
 						})
 					})
 				}else{
-					getGoods({websitId: this.formData.websitId,type: 'P'}).then(res => {
+					getGoods({websitId: this.formData.websitId,type: 'P',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
 						that.dataList[that.isEdit].goodsList = res.data
 						console.log(this.dataList)
 					})

+ 337 - 41
src/views/auxiliaryFittings/salesManagement/components/attachmentSalesOrderDetail.vue

@@ -39,8 +39,8 @@
 						<el-col :span="8">
 							<el-form-item label="购买方" :required="true" style="padding-bottom: 1px;">
 								<el-radio-group v-model="formData.buyPeople" @change="formData.workerName = '';formData.workerMobile=''">
-								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="WORKER">内部师傅</el-radio>
-								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="CUSTOMER">客户</el-radio>
+								    <el-radio :disabled="(formData.flag != 'SAVE' && formType!=0) || formData.salesType == '工程'" label="WORKER">内部师傅</el-radio>
+								    <el-radio :disabled="(formData.flag != 'SAVE' && formType!=0) || formData.salesType == '工程'" label="CUSTOMER">客户</el-radio>
 								</el-radio-group>
 							</el-form-item>
 						</el-col>
@@ -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,125 @@
 								  </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">
+									<div style="display: flex;align-items: center;">
+										<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>
+										<i class="el-icon-circle-plus" @click="toAddProject" style="transform: scale(1.5);color: #1989FA;margin-left: 10px;cursor: pointer;"></i>
+									</div>
+								</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.manger" 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.mobile" 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>
@@ -167,10 +263,14 @@
 					<el-table-column prop="goods.goodsCode" align="center" label="配件编码"></el-table-column>
 					<el-table-column prop="goods.brandRelaName" align="center" label="适用品牌"></el-table-column>
 					<el-table-column prop="goods.productRelaName" align="center" label="适用产品大类"></el-table-column>
-					<el-table-column prop="goods.price" align="center" label="销售价格"></el-table-column>
+					<el-table-column prop="" align="center" label="销售价格">
+						<template slot-scope="scope">
+							<el-input type="number" v-model="scope.row.price" :disabled="isEdit != scope.$index || formType == 2" placeholder="请输入"></el-input>
+						</template>
+					</el-table-column>
 					<el-table-column prop="goods.saleAmount" align="center" label="销售金额" >
-						<template slot-scope="scope" v-if="scope.row.salesQty && scope.row.goods && scope.row.goods.price">
-							{{(scope.row.goods.price * 100) * scope.row.salesQty / 100}}
+						<template slot-scope="scope" v-if="scope.row.salesQty && scope.row.price">
+							{{(scope.row.price * 100) * scope.row.salesQty / 100}}
 						</template>
 					</el-table-column>
 					<el-table-column prop="goods.qty" align="center" label="库存数量"></el-table-column>
@@ -183,6 +283,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" v-if="scope.row.urlPrc">
+							<el-image style="width: 80px;" :src="scope.row.urlPrc" fit="scale-down" :preview-src-list="[scope.row.urlPrc]"></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 +361,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 +398,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 +459,9 @@
 			if(this.id){
 				this.getDetail()
 			}
+			this.getinitlbslist()
 			this.getWebsit()
+			this.getProject()
 		},
 		methods: {
 			// 返回
@@ -292,9 +473,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,18 +498,37 @@
 				this.formData.websitName = e.name
 				this.getWorker()
 			},
+			toAddProject(){
+				this.$router.push({
+					name: 'basicEngineeringData'
+				})
+			},
+			getProject(){
+				getProject({
+					pageNum: 1,
+					pageSize: -1,
+					params:[]
+				}).then(res => {
+					this.projectList = res.data.records
+				})
+			},
+			getProjectCollectionList(orderEnginBaseId){
+				getProjectCollectionList({orderEnginBaseId,goodsType: 'P'}).then(res => {
+					this.collectionList = res.data
+				})
+			},
 			async getGoods(goodsName,type){
 				const that = this
 				if(type == 1){
 					return new Promise((resolve, reject) => {
-						getGoods({websitId: this.formData.websitId,type: 'P',goodsName: goodsName}).then(res => {
+						getGoods({websitId: this.formData.websitId,type: 'P',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
 							resolve({
 								data: res.data[0]
 							})
 						})
 					})
 				}else{
-					getGoods({websitId: this.formData.websitId,type: 'P'}).then(res => {
+					getGoods({websitId: this.formData.websitId,type: 'P',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
 						that.dataList[that.isEdit].goodsList = res.data
 						console.log(this.dataList)
 					})
@@ -355,10 +559,13 @@
 				this.dataList[this.isEdit].price = e.price
 				this.dataList[this.isEdit].goodsCode = e. goodsCode
 				this.dataList[this.isEdit].qty = e.qty
+				this.dataList[this.isEdit].itemSourceType = e.itemSourceType
+				this.dataList[this.isEdit].itemSourceId = e.itemSourceId
+				this.dataList[this.isEdit].normType = e.normType
 			},
 			add(){
-				if(this.dataList.length != 0){this.isEdit += 1}
-				this.dataList.push({
+				if(this.dataList.length != 0){this.isEdit = 0}
+				this.dataList.unshift({
 					goodsList: [],
 					goods: {},
 					goodsId: '',
@@ -371,12 +578,15 @@
 					saleAmount: '',
 					salesQty: 1,
 					qty: '',
-					goodsType: 'P'
+					goodsType: 'P',
+					itemSourceType: '',
+					itemSourceId: '',
+					normType: ''
 				})
 				this.getGoods()
 			},
 			del(index){
-				if(this.dataList.length == 1){this.isEdit == 0}else{this.isEdit -= 1}
+				if(index <= 1){this.isEdit == 0}else{this.isEdit -= 1}
 				this.dataList.splice(index,1)
 			},
 			submit(){
@@ -386,7 +596,10 @@
 					type: 'warning'
 				}).then(() => {
 					submit({
-						salesId: this.formData.salesId
+						salesId: this.formData.salesId,
+						price: this.formData1.price,
+						urlPrc: this.formData1.fileUrl.length> 0 ?this.formData1.fileUrl[0].url: '',
+						remark: this.formData1.remark
 					}).then(res => {
 						if(res.code == 200){
 							this.$message.success('提交成功!')
@@ -476,7 +689,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 +712,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 +725,86 @@
 						}
 					}
 				})
-			}
+			},
+			changeSale(){
+				this.formData.buyPeople = 'CUSTOMER'
+			},
+			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>

+ 345 - 48
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesOrderDetail.vue

@@ -25,7 +25,7 @@
 							</el-form-item>
 						</el-col>
 						<el-col :span="8">
-							<el-form-item label="网点名称" prop="websitId" :required="true">
+							<el-form-item label="网点名称" prop="websitId">
 								<el-select v-model="formData.websit" :disabled="formData.flag != 'SAVE' && formType!=0" value-key="websitId" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
 								    <el-option
 								      v-for="item in websitList"
@@ -39,26 +39,26 @@
 						<el-col :span="8">
 							<el-form-item label="购买方" :required="true" style="padding-bottom: 1px;">
 								<el-radio-group v-model="formData.buyPeople" @change="formData.workerName = '';formData.workerMobile=''">
-								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="WORKER">内部师傅</el-radio>
-								    <el-radio :disabled="formData.flag != 'SAVE' && formType!=0" label="CUSTOMER">客户</el-radio>
+								    <el-radio :disabled="(formData.flag != 'SAVE' && formType!=0) || formData.salesType == '工程'" label="WORKER">内部师傅</el-radio>
+								    <el-radio :disabled="(formData.flag != 'SAVE' && formType!=0) || formData.salesType == '工程'" label="CUSTOMER">客户</el-radio>
 								</el-radio-group>
 							</el-form-item>
 						</el-col>
 						<template v-if="formData.buyPeople == 'CUSTOMER'">
 							<el-col :span="8">
-								<el-form-item label="客户姓名" prop="workerName" :required="true">
+								<el-form-item label="客户姓名" prop="workerName">
 									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.workerName" placeholder="请输入"></el-input>
 								</el-form-item>
 							</el-col>
 							<el-col :span="8">
-								<el-form-item label="客户联系电话" prop="workerMobile" :required="true">
+								<el-form-item label="客户联系电话" prop="workerMobile">
 									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.workerMobile" placeholder="请输入"></el-input>
 								</el-form-item>
 							</el-col>
 						</template>
 						<template v-else>
 							<el-col :span="8">
-								<el-form-item label="师傅姓名" prop="worker" :required="true">
+								<el-form-item label="师傅姓名" prop="worker">
 									<el-select v-model="formData.worker" :disabled="formData.flag != 'SAVE' && formType!=0" value-key="nickName" @focus="()=>{
 										if(!this.formData.websitId){return this.$message.warning('请先选择网点名称!');}
 									}" filterable @change="changeWorker" @blur="workerBlur" placeholder="请选择" style="width: 100%;">
@@ -77,37 +77,25 @@
 								</el-form-item>
 							</el-col> -->
 							<el-col :span="8">
-								<el-form-item label="师傅联系电话" prop="workerMobile" :required="true">
+								<el-form-item label="师傅联系电话" prop="workerMobile">
 									<el-input type="text" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.workerMobile" placeholder="请输入"></el-input>
 								</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>
 							</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-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="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,125 @@
 								  </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="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.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">
+									<div style="display: flex;align-items: center;">
+										<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>
+										<i class="el-icon-circle-plus" @click="toAddProject" style="transform: scale(1.5);color: #1989FA;margin-left: 10px;cursor: pointer;"></i>
+									</div>
+								</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.manger" 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.mobile" 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" :disabled="formData.flag != 'SAVE' && formType!=0" v-model="formData.remark" placeholder="请输入"></el-input>
@@ -192,10 +288,14 @@
 					</el-table-column>
 					<el-table-column prop="goods.goodsCode" align="center" label="商品代码"></el-table-column>
 					<el-table-column prop="goods.goodsSpecification" align="center" label="规格型号"></el-table-column>
-					<el-table-column prop="goods.price" align="center" label="销售价格"></el-table-column>
+					<el-table-column prop="" align="center" label="销售价格">
+						<template slot-scope="scope">
+							<el-input type="number" v-model="scope.row.price" :disabled="isEdit != scope.$index || formType == 2" placeholder="请输入"></el-input>
+						</template>
+					</el-table-column>
 					<el-table-column prop="" align="center" label="销售金额" >
-						<template slot-scope="scope" v-if="scope.row.salesQty && scope.row.goods && scope.row.goods.price">
-							{{((scope.row.goods.price * 100) * scope.row.salesQty / 100).toFixed(2)}}
+						<template slot-scope="scope" v-if="scope.row.salesQty && scope.row.price">
+							{{((scope.row.price * 100) * scope.row.salesQty / 100).toFixed(2)}}
 						</template>
 					</el-table-column>
 					<el-table-column prop="goods.qty" align="center" label="库存数量"></el-table-column>
@@ -208,6 +308,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" v-if="scope.row.urlPrc">
+							<el-image style="width: 80px;" :src="scope.row.urlPrc" fit="scale-down" :preview-src-list="[scope.row.urlPrc]"></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>
@@ -236,8 +386,12 @@
 <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 {
@@ -245,6 +399,8 @@
 				websitList: [],
 				workerList: [],
 				mainList: [],
+				projectList: [],
+				collectionList: [],
 				isPay: false,
 				payCodeUrl: '',
 				formData: {
@@ -267,8 +423,31 @@
 					payType: '',
 					remark: '',
 					totalAmount: '',
-					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,
 				is_submit: true,
 				timer: '',
@@ -298,7 +477,8 @@
 					workerName: [
 						{ required: true, message: '请输入客户姓名', trigger: 'blur' }
 					],
-				}
+				},
+				rules1: {}
 			};
 		},
 		computed: {},
@@ -306,7 +486,9 @@
 			if(this.id){
 				this.getDetail()
 			}
+			this.getinitlbslist()
 			this.getWebsit()
+			this.getProject()
 		},
 		methods: {
 			// 返回
@@ -318,10 +500,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}]}
@@ -349,18 +535,37 @@
 					this.mainList = res.data
 				})
 			},
+			toAddProject(){
+				this.$router.push({
+					name: 'basicEngineeringData'
+				})
+			},
+			getProject(){
+				getProject({
+					pageNum: 1,
+					pageSize: -1,
+					params:[]
+				}).then(res => {
+					this.projectList = res.data.records
+				})
+			},
+			getProjectCollectionList(orderEnginBaseId){
+				getProjectCollectionList({orderEnginBaseId,goodsType: 'M'}).then(res => {
+					this.collectionList = res.data
+				})
+			},
 			async getGoods(categoryId,goodsName,type){
 				const that = this
 				if(type == 1){
 					return new Promise((resolve, reject) => {
-						getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',goodsName: goodsName}).then(res => {
+						getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
 							resolve({
 								data: res.data[0]
 							})
 						})
 					})
 				}else{
-					getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M'}).then(res => {
+					getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
 						that.dataList[that.isEdit].goodsList = res.data
 					})
 				}
@@ -413,7 +618,7 @@
 				this.dataList[this.isEdit].qty = '',
 				this.dataList[this.isEdit].goodsCategoryId = e.categoryId
 				this.dataList[this.isEdit].goodsCategoryName = e.categoryName
-				getGoods({websitId: this.formData.websitId,categoryId: e.categoryId,type: 'M'}).then(res => {
+				getGoods({websitId: this.formData.websitId,categoryId: e.categoryId,type: 'M',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
 					this.dataList[this.isEdit].goodsList = res.data
 				})
 			},
@@ -426,10 +631,13 @@
 				this.dataList[this.isEdit].price = e.price
 				this.dataList[this.isEdit].goodsCode = e. goodsCode
 				this.dataList[this.isEdit].qty = e.qty
+				this.dataList[this.isEdit].itemSourceType = e.itemSourceType
+				this.dataList[this.isEdit].itemSourceId = e.itemSourceId
+				this.dataList[this.isEdit].normType = e.normType
 			},
 			add(){
-				if(this.dataList.length != 0){this.isEdit += 1}
-				this.dataList.push({
+				if(this.dataList.length != 0){this.isEdit = 0}
+				this.dataList.unshift({
 					goodsList: [],
 					parentCategory: {},
 					parentCategoryId: '',
@@ -447,11 +655,14 @@
 					saleAmount: '',
 					salesQty: 1,
 					qty: '',
-					goodsType: 'M'
+					goodsType: 'M',
+					itemSourceType: '',
+					itemSourceId: '',
+					normType: ''
 				})
 			},
 			del(index){
-				if(this.dataList.length == 1){this.isEdit == 0}else{this.isEdit -= 1}
+				if(index <= 1){this.isEdit == 0}else{this.isEdit -= 1}
 				this.dataList.splice(index,1)
 			},
 			submit(){
@@ -461,7 +672,10 @@
 					type: 'warning'
 				}).then(() => {
 					submit({
-						salesId: this.formData.salesId
+						salesId: this.formData.salesId,
+						price: this.formData1.price,
+						urlPrc: this.formData1.fileUrl.length> 0 ?this.formData1.fileUrl[0].url: '',
+						remark: this.formData1.remark
 					}).then(res => {
 						if(res.code == 200){
 							this.$message.success('提交成功!')
@@ -551,7 +765,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('提交成功!')
@@ -572,7 +788,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 = []
@@ -583,7 +801,86 @@
 						}
 					}
 				})
-			}
+			},
+			changeSale(){
+				this.formData.buyPeople = 'CUSTOMER'
+			},
+			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>

+ 198 - 15
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesReturnOrderDetail.vue

@@ -74,20 +74,100 @@
 							</el-col>
 						</template>
 						<el-col :span="8">
+							<el-form-item label="销售类型" :required="true" style="padding-bottom: 1px;">
+								<el-radio-group v-model="formData.salesType">
+								    <el-radio disabled label="零售">零售</el-radio>
+								    <el-radio disabled label="工程">工程</el-radio>
+								</el-radio-group>
+							</el-form-item>
+						</el-col>
+						<el-col :span="8">
 							<el-form-item label="销售订单号" :required="true">
 								<el-input type="text" v-model="formData.salesId" @change="getDetail" placeholder="请输入销售订单号"></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="8">
+						<el-col :span="5">
 							<el-form-item label="销售金额">
 								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="6">
+						<el-col :span="5">
 							<el-form-item label="时间">
 								<el-input type="text" :value="formData.payTime" disabled></el-input>
 							</el-form-item>
 						</el-col>
+						<template v-if="formData.salesType == '工程'">
+							<el-col :span="6">
+								<el-form-item label="工程名称" :required="true">
+									<el-input type="text" :value="formData.projectName" disabled></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.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.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.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.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-row>
+										<el-col :span="5" style="margin-right: 12px;">
+											<el-input type="text" v-model="formData.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-col>
+										<el-col :span="5" style="margin-right: 12px;">
+											<el-input type="text" v-model="formData.area" disabled placeholder="请选择区"></el-input>
+										</el-col>
+										<el-col :span="8">
+											<el-input type="text" v-model="formData.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.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>
@@ -174,17 +254,17 @@
 						</template>
 					</el-table-column>
 					<el-table-column prop="goods.saleAmount" align="center" label="退货金额" >
-						<template slot-scope="scope" v-if="scope.row.retQty && scope.row.goods && scope.row.goods.price">
-							{{(scope.row.goods.price * 100) * scope.row.retQty / 100}}
+						<template slot-scope="scope" v-if="scope.row.retQty && scope.row.price">
+							{{(scope.row.price * 100) * scope.row.retQty / 100}}
 						</template>
 					</el-table-column>
 					<el-table-column prop="goods.goodsCode" align="center" label="商品代码"></el-table-column>
 					<el-table-column prop="goods.goodsSpecification" align="center" label="规格型号"></el-table-column>
 					<el-table-column prop="salesQty" align="center" label="销售数量"></el-table-column>
-					<el-table-column prop="goods.price" align="center" label="销售价格"></el-table-column>
-					<el-table-column prop="goods.saleAmount" align="center" label="销售金额" >
-						<template slot-scope="scope" v-if="scope.row.salesQty && scope.row.goods && scope.row.goods.price">
-							{{(scope.row.goods.price * 100) * (scope.row.salesQty*100) / 10000}}
+					<el-table-column prop="price" align="center" label="销售价格"></el-table-column>
+					<el-table-column prop="saleAmount" align="center" label="销售金额" >
+						<template slot-scope="scope" v-if="scope.row.salesQty && scope.row.price">
+							{{(scope.row.price * 100) * (scope.row.salesQty*100) / 10000}}
 						</template>
 					</el-table-column>
 					<el-table-column label="操作" align="right" width="140">
@@ -212,11 +292,13 @@
 
 <script>
 	import { getWebsit } from "@/api/customerManagement";
+	import { lbsAmapRegion } from '@/api/common.js'
+	import geographicalPosi from '@/components/geographicalPosi/index.vue'
 	import ImageUpload from '@/components/file-upload'
 	import { getWorker, getCategory, getGoods, getDetail } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
 	import { add, edit, getReturnDetail } from "@/api/auxiliaryFittings/auxiliarySalesReturnOrder";
 	export default {
-		components: { ImageUpload },
+		components: { ImageUpload, geographicalPosi },
 		props: ['id','title','formType'],
 		data() {
 			return {
@@ -224,6 +306,7 @@
 				websitList: [],
 				workerList: [],
 				mainList: [],
+				projectList: [],
 				isPay: false,
 				payCodeUrl: '',
 				salesDetail: {},
@@ -245,8 +328,25 @@
 					identity: '',
 					workerMobile: '',
 					remark: '',
-					totalAmount: ''
+					totalAmount: '',
+					salesType: '零售',
+					province: '',
+					provinceId: '',
+					city: '',
+					cityId: '',
+					area: '',
+					areaId: '',
+					street: '',
+					streetId: '',
+					address: '',
+					lat: '',
+					lng: '',
+					orderEnginBaseId: '',
 				},
+				provinceList: [],
+				cityList: [],
+				areaList: [],
+				streetList: [],
 				isEdit: 0,
 				companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
 				rules: {
@@ -273,6 +373,7 @@
 				this.getReturnDetail()
 			}
 			this.getWebsit()
+			this.getinitlbslist()
 		},
 		methods: {
 			// 返回
@@ -340,14 +441,14 @@
 				const that = this
 				if(type == 1){
 					return new Promise((resolve, reject) => {
-						getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',goodsName: goodsName}).then(res => {
+						getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',goodsName: goodsName,orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
 							resolve({
 								data: res.data[0]
 							})
 						})
 					})
 				}else{
-					getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M'}).then(res => {
+					getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
 						that.dataList[that.isEdit].goodsList = res.data
 					})
 				}
@@ -400,7 +501,7 @@
 				this.dataList[this.isEdit].qty = '',
 				this.dataList[this.isEdit].goodsCategoryId = e.categoryId
 				this.dataList[this.isEdit].goodsCategoryName = e.categoryName
-				getGoods({websitId: this.formData.websitId,categoryId: e.categoryId,type: 'M'}).then(res => {
+				getGoods({websitId: this.formData.websitId,categoryId: e.categoryId,type: 'M',orderEnginBaseId: this.formData.orderEnginBaseId,saleType: this.formData.salesType}).then(res => {
 					this.dataList[this.isEdit].goodsList = res.data
 				})
 			},
@@ -413,6 +514,9 @@
 				this.dataList[this.isEdit].price = e.price
 				this.dataList[this.isEdit].goodsCode = e. goodsCode
 				this.dataList[this.isEdit].qty = e.qty
+				this.dataList[this.isEdit].itemSourceType = e.itemSourceType
+				this.dataList[this.isEdit].itemSourceId = e.itemSourceId
+				this.dataList[this.isEdit].normType = e.normType
 			},
 			add(){
 				if(this.dataList.length != 0){this.isEdit += 1}
@@ -434,7 +538,10 @@
 					saleAmount: '',
 					retQty: 1,
 					qty: '',
-					goodsType: 'M'
+					goodsType: 'M',
+					itemSourceType: '',
+					itemSourceId: '',
+					normType: ''
 				})
 			},
 			confirm(){
@@ -502,7 +609,83 @@
 						}
 					}
 				})
-			}
+			},
+			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>

+ 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
 			})

+ 256 - 6
src/views/engineeringMaintenance/basicData/detail.vue

@@ -122,6 +122,8 @@
 				    <el-tab-pane label="项目设备" name="1"></el-tab-pane>
 				    <el-tab-pane label="项目人员" name="2"></el-tab-pane>
 				    <el-tab-pane label="服务网点" name="3"></el-tab-pane>
+					<el-tab-pane label="辅材配置" name="4"></el-tab-pane>
+					<el-tab-pane label="配件配置" name="5"></el-tab-pane>
 				</el-tabs>
 				<el-button size="small" v-if="formType!=2" type="primary" @click="add()">新增</el-button>
 				<div class="table">
@@ -332,6 +334,170 @@
 							</el-table-column>
 						</el-table>
 					</el-form>
+					<!-- 辅材配置 -->
+					<el-form ref="formData4" :model="formData4">
+						<el-table v-show="typeIndex == 4" :data="formData4.itemList" element-loading-text="Loading" border fit highlight-current-row stripe>
+							<el-table-column label="大类" align="center">
+								<template slot-scope="scope">
+									<el-form-item>
+										{{scope.row.parentCategoryName}}
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column label="小类" align="center">
+								<template slot-scope="scope">
+									<el-form-item>
+										{{scope.row.goodsCategoryName}}
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column label="*辅材名称" align="center">
+								<template slot-scope="scope">
+									<el-form-item :prop="'itemList.' + scope.$index + '.auxiliary'" :rules="[{ required: true, message: `请选择辅材名称`, trigger: 'blur' }]">
+										<el-select v-model="scope.row.auxiliary" @change="(e)=>{
+												scope.row.goodsId = e.normId
+												scope.row.goodsName = e.normName
+												scope.row.goodsCategoryName = e.categoryName
+												scope.row.goodsCategoryId = e.categoryId
+												scope.row.parentCategoryName = e.parentCategoryName
+												scope.row.parentCategoryId = e.parentCategoryId
+												scope.row.goodsCode = e.normCode
+												scope.row.goodsSpecification = e.specification
+												scope.row.goodsStockUnit = e.unit
+												scope.row.normType = e.normType
+												scope.row.normAmount = e.normAmount
+											}" :disabled="isEdit4 != scope.$index || formType == 2" value-key="normId" placeholder="请选择" style="width: 100%;">
+										    <el-option
+										      v-for="(item,ind) in auxiliaryList"
+										      :key="ind"
+										      :label="item.normName"
+										      :value="item">
+										    </el-option>
+										  </el-select>
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column prop="" align="center" label="商品代码">
+								<template slot-scope="scope">
+									<el-form-item>
+										{{scope.row.goodsCode}}
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column prop="" align="center" label="规格型号">
+								<template slot-scope="scope">
+									<el-form-item>
+										{{scope.row.goodsSpecification}}
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column align="center" label="单位">
+								<template slot-scope="scope">
+									<el-form-item>
+										{{scope.row.goodsStockUnit}}
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column prop="" align="center" label="收费类型" >
+								<template slot-scope="scope">
+									<el-form-item>
+										{{scope.row.normType == 'M'?'配件物料':scope.row.normType == 'S'?'服务收费':''}}
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column prop="" align="center" label="*收费标准(元)">
+								<template slot-scope="scope">
+									<el-form-item :prop="'itemList.' + scope.$index + '.normAmount'"
+										:rules="[{ required: true, message: `请输入收费标准`, trigger: 'blur' }]">
+										<el-input type="number" oninput="if(value < 0) value=0" v-model="scope.row.normAmount" :disabled="isEdit4 != scope.$index || formType == 2" placeholder="请输入"></el-input>
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column label="操作" align="right" width="140">
+								<template slot-scope="scope" v-if="formType != 2">
+									<el-button size="mini" type="primary" v-if="scope.$index != isEdit4" @click="edit(4,scope.$index)">编辑</el-button>
+									<el-button size="mini" type="danger" @click="del(scope.$index)">删除</el-button>
+								</template>
+							</el-table-column>
+						</el-table>
+					</el-form>
+					<!-- 配件配置 -->
+					<el-form ref="formData5" :model="formData5">
+						<el-table v-show="typeIndex == 5" :data="formData5.itemList" element-loading-text="Loading" border fit highlight-current-row stripe>
+							<el-table-column label="*配件名称" align="center">
+								<template slot-scope="scope">
+									<el-form-item :prop="'itemList.' + scope.$index + '.attachment'" :rules="[{ required: true, message: `请选择辅材名称`, trigger: 'blur' }]">
+										<el-select v-model="scope.row.attachment" @change="(e)=>{
+												scope.row.goodsId = e.goodsId
+												scope.row.goodsName = e.goodsName
+												scope.row.goodsCode = e.goodsCode
+												scope.row.goodsStockUnit = e.goodsStockUnit
+												scope.row.normType = e.normType
+												scope.row.normAmount = e.normAmount
+												scope.row.brandRelaName = e.brandRelaName
+												scope.row.productRelaName = e.productRelaName
+											}" :disabled="isEdit5 != scope.$index || formType == 2" value-key="goodsId" placeholder="请选择" style="width: 100%;">
+										    <el-option
+										      v-for="(item,ind) in attachmentList"
+										      :key="ind"
+										      :label="item.goodsName"
+										      :value="item">
+										    </el-option>
+										  </el-select>
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column align="center" label="单位">
+								<template slot-scope="scope">
+									<el-form-item>
+										{{scope.row.goodsStockUnit}}
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column prop="" align="center" label="商品代码">
+								<template slot-scope="scope">
+									<el-form-item>
+										{{scope.row.goodsCode}}
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column prop="" align="center" label="收费类型" >
+								<template slot-scope="scope">
+									<el-form-item>
+										{{scope.row.normType == 'M'?'配件物料':scope.row.normType == 'S'?'服务收费':''}}
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column prop="" align="center" label="适用品牌">
+								<template slot-scope="scope">
+									<el-form-item>
+										{{scope.row.brandRelaName}}
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column prop="" align="center" label="适用产品大类">
+								<template slot-scope="scope">
+									<el-form-item>
+										{{scope.row.productRelaName}}
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column prop="" align="center" label="*收费标准(元)">
+								<template slot-scope="scope">
+									<el-form-item :prop="'itemList.' + scope.$index + '.normAmount'"
+										:rules="[{ required: true, message: `请输入收费标准`, trigger: 'blur' }]">
+										<el-input type="number" oninput="if(value < 0) value=0" v-model="scope.row.normAmount" :disabled="isEdit5 != scope.$index || formType == 2" placeholder="请输入"></el-input>
+									</el-form-item>
+								</template>
+							</el-table-column>
+							<el-table-column label="操作" align="right" width="140">
+								<template slot-scope="scope" v-if="formType != 2">
+									<el-button size="mini" type="primary" v-if="scope.$index != isEdit5" @click="edit(5,scope.$index)">编辑</el-button>
+									<el-button size="mini" type="danger" @click="del(scope.$index)">删除</el-button>
+								</template>
+							</el-table-column>
+						</el-table>
+					</el-form>
 				</div>
 			</el-card>
 			<div class="page-footer">
@@ -366,7 +532,7 @@
 	import geographicalPosi from '@/components/geographicalPosi/index.vue'
 	import { getMainList } from "@/api/workOrder/settlementStandardInstall";
 	import { getBrand } from '@/api/goods'
-	import { getDetail, save } from "@/api/engineeringMaintenance/basicData";
+	import { getDetail, getAuxiliaryList, getAttachmentList, save } from "@/api/engineeringMaintenance/basicData";
 	import request from '@/utils/request'
 	export default {
 		components: {geographicalPosi},
@@ -375,6 +541,8 @@
 			return {
 				tabIndex: 1,
 				typeIndex: '1',
+				auxiliaryList: [],
+				attachmentList: [],
 				orderTypeList: [],
 				websitData: [],
 				brandList: [],
@@ -417,9 +585,17 @@
 				formData3: {
 					websitList: [],
 				},
+				formData4: {
+					itemList: [],
+				},
+				formData5: {
+					itemList: [],
+				},
 				isEdit1: 0,
 				isEdit2: 0,
 				isEdit3: 0,
+				isEdit4: 0,
+				isEdit5: 0,
 				companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
 				rules: {
 					projectName: [
@@ -455,6 +631,8 @@
 				rules1: {},
 				rules2: {},
 				rules3: {},
+				rules4: {},
+				rules5: {},
 				isSave: true
 			};
 		},
@@ -509,7 +687,15 @@
 					})
 					this.formData2.byList = res.data.byList
 					this.formData3.websitList = res.data.websitList
-					
+					res.data.itemList.map(item=>{
+						if(item.goodsType == 'M'){
+							item.auxiliary = {normId: item.goodsId}
+							this.formData4.itemList.push(item)
+						}else{
+							item.attachment = {goodsId: item.goodsId}
+							this.formData5.itemList.push(item)
+						}
+					})
 					
 					console.log(this.formData1.productList,'123123123')
 				})
@@ -519,6 +705,8 @@
 				this.getBrandList()
 				this.getWebsit()
 				this.getMainList()
+				this.getAuxiliaryList()
+				this.getAttachmentList()
 				this.getinitlbslist()
 			},
 			getOrderType(){
@@ -546,6 +734,24 @@
 					this.mainList = res.data
 				})
 			},
+			getAuxiliaryList(){
+				getAuxiliaryList({
+					pageNum: 1,
+					pageSize: -1,
+					params: []
+				}).then(res => {
+					this.auxiliaryList = res.data.records
+				})
+			},
+			getAttachmentList(){
+				getAttachmentList({
+					pageNum: 1,
+					pageSize: -1,
+					params: [{param: "a.norm_type", compare: "=", value: "M"}]
+				}).then(res => {
+					this.attachmentList = res.data.records
+				})
+			},
 			getinitlbslist() {
 			  // 初始化请求省市区街道下拉选项数据
 			  lbsAmapRegion({ pid: 0 }).then(res => {
@@ -657,7 +863,7 @@
 			},
 			add(){
 				if(!this.preserveRuleForm('formData' + this.typeIndex)){return false}
-				let name = this.typeIndex == 1?'productList':this.typeIndex == 2?'byList':'websitList'
+				let name = this.typeIndex == 1?'productList':this.typeIndex == 2?'byList':this.typeIndex == 3?'websitList':'itemList'
 				this['isEdit' + this.typeIndex] = 0
 				// if(this['formData' + this.typeIndex][name].length != 0){this['isEdit' + this.typeIndex] += 1}
 				if(this.typeIndex == 1){
@@ -684,7 +890,7 @@
 						mobile: '',
 						feeExamine: ''
 					})
-				}else{
+				}else if(this.typeIndex == 3){
 					this['formData' + this.typeIndex][name].unshift({
 						websit: null,
 						websitId: '',
@@ -693,10 +899,39 @@
 						mobile: '',
 						address: ''
 					})
+				}else if(this.typeIndex == 4){
+					this['formData' + this.typeIndex][name].unshift({
+						auxiliary: null,
+						goodsId: '',
+						goodsName: '',
+						parentCategoryId: '',
+						parentCategoryName: '',
+						goodsCategoryId: '',
+						goodsCategoryName: '',
+						goodsCode: '',
+						goodsSpecification: '',
+						goodsStockUnit: '',
+						normType: '',
+						normAmount: '',
+						goodsType: 'M'
+					})
+				}else if(this.typeIndex == 5){
+					this['formData' + this.typeIndex][name].unshift({
+						attachment: null,
+						goodsId: '',
+						goodsName: '',
+						goodsCode: '',
+						goodsStockUnit: '',
+						normType: '',
+						normAmount: '',
+						brandRelaName: '',
+						productRelaName: '',
+						goodsType: 'P'
+					})
 				}
 			},
 			del(index){
-				let name = this.typeIndex == 1?'productList':this.typeIndex == 2?'byList':'websitList'
+				let name = this.typeIndex == 1?'productList':this.typeIndex == 2?'byList':this.typeIndex == 3?'websitList':'itemList'
 				this['formData' + this.typeIndex][name].splice(index,1)
 			},
 			confirm(){
@@ -715,6 +950,14 @@
 							that.typeIndex = '3'
 							return that.$message.error('请添加服务网点信息');
 						}
+						// if(that.formData4.itemList.length == 0){
+						// 	that.typeIndex = '4'
+						// 	return that.$message.error('请添加辅材配置信息');
+						// }
+						// if(that.formData5.itemList.length == 0){
+						// 	that.typeIndex = '5'
+						// 	return that.$message.error('请添加配件配置信息');
+						// }
 						if(!that.preserveRuleForm('formData1')){
 							return that.typeIndex = '1'
 						}
@@ -724,6 +967,12 @@
 						if(!that.preserveRuleForm('formData3')){
 							return that.typeIndex = '3'
 						}
+						// if(!that.preserveRuleForm('formData4')){
+						// 	return that.typeIndex = '4'
+						// }
+						// if(!that.preserveRuleForm('formData5')){
+						// 	return that.typeIndex = '5'
+						// }
 						this.save()
 					}
 				})
@@ -747,7 +996,8 @@
 					byList: this.formData2.byList,
 					productList: this.formData1.productList,
 					websitList: this.formData3.websitList,
-					typeList: data
+					typeList: data,
+					itemList: [...this.formData4.itemList,...this.formData5.itemList]
 				}
 				save(params).then(res => {
 					that.$message.success('保存成功!')

+ 7 - 1
src/views/mallManagement/order/order_list/index.vue

@@ -768,7 +768,8 @@ export default {
 		joinCode: JSON.parse(localStorage.getItem('greemall_user')).joinCode,
 		orderDetailId: '',
 
-    printOrderId: ''
+    printOrderId: '',
+		payQrcode: JSON.parse(localStorage.getItem('greemall_user')).payQrcode,
     }
   },
   computed: {
@@ -1666,6 +1667,11 @@ export default {
 			<div>业务员: ${data.saleName || ''}</div>
 			<div>签收人: </div>
 		  </div>
+				<div style="display: flex;justify-content: flex-end;">
+					${data.payTypeId == 'CASH'?`<div style="">
+						<img style="width: 80px;height: 80px;" src="${this.payQrcode}"/>
+					</div>`:''}
+				</div>
 	      <div style="margin:100px 0 0 0">
 	        <div></div>
 	      </div>

+ 27 - 0
src/views/setting/organizationManagement/tenantDetails/index.vue

@@ -300,6 +300,26 @@
             <span>建议尺寸:400*400</span>
           </div>
         </el-form-item>
+				<el-form-item label="收款二维码" prop="imgUrl">
+				  <div class="images">
+				    <div class="main-img">
+				      <div class="img" v-if="qrcode3_url" @mouseover="qrcode3_hover = true;" @mouseout="qrcode3_hover = false;">
+				        <el-image ref="qrcode3" :src="qrcode3_url" :preview-src-list="[qrcode3_url]"
+				          style="width: 120px; height: 120px" fit="contain"></el-image>
+				        <div class="mask" v-show="qrcode3_hover">
+				          <i class="el-icon-zoom-in" @click="previewImage('qrcode3')"></i>
+				          <i class="el-icon-upload2" @click="uploadImage('qrcode3')"></i>
+				        </div>
+				      </div>
+				      <div class="add" v-else @click="uploadImage('qrcode3')">
+				        <i class="el-icon-plus avatar-uploader-icon"></i>
+				      </div>
+				    </div>
+				  </div>
+				  <div class="tips">
+				    <span>建议尺寸:400*400</span>
+				  </div>
+				</el-form-item>
       </el-form>
     </div>
     <div class="page-footer">
@@ -414,6 +434,8 @@ export default {
       qrcode1_hover: false,
       qrcode2_url: '',
       qrcode2_hover: false,
+			qrcode3_url: '',
+			qrcode3_hover: false,
 
       resetFormVisible: false,
       resetForm: {
@@ -534,6 +556,7 @@ export default {
         this.img3_url = res.data.minLogo3;
         this.qrcode1_url = res.data.qrcode1;
         this.qrcode2_url = res.data.qrcode2;
+				this.qrcode3_url = res.data.payQrcode;
 
         this.step3Form.enterpriseId = res.data.corpId;
         this.step3Form.listSecret = res.data.secret2;
@@ -776,11 +799,15 @@ export default {
       if (!this.qrcode2_url) {
         return this.$errorMsg('请上传公众号图片');
       }
+			if (!this.qrcode3_url) {
+			  return this.$errorMsg('请上传收款二维码图片');
+			}
       this.formLoading = true;
       let params = {
         adminUserId: this.id,
         qrcode1: this.qrcode1_url,
         qrcode2: this.qrcode2_url,
+		payQrcode: this.qrcode3_url,
         companyWechatId: this.companyWechatId
       }
       editAccount(params).then(res => {

+ 143 - 89
src/views/userManagement/distributorManagement/index.vue

@@ -1,74 +1,82 @@
 <template>
-  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="280"
-    :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation()">
-	<!-- :exportList="exportList" -->
-	<div slot="moreSearch">
-	  <el-radio-group v-model="examineStatus" size="mini" @change="changeType">
-	  	<el-radio-button label="">全部</el-radio-button>
-	  	<el-radio-button label="WAIT">待审核</el-radio-button>
-	  	<el-radio-button label="OK">审核通过</el-radio-button>
-	  	<el-radio-button label="FAIL">驳回</el-radio-button>
-	  </el-radio-group>
-	  <br><br>
-	</div>
-    <el-dialog title="" width="800px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
-      :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
-      <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
-        <zj-form-module :title="formDialogTitles[formDialogType]" label-width="100px" :showPackUp="false"
-          :form-data="formData" :form-items="formItems">
-        </zj-form-module>
-      </zj-form-container>
-      <div slot="footer" class="dialog-footer">
-		<el-button v-if="formData.examineStatus == 'WAIT'" size="mini" type="primary" @click="audit('OK')">审核通过</el-button>
-		<el-button v-if="formData.examineStatus == 'WAIT'" size="mini" type="danger" @click="audit('FAIL')">审核驳回</el-button>
-		<el-button size="mini" @click="formCancel">取 消</el-button>
-      </div>
-    </el-dialog>
-	<!-- 入驻网点 -->
-	<el-dialog title="设为工程师" :visible.sync="dialogVisible" @close="websitList = []" width="50%" :close-on-click-modal="false" :modal-append-to-body="false">
-		<el-form ref="workerForm" :model="workerForm" label-width="110px" size="small" label-position="left">
-			<el-row :gutter="20">
-				<el-col :span="24">
-					<el-form-item label="入驻网点" :required="true">
-						<el-select v-model="workerForm.websitId" placeholder="请选择" style="width: 100%;">
-						    <el-option
-						      v-for="item in websitList"
-						      :key="item.websitId"
-						      :label="item.name"
-						      :value="item.websitId">
-						    </el-option>
-						  </el-select>
-					</el-form-item>
-				</el-col>
-				<el-col :span="24">
-					<el-form-item label="姓名" :required="true">
-						<el-input v-model="workerForm.name" placeholder="请输入"></el-input>
-					</el-form-item>
-				</el-col>
-				<el-col :span="24">
-					<el-form-item label="身份证号码" :required="true">
-						<el-input v-model="workerForm.idCard" placeholder="请输入"></el-input>
-					</el-form-item>
-				</el-col>
-				<el-col :span="24">
-					<el-form-item label="身份证正面照" :required="true">
-						<ImageUpload :fileList="fileList" :limit="1" :isEdit="true" />
-					</el-form-item>
-				</el-col>
-				<el-col :span="24" v-for="(item,index) in imgList" :key="index">
-					<el-form-item :label="item.dictValue" :required="true">
-						<ImageUpload :fileList="item.imgs" :limit="1" :isEdit="true" />
-					</el-form-item>
-				</el-col>
-			</el-row>
-		</el-form>
-		<div slot="footer" class="dialog-footer">
-			<el-button @click="dialogVisible = false">取 消</el-button>
-			<el-button type="primary" @click="memberInner()">确定</el-button>
-		</div>
-	</el-dialog>
-  </template-page>
+	<zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
+	  <template slot-scope="{activeKey, data}">
+			<div :style="{
+				width: '100%',
+				height: activeKey == 'list' ? '100%' : '0px',
+				overflow: 'hidden'
+			}">
+				<template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents" :operationColumnWidth="280"
+				  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
+				  :operation="operation()">
+					<!-- :exportList="exportList" -->
+					<div slot="moreSearch">
+					  <el-radio-group v-model="examineStatus" size="mini" @change="changeType">
+					  	<el-radio-button label="">全部</el-radio-button>
+					  	<el-radio-button label="WAIT">待审核</el-radio-button>
+					  	<el-radio-button label="OK">审核通过</el-radio-button>
+					  	<el-radio-button label="FAIL">驳回</el-radio-button>
+					  </el-radio-group>
+					  <br><br>
+					</div>
+				</template-page>
+			</div>
+		  <div v-if="~['examine','detail'].indexOf(activeKey)" style="box-sizing: border-box;padding: 16px;">
+		  	<zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
+		  	<zj-form-module title="" label-width="100px" :showPackUp="false"
+		  		:form-data="formData" :form-items="formItems">
+		  	</zj-form-module>
+		  	</zj-form-container>
+		  	<div slot="footer" class="dialog-footer">
+		  		<el-button v-if="formData.examineStatus == 'WAIT'" size="mini" type="primary" @click="audit('OK', data.removeTab)">审核通过</el-button>
+		  		<el-button v-if="formData.examineStatus == 'WAIT'" size="mini" type="danger" @click="audit('FAIL', data.removeTab)">审核驳回</el-button>
+		  		<el-button size="mini" @click="data.removeTab()">取 消</el-button>
+		  	</div>
+		  </div>
+		  <div v-if="~['worker'].indexOf(activeKey)" style="box-sizing: border-box;padding: 16px;">
+		  	<el-form ref="workerForm" :model="workerForm" label-width="110px" size="small" label-position="left">
+		  		<el-row :gutter="20">
+		  			<el-col :span="8">
+		  				<el-form-item label="入驻网点" :required="true">
+		  					<el-select v-model="workerForm.websitId" placeholder="请选择" style="width: 100%;">
+		  					    <el-option
+		  					      v-for="item in websitList"
+		  					      :key="item.websitId"
+		  					      :label="item.name"
+		  					      :value="item.websitId">
+		  					    </el-option>
+		  					  </el-select>
+		  				</el-form-item>
+		  			</el-col>
+		  			<el-col :span="8">
+		  				<el-form-item label="姓名" :required="true">
+		  					<el-input v-model="workerForm.name" placeholder="请输入"></el-input>
+		  				</el-form-item>
+		  			</el-col>
+		  			<el-col :span="8">
+		  				<el-form-item label="身份证号码" :required="true">
+		  					<el-input v-model="workerForm.idCard" placeholder="请输入"></el-input>
+		  				</el-form-item>
+		  			</el-col>
+		  			<el-col :span="24">
+		  				<el-form-item label="身份证正面照" :required="true">
+		  					<ImageUpload :fileList="fileList" :limit="1" :isEdit="true" />
+		  				</el-form-item>
+		  			</el-col>
+		  			<el-col :span="24" v-for="(item,index) in imgList" :key="index">
+		  				<el-form-item :label="item.dictValue" :required="true">
+		  					<ImageUpload :fileList="item.imgs" :limit="1" :isEdit="true" />
+		  				</el-form-item>
+		  			</el-col>
+		  		</el-row>
+		  	</el-form>
+		  	<div slot="footer" class="dialog-footer">
+		  		<el-button @click="data.removeTab()">取 消</el-button>
+		  		<el-button type="primary" @click="memberInner(data.removeTab)">确定</el-button>
+		  	</div>
+		  </div>
+	  </template>
+	</zj-tab-page>
 </template>
 
 <script>
@@ -104,7 +112,8 @@ export default {
 			dialogVisible: false,
       formData: {
 				type: '工程师',
-				examineRemark: ''
+				examineRemark: '',
+				examineStatus: ''
       },
 			examineStatus: '',
 			websitList: [],
@@ -179,13 +188,20 @@ export default {
       }, {
         md: 12,
         isShow: true,
-        name: 'el-image',
-        attributes: { src: this.formData.idCardImg },
+        name: 'slot-component',
+        attributes: {},
         formItemAttributes: {
           label: '身份证',
           prop: 'idCardImg',
           rules: []
         },
+        render: (h, { props, onInput }) => {
+          var { value } = props
+          console.log(this.formData.idCardImg)
+          return (
+            this.formData.idCardImg ? <el-image src={this.formData.idCardImg} style='width: 120px;height:120px' preview-src-list={[this.formData.idCardImg]} fit="cover"></el-image> : ''
+          )
+        }
       }, {
         md: 12,
         isShow: true,
@@ -259,17 +275,31 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
+	guanbi() {
+	  this.$refs?.formRef?.$refs?.inlineForm?.clearValidate()
+	  this.$data.formData = this.$options.data().formData
+	},
 	// 表格操作列
 	operation() {
 		return this.operationBtn({
 			detail: {
 				btnType: 'text',
 				click: ({ row, index, column }) => {
-					getMemberDetail({ userId: row.userId }).then(res => {
-					  Object.assign(this.formData, res.data)
-					  this.formDialogType = 1
-					  this.openForm()
+					this.$refs.tabPage.addTab({
+					    activeKey: "detail",
+					    key: "detail",
+					    label: "详情",
+					    triggerEvent: () => {
+					        this.guanbi()
+					        this.$nextTick(() => {
+								getMemberDetail({ userId: row.userId }).then(res => {
+								  Object.assign(this.formData, res.data)
+								  this.formDialogType = 1
+								})
+							})
+						},
 					})
+					
 				}
 			},
 			examine: {
@@ -278,25 +308,47 @@ export default {
 					return row.examineStatus == 'WAIT'
 				},
 				click: ({ row, index, column }) => {
-          this.workerForm.userId = row.userId
-					getMemberDetail({ userId: row.userId }).then(res => {
-					  Object.assign(this.formData, res.data)
-					  this.formDialogType = 0
-					  this.openForm()
+					this.$refs.tabPage.addTab({
+					  activeKey: "examine",
+					  key: "examine",
+					  label: "审核",
+					  triggerEvent: () => {
+					    this.guanbi()
+					    this.$nextTick(() => {
+							this.workerForm.userId = row.userId
+							getMemberDetail({ userId: row.userId }).then(res => {
+								Object.assign(this.formData, res.data)
+							})
+					    })
+					  },
+					  closeEvent: () => {
+					  }
 					})
 				}
 			},
 			setWorker: {
 				btnType: 'text',
-				prompt: '请确认是否设为工程师?',
+				// prompt: '请确认是否设为工程师?',
 				conditions: ({ row, index, column }) => {
 					return row.examineStatus != 'WAIT'
 				},
 				click: ({ row, index, column }) => {
-					this.workerForm.userId = row.userId
-					getWebsit({type: 'C'}).then(res => {
-						this.websitList = res.data
-						this.dialogVisible = true
+					this.$refs.tabPage.addTab({
+					  activeKey: "worker",
+					  key: "worker",
+					  label: "设为工程师",
+					  triggerEvent: () => {
+					    this.guanbi()
+					    this.$nextTick(() => {
+							this.workerForm.userId = row.userId
+							getWebsit({type: 'C'}).then(res => {
+								this.websitList = res.data
+								this.dialogVisible = true
+							})
+					    })
+					  },
+					  closeEvent: () => {
+					  }
 					})
 				}
 			},
@@ -353,7 +405,7 @@ export default {
       this.$data.formData = this.$options.data().formData
       this.formDialog = false
     },
-	audit(examineStatusEnum){
+	audit(examineStatusEnum, removeTab){
 		memberAudit({ 
 			examineStatusEnum,
 			examineRemark: this.formData.examineRemark,
@@ -362,10 +414,11 @@ export default {
 		}).then(res => {
 			this.$message({ type: 'success', message: '审核成功!' })
 			this.formCancel()
+			removeTab('list')
 			this.$refs.pageRef.refreshList()
 		})
 	},
-	memberInner(){
+	memberInner(removeTab){
 		let workerImgs = []
 		for(var i = 0;i < this.imgList.length;i++){
 			if(this.imgList[i].imgs.length == 0){
@@ -398,6 +451,7 @@ export default {
 			idCardImg: this.fileList.map(item => item.url).join(","),
 			workerImgs
 		}).then(res => {
+			removeTab('list')
 			this.dialogVisible = false
 			this.$message({ type: 'success', message: '设置工程师成功!' })
 			this.$refs.pageRef.refreshList()

+ 2 - 2
src/views/workOrder/basicConfiguration/settlementStandard/components/repair.vue

@@ -213,9 +213,9 @@ export default {
 				defaultData.render = (h, { row, index, column }) => {
 					return this.editIndex == index ? (
 						<div class="redbordererr">
-							<el-form-item prop={`tableData.${index}.normAmount`} rules={[{ required: true, message: '维修费结算比例不能为空', trigger: 'blur' }]}>
+							<el-form-item prop={`tableData.${index}.normAmount`} rules={[{ required: true, message: '维修费结算比例不能为空', trigger: 'blur' },{ pattern:/^[1-9]\d*$/, message: '请输入大于0的正整数', trigger: 'blur' }]}>
 								<div style="display:flex;">
-									<el-input type="text" value={row.normAmount} placeholder="请输入"
+									<el-input type="text" value={row.normAmount} placeholder="请输入大于0的正整数"
 										onInput={(val) => {
 											row.normAmount = val
 										}}>

+ 10 - 1
src/views/workOrder/settleAccountsManagement/settleAccountsOrder/index.vue

@@ -180,7 +180,16 @@ export default {
 									id: row.examineProjectId
 								}
 							})
-						} else {
+						} else if(row.settleOrderType == 'PUNISH'){
+							this.$router.push({
+								name: 'penaltyWorkOrder',
+								params: {
+									pageName: row.punishOrderId,
+									pageType: 'detail',
+									pageCode: row.punishOrderId,
+								},
+							})
+						}else{
 							this.$router.push({
 								name: 'workOrderPool',
 								params: {