pengyh 1 рік тому
батько
коміт
1e3ecee06c

+ 9 - 0
src/api/auxiliaryFittings/attachmentNewReturn.js

@@ -52,4 +52,13 @@ export function getTypeList(data) {
     method: 'post',
     data
   })
+}
+
+// 配件库存数据
+export function getAttachmentList(data) {
+  return request({
+    url: `/websit/stock/listP`,
+    method: 'post',
+    data
+  })
 }

+ 9 - 0
src/api/auxiliaryFittings/auxiliarySalesReturnOrder.js

@@ -52,4 +52,13 @@ export function getTypeList(data) {
     method: 'post',
     data
   })
+}
+
+// 库存数据
+export function getGoodsList(params) {
+  return request({
+    url: `/websit/sales/exist/stock/goodsList`,
+    method: 'post',
+    params
+  })
 }

+ 2 - 2
src/views/auxiliaryFittings/attachmentProfile/index.vue

@@ -229,9 +229,9 @@ export default {
 				md: 6,
 				isShow: true,
 				name: 'el-input',
-				attributes: { placeholder: '请输入配件码' },
+				attributes: { placeholder: '请输入配件码' },
 				formItemAttributes: {
-					label: '配件码',
+					label: '配件码',
 					prop: 'goodsCode',
 					rules: [...required]
 				}

+ 204 - 7
src/views/auxiliaryFittings/salesManagement/components/attachmentNewReturnDetail.vue

@@ -81,11 +81,14 @@
 								</el-radio-group>
 							</el-form-item>
 						</el-col>
-						<el-col :span="8">
+						<el-col :span="7">
 							<el-form-item label="销售订单号" :required="true">
-								<el-input type="text" v-model="formData.salesId" :disabled="formType == 2" @change="getDetail" placeholder="请输入销售订单号"></el-input>
+								<el-input type="text" v-model="formData.salesId" @change="getDetail" disabled placeholder="请输入销售订单号"></el-input>
 							</el-form-item>
 						</el-col>
+						<el-col :span="1">
+							<el-button v-if="formType != 2" size="small" type="primary"  @click="isShowNo = true;getOrderList();">选择</el-button>
+						</el-col>
 						<el-col :span="5">
 							<el-form-item label="销售金额">
 								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
@@ -263,6 +266,134 @@
 			<h3>扫二维码支付</h3>
 			<el-image :src="payCodeUrl" fit="fit"></el-image>
 		</el-dialog>
+		<!-- 选择销售订单号 -->
+		<el-dialog title="选择销售订单" :visible.sync="isShowNo" width="80%" :close-on-click-modal="false" :modal-append-to-body="false" @close="close">
+			<el-form ref="formData1" :model="formData1" label-width="110px" size="small" label-position="left">
+				<el-row :gutter="20">
+					<el-col :span="8">
+						<el-form-item label="网点名称" prop="websit_id">
+							<el-select v-model="formData1.websit_id" @change="changeWebsit" 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="师傅姓名" prop="worker_name">
+							<el-select v-model="formData1.worker_name" @focus="()=>{
+								if(!this.formData1.websit_id){return this.$message.warning('请先选择网点名称!');}
+							}" filterable placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in workerList"
+							      :key="item.id"
+							      :label="item.nickName + '-' + item.mobile"
+							      :value="item.nickName">
+							    </el-option>
+							  </el-select>
+						</el-form-item>
+					</el-col>
+					<el-col :span="8">
+						<el-form-item label="师傅联系电话" prop="worker_mobile">
+							<el-input type="text" v-model="formData1.worker_mobile" placeholder="请输入"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="8">
+						<el-form-item label="物料名称" align="center">
+							<el-select v-model="formData1.goods" @focus="()=>{
+								if(!this.formData1.websit_id){return this.$message.warning('请先选择网点名称!');}
+							}" value-key="goodsId" placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in goodsList"
+							      :key="item.goodsId"
+							      :label="item.goodsName"
+							      :value="item">
+							    </el-option>
+							  </el-select>
+						</el-form-item>
+					</el-col>
+					<!-- <el-col :span="8">
+						<el-form-item label="规格型号" align="center">
+							<el-select v-model="formData1.goods" @focus="()=>{
+								if(!this.formData1.websit_id){return this.$message.warning('请先选择网点名称!');}
+							}" value-key="goodsId" placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in goodsList"
+							      :key="item.goodsId"
+							      :label="item.goodsSpecification"
+							      :value="item">
+							    </el-option>
+							  </el-select>
+						</el-form-item>
+					</el-col> -->
+					<el-col :span="16">
+						<el-row type="flex" justify="end">
+							<el-col :span="4">
+								<el-button size="small" @click="resetScreenForm()">清空</el-button>
+								<el-button size="small" type="primary" @click="submitScreenForm()">搜索</el-button>
+							</el-col>
+						</el-row>
+					</el-col>
+				</el-row>
+			</el-form>
+			<div class="clearfix">
+				<span>订单信息</span>
+			</div>
+			<div class="table">
+				<el-table ref="treeTable" :data="orderList" element-loading-text="Loading" @select="handleSelectionChange" @row-click="handleSelectionChange('',$event)" border fit highlight-current-row stripe style="max-height: 380px;overflow-y: auto;">
+					<el-table-column type="selection" width="40"></el-table-column>
+					<el-table-column prop="salesId" align="center" label="销售单号" width="140"></el-table-column>
+					<el-table-column prop="" align="center" label="单据状态" width="120">已支付,已提货</el-table-column>
+					<el-table-column prop="websitName" align="center" label="网点名称" width="140"></el-table-column>
+					<el-table-column prop="" align="center" label="购买方">
+						<template slot-scope="scope">
+							{{scope.row.buyPeople == 'WORKER'?'内部师傅':'客户'}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="workerName" align="center" label="师傅姓名"></el-table-column>
+					<el-table-column prop="workerMobile" align="center" label="师傅联系电话" width="120"></el-table-column>
+					<el-table-column prop="salesType" align="center" label="销售类型"></el-table-column>
+					<el-table-column prop="salesTime" align="center" label="销售日期" width="160"></el-table-column>
+					<el-table-column prop="totalAmount" align="center" label="订单金额"></el-table-column>
+					<el-table-column prop="" align="center" label="订单来源">
+						<template slot-scope="scope">
+							{{scope.row.source == 'ONLINE'?'在线订单':'自建订单'}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="payType" align="center" label="支付方式">
+						<template slot-scope="scope">
+							{{scope.row.payType == 'CASH'?'现金':scope.row.payType == 'WECHAT'?'微信':'工程支付'}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="payTime" align="center" label="支付时间" width="160"></el-table-column>
+					<el-table-column prop="payNo" align="center" label="支付单号" width="160"></el-table-column>
+					<el-table-column prop="createBy" align="center" label="创建人" width="160"></el-table-column>
+					<el-table-column prop="createTime" align="center" label="创建时间" width="160"></el-table-column>
+					<el-table-column prop="updateBy" align="center" label="审核人" width="160"></el-table-column>
+					<el-table-column prop="updateTime" align="center" label="审核时间" width="160"></el-table-column>
+				</el-table>
+				<div class="pagination clearfix">
+					<div class="fr">
+						<el-pagination
+							@size-change="handleSizeChange"
+							@current-change="handleCurrentChange"
+							:current-page="pageNum"
+							:page-sizes="[10, 20, 30, 50]"
+							:page-size="pageSize"
+							layout="total, sizes, prev, pager, next, jumper"
+							:total="listTotal"
+						></el-pagination>
+					</div>
+				</div>
+				<div slot="footer" class="dialog-footer" style="margin-top: 10px;">
+					<el-button size="small" @click="isShowNo = false">取 消</el-button>
+					<el-button size="small" type="primary" @click="confirmOrder()">确定</el-button>
+				</div>
+			</div>
+		</el-dialog>
 	</div>
 </template>
 
@@ -271,8 +402,9 @@
 	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 { listPageV2, getWorker, getCategory, getGoods, getDetail } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
 	import { add, edit, getNewDetail } from "@/api/auxiliaryFittings/attachmentNewReturn";
+	import { getGoodsList } from "@/api/auxiliaryFittings/auxiliarySalesReturnOrder";
 	export default {
 		components: { ImageUpload, geographicalPosi },
 		props: ['id','title','formType'],
@@ -281,6 +413,8 @@
 				dataList: [],
 				websitList: [],
 				workerList: [],
+				orderList: [],
+				goodsList: [],
 				mainList: [],
 				isPay: false,
 				payCodeUrl: '',
@@ -317,6 +451,14 @@
 					lng: '',
 					orderEnginBaseId: '',
 				},
+				formData1: {
+					websit_id: '',
+					worker_name: '',
+					worker_mobile: '',
+					goods: {},
+					goodsName: '',
+					goodsSpecification: ''
+				},
 				isEdit: 0,
 				companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
 				rules: {
@@ -334,7 +476,11 @@
 						{ required: true, message: '请输入师傅联系电话', trigger: 'blur' },
 						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
 					],
-				}
+				},
+				isShowNo: false,
+				pageNum: 1,
+				pageSize: 10,
+				listTotal: 0
 			};
 		},
 		computed: {},
@@ -390,11 +536,62 @@
 					this.websitList = res.data
 				})
 			},
+			close(){
+				this.$refs.formData1.resetFields();
+			},
+			confirmOrder(){
+				this.isShowNo = false
+				this.getDetail(this.selectedRow.salesId)
+			},
+			getOrderList(){
+				listPageV2({pageNum: this.pageNum,pageSize: this.pageSize,params: [{param: 'a.flag',compare: '=',value: 'PAY_TAKE'},{param: "a.goods_type", compare: "=", value: "P"},{param: 'a.websit_id',compare: '=',value: this.formData1.websit_id},{param: 'a.worker_name',compare: '=',value: this.formData1.worker_name},{param: 'a.worker_mobile',compare: '=',value: this.formData1.worker_mobile}], goodsName: this.formData1.goods.goodsName, goodsSpecification: this.formData1.goods.goodsSpecification}).then(res => {
+					this.orderList = res.data.records
+					this.listTotal = res.data.total
+				})
+			},
+			getGoodsList(){
+				getGoodsList({
+					type: 'P',
+					websitId: this.formData1.websit_id
+				}).then(res => {
+					this.goodsList = res.data
+				})
+			},
+			handleSelectionChange (selection, row) {
+				this.$refs.treeTable.clearSelection()
+			 	 // 这里因为需求做的是必选一个,如有其他需求可做调整
+				this.$refs.treeTable.toggleRowSelection(row, true)    
+				this.selectedRow = row
+			},
+			// 更改每页数量
+			handleSizeChange(val) {
+				this.pageSize = val;
+				this.pageNum = 1;
+				this.getOrderList();
+			},
+			// 更改当前页
+			handleCurrentChange(val) {
+				this.pageNum = val;
+				this.getOrderList();
+			},
+			// 提交筛选表单
+			submitScreenForm() {
+				this.pageNum = 1;
+				this.getOrderList();
+			},
+			
+			// 重置筛选表单
+			resetScreenForm() {
+				this.$refs.formData1.resetFields();
+				this.pageNum = 1;
+				this.getOrderList();
+			},
 			changeWebsit(e){
-				this.formData.websitId = e.websitId
-				this.formData.websitName = e.name
+				// this.formData.websitId = e.websitId
+				// this.formData.websitName = e.name
 				this.getWorker()
-				this.getCategory(e.websitId)
+				this.getGoodsList()
+				// this.getCategory(e.websitId)
 			},
 			async getGoods(goodsName,type){
 				const that = this

+ 239 - 10
src/views/auxiliaryFittings/salesManagement/components/attachmentOldReturnDetail.vue

@@ -81,11 +81,14 @@
 								</el-radio-group>
 							</el-form-item>
 						</el-col>
-						<el-col :span="8">
+						<el-col :span="7">
 							<el-form-item label="销售订单号" :required="true">
-								<el-input type="text" v-model="formData.salesId" :disabled="formType == 2" @change="getDetail" placeholder="请输入销售订单号"></el-input>
+								<el-input type="text" v-model="formData.salesId" @change="getDetail" disabled placeholder="请输入销售订单号"></el-input>
 							</el-form-item>
 						</el-col>
+						<el-col :span="1">
+							<el-button v-if="formType != 2" size="small" type="primary"  @click="isShowNo = true;getOrderList();">选择</el-button>
+						</el-col>
 						<el-col :span="5">
 							<el-form-item label="销售金额">
 								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
@@ -283,10 +286,22 @@
 							<el-input type="number" v-model="scope.row.phone" :disabled="formType == 2" placeholder="请输入"></el-input>
 						</template>
 					</el-table-column>
-					<el-table-column label="配件名称" align="center">
+					<!-- <el-table-column label="配件名称" align="center">
 						<template slot-scope="scope">
 							<el-input type="text" v-model="scope.row.partsName" :disabled="formType == 2" placeholder="请输入"></el-input>
 						</template>
+					</el-table-column> -->
+					<el-table-column label="配件名称" align="center">
+						<template slot-scope="scope">
+							<el-select v-model="scope.row.goods" @change="changeGoods1" value-key="goodsId" :disabled="isEdit != scope.$index || formType == 2" placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in scope.row.goodsList"
+							      :key="item.goodsId"
+							      :label="item.goodsName"
+							      :value="item">
+							    </el-option>
+							  </el-select>
+						</template>
 					</el-table-column>
 					<el-table-column label="配件编码" align="center">
 						<template slot-scope="scope">
@@ -323,14 +338,143 @@
 			<h3>扫二维码支付</h3>
 			<el-image :src="payCodeUrl" fit="fit"></el-image>
 		</el-dialog>
+		<!-- 选择销售订单号 -->
+		<el-dialog title="选择销售订单" :visible.sync="isShowNo" width="80%" :close-on-click-modal="false" :modal-append-to-body="false" @close="close">
+			<el-form ref="formData1" :model="formData1" label-width="110px" size="small" label-position="left">
+				<el-row :gutter="20">
+					<el-col :span="8">
+						<el-form-item label="网点名称" prop="websit_id">
+							<el-select v-model="formData1.websit_id" @change="changeWebsit" 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="师傅姓名" prop="worker_name">
+							<el-select v-model="formData1.worker_name" @focus="()=>{
+								if(!this.formData1.websit_id){return this.$message.warning('请先选择网点名称!');}
+							}" filterable placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in workerList"
+							      :key="item.id"
+							      :label="item.nickName + '-' + item.mobile"
+							      :value="item.nickName">
+							    </el-option>
+							  </el-select>
+						</el-form-item>
+					</el-col>
+					<el-col :span="8">
+						<el-form-item label="师傅联系电话" prop="worker_mobile">
+							<el-input type="text" v-model="formData1.worker_mobile" placeholder="请输入"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="8">
+						<el-form-item label="物料名称" align="center">
+							<el-select v-model="formData1.goods" @focus="()=>{
+								if(!this.formData1.websit_id){return this.$message.warning('请先选择网点名称!');}
+							}" value-key="goodsId" placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in goodsList"
+							      :key="item.goodsId"
+							      :label="item.goodsName"
+							      :value="item">
+							    </el-option>
+							  </el-select>
+						</el-form-item>
+					</el-col>
+					<!-- <el-col :span="8">
+						<el-form-item label="规格型号" align="center">
+							<el-select v-model="formData1.goods" @focus="()=>{
+								if(!this.formData1.websit_id){return this.$message.warning('请先选择网点名称!');}
+							}" value-key="goodsId" placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in goodsList"
+							      :key="item.goodsId"
+							      :label="item.goodsSpecification"
+							      :value="item">
+							    </el-option>
+							  </el-select>
+						</el-form-item>
+					</el-col> -->
+					<el-col :span="16">
+						<el-row type="flex" justify="end">
+							<el-col :span="4">
+								<el-button size="small" @click="resetScreenForm()">清空</el-button>
+								<el-button size="small" type="primary" @click="submitScreenForm()">搜索</el-button>
+							</el-col>
+						</el-row>
+					</el-col>
+				</el-row>
+			</el-form>
+			<div class="clearfix">
+				<span>订单信息</span>
+			</div>
+			<div class="table">
+				<el-table ref="treeTable" :data="orderList" element-loading-text="Loading" @select="handleSelectionChange" @row-click="handleSelectionChange('',$event)" border fit highlight-current-row stripe style="max-height: 380px;overflow-y: auto;">
+					<el-table-column type="selection" width="40"></el-table-column>
+					<el-table-column prop="salesId" align="center" label="销售单号" width="140"></el-table-column>
+					<el-table-column prop="" align="center" label="单据状态" width="120">已支付,已提货</el-table-column>
+					<el-table-column prop="websitName" align="center" label="网点名称" width="140"></el-table-column>
+					<el-table-column prop="" align="center" label="购买方">
+						<template slot-scope="scope">
+							{{scope.row.buyPeople == 'WORKER'?'内部师傅':'客户'}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="workerName" align="center" label="师傅姓名"></el-table-column>
+					<el-table-column prop="workerMobile" align="center" label="师傅联系电话" width="120"></el-table-column>
+					<el-table-column prop="salesType" align="center" label="销售类型"></el-table-column>
+					<el-table-column prop="salesTime" align="center" label="销售日期" width="160"></el-table-column>
+					<el-table-column prop="totalAmount" align="center" label="订单金额"></el-table-column>
+					<el-table-column prop="" align="center" label="订单来源">
+						<template slot-scope="scope">
+							{{scope.row.source == 'ONLINE'?'在线订单':'自建订单'}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="payType" align="center" label="支付方式">
+						<template slot-scope="scope">
+							{{scope.row.payType == 'CASH'?'现金':scope.row.payType == 'WECHAT'?'微信':'工程支付'}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="payTime" align="center" label="支付时间" width="160"></el-table-column>
+					<el-table-column prop="payNo" align="center" label="支付单号" width="160"></el-table-column>
+					<el-table-column prop="createBy" align="center" label="创建人" width="160"></el-table-column>
+					<el-table-column prop="createTime" align="center" label="创建时间" width="160"></el-table-column>
+					<el-table-column prop="updateBy" align="center" label="审核人" width="160"></el-table-column>
+					<el-table-column prop="updateTime" align="center" label="审核时间" width="160"></el-table-column>
+				</el-table>
+				<div class="pagination clearfix">
+					<div class="fr">
+						<el-pagination
+							@size-change="handleSizeChange"
+							@current-change="handleCurrentChange"
+							:current-page="pageNum"
+							:page-sizes="[10, 20, 30, 50]"
+							:page-size="pageSize"
+							layout="total, sizes, prev, pager, next, jumper"
+							:total="listTotal"
+						></el-pagination>
+					</div>
+				</div>
+				<div slot="footer" class="dialog-footer" style="margin-top: 10px;">
+					<el-button size="small" @click="isShowNo = false">取 消</el-button>
+					<el-button size="small" type="primary" @click="confirmOrder()">确定</el-button>
+				</div>
+			</div>
+		</el-dialog>
 	</div>
 </template>
 
 <script>
 	import { getWebsit } from "@/api/customerManagement";
 	import ImageUpload from '@/components/file-upload'
-	import { getWorker, getCategory, getGoods, getDetail } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
-	import { add, edit, getNewDetail } from "@/api/auxiliaryFittings/attachmentNewReturn";
+	import { listPageV2, getWorker, getCategory, getGoods, getDetail } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
+	import { add, edit, getNewDetail, getAttachmentList } from "@/api/auxiliaryFittings/attachmentNewReturn";
+	import { getGoodsList } from "@/api/auxiliaryFittings/auxiliarySalesReturnOrder";
 	export default {
 		components: { ImageUpload },
 		props: ['id','title','formType'],
@@ -340,6 +484,9 @@
 				oldList: [],
 				websitList: [],
 				workerList: [],
+				orderList: [],
+				goodsList: [],
+				attachmentList: [],
 				mainList: [],
 				isPay: false,
 				payCodeUrl: '',
@@ -378,6 +525,14 @@
 					lng: '',
 					orderEnginBaseId: '',
 				},
+				formData1: {
+					websit_id: '',
+					worker_name: '',
+					worker_mobile: '',
+					goods: {},
+					goodsName: '',
+					goodsSpecification: ''
+				},
 				isEdit: 0,
 				companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
 				rules: {
@@ -395,7 +550,11 @@
 						{ required: true, message: '请输入师傅联系电话', trigger: 'blur' },
 						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
 					],
-				}
+				},
+				isShowNo: false,
+				pageNum: 1,
+				pageSize: 10,
+				listTotal: 0
 			};
 		},
 		computed: {},
@@ -452,11 +611,62 @@
 					this.websitList = res.data
 				})
 			},
+			close(){
+				this.$refs.formData1.resetFields();
+			},
+			confirmOrder(){
+				this.isShowNo = false
+				this.getDetail(this.selectedRow.salesId)
+			},
+			getOrderList(){
+				listPageV2({pageNum: this.pageNum,pageSize: this.pageSize,params: [{param: 'a.flag',compare: '=',value: 'PAY_TAKE'},{param: "a.goods_type", compare: "=", value: "P"},{param: 'a.websit_id',compare: '=',value: this.formData1.websit_id},{param: 'a.worker_name',compare: '=',value: this.formData1.worker_name},{param: 'a.worker_mobile',compare: '=',value: this.formData1.worker_mobile}], goodsName: this.formData1.goods.goodsName, goodsSpecification: this.formData1.goods.goodsSpecification}).then(res => {
+					this.orderList = res.data.records
+					this.listTotal = res.data.total
+				})
+			},
+			getGoodsList(){
+				getGoodsList({
+					type: 'P',
+					websitId: this.formData1.websit_id
+				}).then(res => {
+					this.goodsList = res.data
+				})
+			},
+			handleSelectionChange (selection, row) {
+				this.$refs.treeTable.clearSelection()
+			 	 // 这里因为需求做的是必选一个,如有其他需求可做调整
+				this.$refs.treeTable.toggleRowSelection(row, true)    
+				this.selectedRow = row
+			},
+			// 更改每页数量
+			handleSizeChange(val) {
+				this.pageSize = val;
+				this.pageNum = 1;
+				this.getOrderList();
+			},
+			// 更改当前页
+			handleCurrentChange(val) {
+				this.pageNum = val;
+				this.getOrderList();
+			},
+			// 提交筛选表单
+			submitScreenForm() {
+				this.pageNum = 1;
+				this.getOrderList();
+			},
+			
+			// 重置筛选表单
+			resetScreenForm() {
+				this.$refs.formData1.resetFields();
+				this.pageNum = 1;
+				this.getOrderList();
+			},
 			changeWebsit(e){
-				this.formData.websitId = e.websitId
-				this.formData.websitName = e.name
+				// this.formData.websitId = e.websitId
+				// this.formData.websitName = e.name
 				this.getWorker()
-				this.getCategory(e.websitId)
+				this.getGoodsList()
+				// this.getCategory(e.websitId)
 			},
 			async getGoods(goodsName,type){
 				const that = this
@@ -501,6 +711,15 @@
 				this.dataList[this.isEdit].goodsCode = e. goodsCode
 				this.dataList[this.isEdit].qty = e.qty
 			},
+			changeGoods1(e){
+				this.oldList[this.isEdit].goodsId = e.goodsId
+				this.oldList[this.isEdit].goodsName = e.goodsName
+				this.oldList[this.isEdit].unit = e.goodsStockUnit
+				this.oldList[this.isEdit].orderBrand = e.brandRelaName
+				this.oldList[this.isEdit].partsName = e.productRelaName
+				this.oldList[this.isEdit].partsCode = e.goodsCode
+				this.oldList[this.isEdit].qty = e.oldQty
+			},
 			add(){
 				this.oldList.push({
 					orderId: '',
@@ -510,7 +729,17 @@
 					partsName: '',
 					unit: '',
 					qty: '',
-					partsCode: ''
+					partsCode: '',
+					goodsList: [],
+					goods: {},
+					goodsId: '',
+					goodsName: '',
+				})
+				this.getAttachmentList()
+			},
+			getAttachmentList(){
+				getAttachmentList({pageNum: 1,pageSize: -1,params: [{param: 'a.websit_id',compare: '=',value: this.formData.websitId}]}).then(res => {
+					this.oldList[this.isEdit].goodsList = res.data.records
 				})
 			},
 			async checkForm(){

+ 203 - 9
src/views/auxiliaryFittings/salesManagement/components/auxiliarySalesReturnOrderDetail.vue

@@ -81,11 +81,14 @@
 								</el-radio-group>
 							</el-form-item>
 						</el-col>
-						<el-col :span="8">
+						<el-col :span="7">
 							<el-form-item label="销售订单号" :required="true">
-								<el-input type="text" v-model="formData.salesId" @change="getDetail" placeholder="请输入销售订单号"></el-input>
+								<el-input type="text" v-model="formData.salesId" @change="getDetail" disabled placeholder="请输入销售订单号"></el-input>
 							</el-form-item>
 						</el-col>
+						<el-col :span="1">
+							<el-button v-if="formType != 2" size="small" type="primary"  @click="isShowNo = true;getOrderList();">选择</el-button>
+						</el-col>
 						<el-col :span="5">
 							<el-form-item label="销售金额">
 								<el-input type="text" :value="formData.totalAmount" disabled></el-input>
@@ -287,6 +290,134 @@
 			<h3>扫二维码支付</h3>
 			<el-image :src="payCodeUrl" fit="fit"></el-image>
 		</el-dialog>
+		<!-- 选择销售订单号 -->
+		<el-dialog title="选择销售订单" :visible.sync="isShowNo" width="80%" :close-on-click-modal="false" :modal-append-to-body="false" @close="close">
+			<el-form ref="formData1" :model="formData1" label-width="110px" size="small" label-position="left">
+				<el-row :gutter="20">
+					<el-col :span="8">
+						<el-form-item label="网点名称" prop="websit_id">
+							<el-select v-model="formData1.websit_id" @change="changeWebsit" 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="师傅姓名" prop="worker_name">
+							<el-select v-model="formData1.worker_name" @focus="()=>{
+								if(!this.formData1.websit_id){return this.$message.warning('请先选择网点名称!');}
+							}" filterable placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in workerList"
+							      :key="item.id"
+							      :label="item.nickName + '-' + item.mobile"
+							      :value="item.nickName">
+							    </el-option>
+							  </el-select>
+						</el-form-item>
+					</el-col>
+					<el-col :span="8">
+						<el-form-item label="师傅联系电话" prop="worker_mobile">
+							<el-input type="text" v-model="formData1.worker_mobile" placeholder="请输入"></el-input>
+						</el-form-item>
+					</el-col>
+					<el-col :span="8">
+						<el-form-item label="物料名称" align="center">
+							<el-select v-model="formData1.goods" @focus="()=>{
+								if(!this.formData1.websit_id){return this.$message.warning('请先选择网点名称!');}
+							}" value-key="goodsId" placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in goodsList"
+							      :key="item.goodsId"
+							      :label="item.goodsName"
+							      :value="item">
+							    </el-option>
+							  </el-select>
+						</el-form-item>
+					</el-col>
+					<el-col :span="8">
+						<el-form-item label="规格型号" align="center">
+							<el-select v-model="formData1.goods" @focus="()=>{
+								if(!this.formData1.websit_id){return this.$message.warning('请先选择网点名称!');}
+							}" value-key="goodsId" placeholder="请选择" style="width: 100%;">
+							    <el-option
+							      v-for="item in goodsList"
+							      :key="item.goodsId"
+							      :label="item.goodsSpecification"
+							      :value="item">
+							    </el-option>
+							  </el-select>
+						</el-form-item>
+					</el-col>
+					<el-col :span="8">
+						<el-row type="flex" justify="end">
+							<el-col :span="7">
+								<el-button size="small" @click="resetScreenForm()">清空</el-button>
+								<el-button size="small" type="primary" @click="submitScreenForm()">搜索</el-button>
+							</el-col>
+						</el-row>
+					</el-col>
+				</el-row>
+			</el-form>
+			<div class="clearfix">
+				<span>订单信息</span>
+			</div>
+			<div class="table">
+				<el-table ref="treeTable" :data="orderList" element-loading-text="Loading" @select="handleSelectionChange" @row-click="handleSelectionChange('',$event)" border fit highlight-current-row stripe style="max-height: 380px;overflow-y: auto;">
+					<el-table-column type="selection" width="40"></el-table-column>
+					<el-table-column prop="salesId" align="center" label="销售单号" width="140"></el-table-column>
+					<el-table-column prop="" align="center" label="单据状态" width="120">已支付,已提货</el-table-column>
+					<el-table-column prop="websitName" align="center" label="网点名称" width="140"></el-table-column>
+					<el-table-column prop="" align="center" label="购买方">
+						<template slot-scope="scope">
+							{{scope.row.buyPeople == 'WORKER'?'内部师傅':'客户'}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="workerName" align="center" label="师傅姓名"></el-table-column>
+					<el-table-column prop="workerMobile" align="center" label="师傅联系电话" width="120"></el-table-column>
+					<el-table-column prop="salesType" align="center" label="销售类型"></el-table-column>
+					<el-table-column prop="salesTime" align="center" label="销售日期" width="160"></el-table-column>
+					<el-table-column prop="totalAmount" align="center" label="订单金额"></el-table-column>
+					<el-table-column prop="" align="center" label="订单来源">
+						<template slot-scope="scope">
+							{{scope.row.source == 'ONLINE'?'在线订单':'自建订单'}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="payType" align="center" label="支付方式">
+						<template slot-scope="scope">
+							{{scope.row.payType == 'CASH'?'现金':scope.row.payType == 'WECHAT'?'微信':'工程支付'}}
+						</template>
+					</el-table-column>
+					<el-table-column prop="payTime" align="center" label="支付时间" width="160"></el-table-column>
+					<el-table-column prop="payNo" align="center" label="支付单号" width="160"></el-table-column>
+					<el-table-column prop="createBy" align="center" label="创建人" width="160"></el-table-column>
+					<el-table-column prop="createTime" align="center" label="创建时间" width="160"></el-table-column>
+					<el-table-column prop="updateBy" align="center" label="审核人" width="160"></el-table-column>
+					<el-table-column prop="updateTime" align="center" label="审核时间" width="160"></el-table-column>
+				</el-table>
+				<div class="pagination clearfix">
+					<div class="fr">
+						<el-pagination
+							@size-change="handleSizeChange"
+							@current-change="handleCurrentChange"
+							:current-page="pageNum"
+							:page-sizes="[10, 20, 30, 50]"
+							:page-size="pageSize"
+							layout="total, sizes, prev, pager, next, jumper"
+							:total="listTotal"
+						></el-pagination>
+					</div>
+				</div>
+				<div slot="footer" class="dialog-footer" style="margin-top: 10px;">
+					<el-button size="small" @click="isShowNo = false">取 消</el-button>
+					<el-button size="small" type="primary" @click="confirmOrder()">确定</el-button>
+				</div>
+			</div>
+		</el-dialog>
 	</div>
 </template>
 
@@ -295,8 +426,8 @@
 	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";
+	import { listPageV2, getWorker, getCategory, getGoods, getDetail } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
+	import { add, edit, getReturnDetail, getGoodsList } from "@/api/auxiliaryFittings/auxiliarySalesReturnOrder";
 	export default {
 		components: { ImageUpload, geographicalPosi },
 		props: ['id','title','formType'],
@@ -305,6 +436,8 @@
 				dataList: [],
 				websitList: [],
 				workerList: [],
+				orderList: [],
+				goodsList: [],
 				mainList: [],
 				projectList: [],
 				isPay: false,
@@ -343,6 +476,14 @@
 					lng: '',
 					orderEnginBaseId: '',
 				},
+				formData1: {
+					websit_id: '',
+					worker_name: '',
+					worker_mobile: '',
+					goods: {},
+					goodsName: '',
+					goodsSpecification: ''
+				},
 				provinceList: [],
 				cityList: [],
 				areaList: [],
@@ -364,7 +505,11 @@
 						{ required: true, message: '请输入师傅联系电话', trigger: 'blur' },
 						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
 					],
-				}
+				},
+				isShowNo: false,
+				pageNum: 1,
+				pageSize: 10,
+				listTotal: 0
 			};
 		},
 		computed: {},
@@ -426,11 +571,60 @@
 					this.websitList = res.data
 				})
 			},
+			close(){
+				this.$refs.formData1.resetFields();
+			},
+			confirmOrder(){
+				this.isShowNo = false
+				this.getDetail(this.selectedRow.salesId)
+			},
+			getOrderList(){
+				listPageV2({pageNum: this.pageNum,pageSize: this.pageSize,params: [{param: 'a.flag',compare: '=',value: 'PAY_TAKE'},{param: "a.goods_type", compare: "=", value: "M"},{param: 'a.websit_id',compare: '=',value: this.formData1.websit_id},{param: 'a.worker_name',compare: '=',value: this.formData1.worker_name},{param: 'a.worker_mobile',compare: '=',value: this.formData1.worker_mobile}], goodsName: this.formData1.goods.goodsName, goodsSpecification: this.formData1.goods.goodsSpecification}).then(res => {
+					this.orderList = res.data.records
+					this.listTotal = res.data.total
+				})
+			},
+			getGoodsList(){
+				getGoodsList({
+					type: 'M',
+					websitId: this.formData1.websit_id
+				}).then(res => {
+					this.goodsList = res.data
+				})
+			},
+			handleSelectionChange (selection, row) {
+				this.$refs.treeTable.clearSelection()
+			 	 // 这里因为需求做的是必选一个,如有其他需求可做调整
+				this.$refs.treeTable.toggleRowSelection(row, true)    
+				this.selectedRow = row
+			},
+			// 更改每页数量
+			handleSizeChange(val) {
+				this.pageSize = val;
+				this.pageNum = 1;
+				this.getOrderList();
+			},
+			// 更改当前页
+			handleCurrentChange(val) {
+				this.pageNum = val;
+				this.getOrderList();
+			},
+			// 提交筛选表单
+			submitScreenForm() {
+				this.pageNum = 1;
+				this.getOrderList();
+			},
+			
+			// 重置筛选表单
+			resetScreenForm() {
+				this.$refs.formData1.resetFields();
+				this.pageNum = 1;
+				this.getOrderList();
+			},
 			changeWebsit(e){
-				this.formData.websitId = e.websitId
-				this.formData.websitName = e.name
 				this.getWorker()
-				this.getCategory(e.websitId)
+				this.getGoodsList()
+				// this.getCategory(e.websitId)
 			},
 			getCategory(websitId){
 				getCategory({websitId}).then(res => {
@@ -454,7 +648,7 @@
 				}
 			},
 			getWorker(){
-				getWorker({pageNum: 1,pageSize: -1,params: [{param: 'b.websit_id',compare: '=',value: this.formData.websitId}]}).then(res => {
+				getWorker({pageNum: 1,pageSize: -1,params: [{param: 'b.websit_id',compare: '=',value: this.formData1.websit_id}]}).then(res => {
 					this.workerList = res.data.records
 				})
 			},

+ 1 - 0
src/views/setting/account/index.vue

@@ -31,6 +31,7 @@
                 <el-input placeholder="用户名" v-model="screenForm.keyword" size="small" style="width: 180px;">
                   <el-button slot="append" icon="el-icon-search" size="small" @click="getListByScreen"></el-button>
                 </el-input>
+				<el-button size="small" @click="screenForm.companyWechatName = '';screenForm.keyword = '';screenForm.role = '';screenForm.status = '';getListByScreen()">清空</el-button>
               </div>
             </div>
             <div class="table">

+ 2 - 0
src/views/setting/oplog/index.vue

@@ -26,6 +26,8 @@
             start-placeholder="开始日期"
             end-placeholder="结束日期">
           </el-date-picker>
+		  <el-button style="margin-left: 10px" size="small" @click="screenForm.companyWechatName = '';screenForm.moduleName = '';screenForm.date = '';getListByScreen()">清空</el-button>
+		  <el-button size="small" type="primary" @click="getListByScreen">搜索</el-button>
         </div>
       </div>
 

+ 1 - 0
src/views/setting/role/index.vue

@@ -18,6 +18,7 @@
                 <el-input placeholder="商户名称" v-model="screenForm.companyWechatName" size="small" style="width: 300px;">
                   <el-button slot="append" icon="el-icon-search" size="small" @click="getListByScreen"></el-button>
                 </el-input>
+				<el-button size="small" @click="screenForm.companyWechatName = '';getListByScreen()">清空</el-button>
               </div>
             </div>
             <div class="table">