Pārlūkot izejas kodu

物资-用户选择独立封装,细节调整

huangguoce 4 dienas atpakaļ
vecāks
revīzija
048d4b3dcb

+ 7 - 0
src/api/psi/CollectService.js

@@ -115,4 +115,11 @@ export default class CollectService {
 			params: { collectId: id },
 		});
 	}
+	userTree(name) {
+		return request({
+			url: prefix + "/psi/collect/userTree",
+			method: "get",
+			params: { name: name },
+		});
+	}
 }

+ 3 - 3
src/views/psiManagement/collect/CollectForm.vue

@@ -257,7 +257,7 @@ import SelectTree from '@/components/treeSelect/treeSelect.vue'
 import CwProgramPageForm from '@/views/cw/reimbursementApproval/info/CwProgramPageForm'
 import MaterialTypePullForm from '../info/MaterialTypePullForm'
 import MaterialTypePullFormByOption from '../info/MaterialTypePullFormByOption'
-import UserPullForm from '@/views/finance/invoice/UserPullForm'
+import UserPullForm from '@/views/psiManagement/components/UserPullForm'
 import PurchasePageForm from './PurchasePageForm'
 import PurchasePageFormByOption from './PurchasePageFormByOption'
 import CommonApi from '@/api/cw/common/CommonApi'
@@ -451,7 +451,7 @@ export default {
 								}
 							}
 						}
-						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'psi')
 						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 						this.loading = false
 					} else {
@@ -472,7 +472,7 @@ export default {
 					}
 				})
 				if (method !== 'edit' && method !== 'view') {
-					this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
+					this.$refs.uploadComponent.newUpload(method, [], 'psi')
 				}
 			})
 		},

+ 1 - 1
src/views/psiManagement/collect/CollectList.vue

@@ -45,7 +45,7 @@
 				<template #buttons>
 					<el-button v-if="hasPermission('psi:add')" type="primary" icon="el-icon-plus"
 						@click="start()">新建</el-button>
-					<el-button v-if="hasPermission('psi:edit')" type="warning" icon="el-icon-plus"
+					<el-button v-if="hasPermission('psi:edit')" type="warning" icon="el-icon-download"
 						@click="exportFile()">导出</el-button>
 				</template>
 				<template #tools>

+ 9 - 2
src/views/psiManagement/collect/CollectReturnForm.vue

@@ -74,8 +74,15 @@
 							</template> -->
 						</vxe-table-column>
 						<vxe-table-column field="surplusStock" title="本次退回数量" align="center" :edit-render="{}">
+							<template #default="scope">
+								<span v-if="status == 'taskFormDetail' && inputForm.statusReturn == '5'">{{
+									scope.row.returnedNum }}</span>
+								<span v-else>{{ scope.row.surplusStock }}</span>
+							</template>
 							<template v-slot:edit="scope">
-								<el-input :disabled="scope.row.returnedNum == scope.row.collectNumber"
+								<span v-if="status == 'taskFormDetail' && inputForm.statusReturn == '5'">{{
+									scope.row.returnedNum }}</span>
+								<el-input v-else :disabled="scope.row.returnedNum == scope.row.collectNumber"
 									v-model="scope.row.surplusStock" @input="handleSurplusStockChange(scope.row)"
 									@blur="scope.row.surplusStock = twoDecimalPlaces2(scope.row.surplusStock)"
 									maxlength="10"></el-input>
@@ -139,7 +146,7 @@ import UpLoadComponent from '@/views/common/UpLoadComponent'
 import SelectTree from '@/components/treeSelect/treeSelect.vue'
 import CwProgramPageForm from '@/views/cw/reimbursementApproval/info/CwProgramPageForm'
 import MaterialTypePullForm from '../info/MaterialTypePullForm'
-import UserPullForm from '@/views/finance/invoice/UserPullForm'
+import UserPullForm from '@/views/psiManagement/components/UserPullForm'
 import PurchasePageForm from './PurchasePageForm'
 import CommonApi from '@/api/cw/common/CommonApi'
 export default {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 744 - 778
src/views/psiManagement/collect/CollectReturnHiForm.vue


+ 2 - 2
src/views/psiManagement/collect/UpdateCollectInfoForm.vue

@@ -227,7 +227,7 @@ import CwProgramPageForm from '@/views/cw/reimbursementApproval/info/CwProgramPa
 import MaterialTypePullForm from '../info/MaterialTypePullForm'
 import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
 import UpLoadComponent from '@/views/common/UpLoadComponent'
-import UserPullForm from '@/views/finance/invoice/UserPullForm'
+import UserPullForm from '@/views/psiManagement/components/UserPullForm'
 export default {
 	data() {
 		return {
@@ -376,7 +376,7 @@ export default {
 								}
 							}
 						}
-						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'psi')
 						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 						this.loading = false
 					})

+ 125 - 0
src/views/psiManagement/components/UserPullForm.vue

@@ -0,0 +1,125 @@
+<template>
+	<div>
+		<el-dialog :title="title" :close-on-click-modal="false" draggable width="500px" height="500px" @close="close"
+			append-to-body v-model="visible">
+			<div style="height: calc(100% - 80px);">
+				<el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm"
+					@keyup.enter.native="list()" @submit.native.prevent>
+					<!-- 搜索框-->
+					<el-form-item label="" prop="name">
+						<el-input v-model="searchForm.name" placeholder="请输入用户名称" clearable></el-input>
+					</el-form-item>
+
+					<el-form-item>
+						<el-button type="primary" @click="list()" icon="el-icon-search">查询</el-button>
+						<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+					</el-form-item>
+				</el-form>
+				<vxe-table border="inner" auto-resize resizable height="300px" :loading="loading" size="small"
+					ref="userTable" show-header-overflow show-overflow highlight-hover-row :menu-config="{}"
+					:sort-config="{ remote: true }" :data="dataList" :row-config="{ isCurrent: true }"
+					:radio-config="{ trigger: 'row' }"
+					:tree-config="{ transform: true, rowField: 'id', parentField: 'parentId', expandAll: true }"
+					:checkbox-config="{}">
+					<!--          <vxe-column type="seq" width="60" title="序号"></vxe-column>-->
+					<vxe-column type="radio" width="50"></vxe-column>
+
+					<vxe-column title="姓名" min-width="180" field="name" align="left" tree-node></vxe-column>
+				</vxe-table>
+			</div>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+					<el-button type="primary" v-if="method != 'view'" @click="getProgramForUser()"
+						icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+				</span>
+			</template>
+
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+import CollectService from '@/api/psi/CollectService'
+export default {
+	data() {
+		return {
+			title: '',
+			method: '',
+			visible: false,
+			loading: false,
+			dataList: [],
+			searchForm: {
+				name: ''
+			}
+		}
+	},
+	reimbursementService: null,
+	created() {
+		this.reimbursementService = new CollectService()
+	},
+	components: {
+	},
+	methods: {
+		init() {
+			this.title = '人员选择'
+			this.visible = true
+			this.list()
+		},
+		// 表单提交
+		getProgramForUser() {
+			let rows = []
+			if (this.commonJS.isEmpty(this.$refs.userTable.getRadioRecord())) {
+				this.$message.error('请选择一条数据')
+				return
+			}
+			// if (this.$refs.userTable.getCheckboxRecords().length > 1) {
+			//   this.$message.error('最多选择一条数据')
+			//   return
+			// }
+			let row = this.$refs.userTable.getRadioRecord()
+			if (!row.isUser) {
+				this.$message.error('请选择子集数据')
+				return
+			}
+			this.close()
+			rows.push(row)
+			this.$emit('getProgramForUser', rows)
+		},
+		list() {
+			this.loading = true
+			this.reimbursementService.userTree(this.searchForm.name).then((data) => {
+				this.dataList = data
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.userTable.setAllTreeExpand(true)
+				})
+			})
+		},
+		// 当前页
+		currentChangeHandle({ currentPage, pageSize }) {
+			this.tablePage.currentPage = currentPage
+			this.tablePage.pageSize = pageSize
+			this.list()
+		},
+		resetSearch() {
+			this.$refs.searchForm.resetFields()
+			this.list()
+		},
+		close() {
+			this.detail = ''
+			this.visible = false
+		}
+	}
+}
+</script>
+<style>
+.messageZindex {
+	z-index: 9999 !important;
+}
+</style>
+<style scoped>
+/deep/ .el-dialog__body {
+	padding-top: 0px;
+}
+</style>

+ 3 - 3
src/views/psiManagement/contract/ContractForm.vue

@@ -31,7 +31,7 @@
 					]">
 						<el-radio-group v-model="inputForm.isUscCode">
 							<el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value">{{ item.label
-								}}</el-radio>
+							}}</el-radio>
 						</el-radio-group>
 					</el-form-item>
 				</el-col>
@@ -356,7 +356,7 @@ export default {
 				this.contractService.findById(this.inputForm.id).then((data) => {
 					if (this.inputForm.id !== 'false') {
 						this.inputForm = this.recover(this.inputForm, data)
-						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'psi')
 						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 						this.loading = false
 					} else {
@@ -365,7 +365,7 @@ export default {
 					}
 				})
 				if (method !== 'edit' && method !== 'view') {
-					this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
+					this.$refs.uploadComponent.newUpload(method, [], 'psi')
 				}
 			})
 		},

+ 4 - 4
src/views/psiManagement/contract/UpdateContractInfoForm.vue

@@ -33,8 +33,8 @@
 							{ required: true, message: '请选择是否有统一社会信用代码', trigger: 'blur' }
 						]">
 							<el-radio-group v-model="inputForm.isUscCode">
-								<el-radio v-for="item in $dictUtils.getDictList('yes_no')"
-									:label="item.value">{{ item.label }}</el-radio>
+								<el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value">{{
+									item.label }}</el-radio>
 							</el-radio-group>
 						</el-form-item>
 					</el-col>
@@ -371,7 +371,7 @@ export default {
 				this.contractService.findById(this.inputForm.id).then((data) => {
 					if (this.inputForm.id !== 'false') {
 						this.inputForm = this.recover(this.inputForm, data)
-						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'psi')
 						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 						this.loading = false
 					} else {
@@ -380,7 +380,7 @@ export default {
 					}
 				})
 				if (method !== 'edit' && method !== 'view') {
-					this.$refs.uploadComponent.newUpload(method, [], 'reimbursement')
+					this.$refs.uploadComponent.newUpload(method, [], 'psi')
 				}
 			})
 		},

+ 2 - 2
src/views/psiManagement/info/UpdateInfoForm.vue

@@ -259,7 +259,7 @@ import CwProgramPageForm from '@/views/cw/reimbursementApproval/info/CwProgramPa
 import MaterialTypePullForm from './MaterialTypePullForm'
 import MaterialManagementService from '@/api/psi/MaterialManagementService'
 import UpLoadComponent from '@/views/common/UpLoadComponent'
-import UserPullForm from '@/views/finance/invoice/UserPullForm'
+import UserPullForm from '@/views/psiManagement/components/UserPullForm'
 import XEUtils from 'xe-utils'
 import SupplierService from '@/api/psi/SupplierService'
 export default {
@@ -412,7 +412,7 @@ export default {
 								}
 							}
 						}
-						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'psi')
 						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 						this.loading = false
 					})

+ 14 - 11
src/views/psiManagement/loss/LossForm.vue

@@ -28,13 +28,13 @@
 					<el-form-item label="报损时间" prop="lossDate"
 						:rules="[{ required: true, message: '请选择报损时间', trigger: 'blur' }]">
 						<el-date-picker v-model="inputForm.lossDate" type="date" value-format="YYYY-MM-DD"
-							style="width: 100%" placeholder="选择日期" />
+							style="width: 100%" placeholder="选择日期" :disabled="formReadOnly || method === 'view'" />
 					</el-form-item>
 				</el-col>
 				<el-col :span="24">
 					<el-form-item label="备注" prop="remarks">
 						<el-input v-model="inputForm.remarks" type="textarea" :rows="4" maxlength="500" show-word-limit
-							placeholder="请输入备注信息" />
+							:disabled="formReadOnly || method === 'view'" placeholder="请输入备注信息" />
 					</el-form-item>
 				</el-col>
 			</el-row>
@@ -58,7 +58,8 @@
 						<vxe-table-column field="recipientAgent" title="报损人" :edit-render="{}"
 							:rules="[{ required: true, message: '请选择报损人', trigger: 'blur' }]">
 							<template #edit="scope">
-								<el-input v-model="scope.row.recipientAgent" :disabled="formReadOnly"
+								<el-input v-model="scope.row.recipientAgent"
+									:disabled="formReadOnly || method === 'view'"
 									@focus="userPullListForm(scope.$rowIndex)" />
 							</template>
 						</vxe-table-column>
@@ -70,14 +71,14 @@
 						<vxe-table-column field="collectType" title="物品类型" :edit-render="{}"
 							:rules="[{ required: true, message: '请选择物品类型', trigger: 'blur' }]">
 							<template #edit="scope">
-								<el-input v-model="scope.row.collectType" :disabled="formReadOnly"
+								<el-input v-model="scope.row.collectType" :disabled="formReadOnly || method === 'view'"
 									@focus="typePullForm(scope.$rowIndex)" />
 							</template>
 						</vxe-table-column>
 						<vxe-table-column field="goodsName" title="物品名称" :edit-render="{}"
 							:rules="[{ required: true, message: '请选择物品名称', trigger: 'blur' }]">
 							<template #edit="scope">
-								<el-input v-model="scope.row.goodsName" :disabled="formReadOnly"
+								<el-input v-model="scope.row.goodsName" :disabled="formReadOnly || method === 'view'"
 									@focus="openPurchasePageForm(scope.$rowIndex, scope.row)" />
 							</template>
 						</vxe-table-column>
@@ -95,15 +96,16 @@
 						<vxe-table-column field="lossNumber" title="报损数量" :title-suffix="numberTitleSuffix"
 							:edit-render="{}" :rules="[{ required: true, message: '请输入报损数量', trigger: 'blur' }]">
 							<template #edit="scope">
-								<el-input v-model="scope.row.lossNumber" maxlength="10" :disabled="formReadOnly"
+								<el-input v-model="scope.row.lossNumber" maxlength="10"
+									:disabled="formReadOnly || method === 'view'"
 									@blur="handleLossNumberBlur(scope.row)" />
 							</template>
 						</vxe-table-column>
-						<vxe-table-column field="currentInventory" title="当前库存" :edit-render="{}">
+						<!-- <vxe-table-column field="currentInventory" title="当前库存" :edit-render="{}">
 							<template #edit="scope">
 								<el-input v-model="scope.row.currentInventory" disabled />
 							</template>
-						</vxe-table-column>
+						</vxe-table-column> -->
 						<vxe-table-column field="company" title="单位" :edit-render="{}"
 							:rules="[{ required: true, message: '请输入单位', trigger: 'blur' }]">
 							<template #edit="scope">
@@ -112,11 +114,11 @@
 						</vxe-table-column>
 						<vxe-table-column title="操作" width="220">
 							<template #default="scope">
-								<vxe-button size="small" status="danger" :disabled="formReadOnly"
+								<vxe-button size="small" status="danger" :disabled="formReadOnly || method === 'view'"
 									@click="removeEvent(scope.row, scope.$rowIndex)">
 									删除
 								</vxe-button>
-								<vxe-button size="small" status="primary" :disabled="formReadOnly"
+								<vxe-button size="small" status="primary" :disabled="formReadOnly || method === 'view'"
 									@click="openUpload(scope.$rowIndex)">
 									上传附件
 								</vxe-button>
@@ -269,8 +271,9 @@ export default {
 							this.inputForm = this.recover(this.createDefaultForm(), data);
 							this.inputForm.id = data.id;
 							this.inputForm.detailInfos = this.inputForm.detailInfos || [];
-							this.$refs.uploadComponent.newUpload(method, this.inputForm.files || [], "psi");
 							this.inputForm = JSON.parse(JSON.stringify(this.inputForm));
+
+							this.$refs.uploadComponent.newUpload(method, this.inputForm.files || [], "psi");
 						})
 						.finally(() => {
 							this.loading = false;

+ 1 - 1
src/views/psiManagement/loss/LossList.vue

@@ -35,7 +35,7 @@
 					<el-button v-if="hasPermission('psi:loss:add')" type="primary" icon="el-icon-plus" @click="start()">
 						新建
 					</el-button>
-					<el-button v-if="hasPermission('psi:loss:edit')" type="warning" icon="el-icon-plus"
+					<el-button v-if="hasPermission('psi:loss:edit')" type="warning" icon="el-icon-download"
 						@click="exportFile()">
 						导出
 					</el-button>

+ 3 - 15
src/views/psiManagement/loss/UpdateLossInfoForm.vue

@@ -1,23 +1,11 @@
 <template>
-	<el-dialog
-		v-model="visible"
-		:title="title"
-		width="1500px"
-		draggable
-		:close-on-click-modal="false"
-		@close="close"
-	>
+	<el-dialog v-model="visible" :title="title" width="1500px" draggable :close-on-click-modal="false" @close="close">
 		<LossForm ref="lossForm" @refreshDataList="handleRefresh" />
 		<template #footer>
 			<span class="dialog-footer">
 				<el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
-				<el-button
-					v-if="method !== 'view'"
-					type="primary"
-					icon="el-icon-circle-check"
-					v-noMoreClick
-					@click="submit"
-				>
+				<el-button v-if="method !== 'view'" type="primary" icon="el-icon-circle-check" v-noMoreClick
+					@click="submit">
 					确定
 				</el-button>
 			</span>

+ 2 - 2
src/views/psiManagement/purchase/PurchaseForm.vue

@@ -217,7 +217,7 @@ import SelectTree from '@/components/treeSelect/treeSelect.vue'
 import XEUtils from 'xe-utils'
 import CwProgramPageForm from '@/views/cw/reimbursementApproval/info/CwProgramPageForm'
 import MaterialTypePullForm from '../info/MaterialTypePullForm'
-import UserPullForm from '@/views/finance/invoice/UserPullForm'
+import UserPullForm from '@/views/psiManagement/components/UserPullForm'
 import SupplierService from '@/api/psi/SupplierService'
 import WareHouseService from '@/api/psi/WareHouseService'
 export default {
@@ -415,7 +415,7 @@ export default {
 								}
 							}
 						}
-						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
+						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'psi')
 						this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 						this.loading = false
 					} else {

+ 1 - 1
src/views/psiManagement/wareHouse/WareHouseAddForm.vue

@@ -302,7 +302,7 @@ import MaterialTypePullForm from '../info/MaterialTypePullForm'
 import MaterialManagementService from '@/api/psi/MaterialManagementService'
 import WareHouseService from '@/api/psi/WareHouseService'
 import UpLoadComponent from '@/views/common/UpLoadComponent'
-import UserPullForm from '@/views/finance/invoice/UserPullForm'
+import UserPullForm from '@/views/psiManagement/components/UserPullForm'
 import PurchaseChooseForm from './PurchaseChooseForm'
 import ContractChooseForm from '../contract/ContractChooseForm'
 import XEUtils from 'xe-utils'

+ 3 - 4
src/views/psiManagement/wareHouse/WareHouseHi.vue

@@ -29,9 +29,8 @@
 								value: 'id',             // ID字段名
 								label: 'name',         // 显示名称
 								children: 'children'    // 子级字段名
-							}" :url="`/system-server/sys/office/treeData?type=2`" :value="inputForm.handledByOffice"
-								:accordion="true" size="default"
-								@getValue="(value) => { inputForm.handledByOffice = value }" />
+							}" :url="`/system-server/sys/office/treeData?type=2`" :value="inputForm.handledByOffice" :accordion="true"
+								size="default" @getValue="(value) => { inputForm.handledByOffice = value }" />
 						</el-form-item>
 					</el-col>
 					<el-col :span="12">
@@ -167,7 +166,7 @@ import SelectTree from '@/components/treeSelect/treeSelect.vue'
 import XEUtils from 'xe-utils'
 import CwProgramPageForm from '@/views/cw/reimbursementApproval/info/CwProgramPageForm'
 import MaterialTypePullForm from '../info/MaterialTypePullForm'
-import UserPullForm from '@/views/finance/invoice/UserPullForm'
+import UserPullForm from '@/views/psiManagement/components/UserPullForm'
 export default {
 	data() {
 		return {

+ 1 - 1
src/views/psiManagement/wareHouse/WareHouseUpdateForm.vue

@@ -327,7 +327,7 @@ import SelectTree from '@/components/treeSelect/treeSelect.vue'
 import XEUtils from 'xe-utils'
 import CwProgramPageForm from '@/views/cw/reimbursementApproval/info/CwProgramPageForm'
 import MaterialTypePullForm from '../info/MaterialTypePullForm'
-import UserPullForm from '@/views/finance/invoice/UserPullForm'
+import UserPullForm from '@/views/psiManagement/components/UserPullForm'
 import SupplierService from '@/api/psi/SupplierService'
 export default {
 	data() {

+ 2 - 2
src/views/psiManagement/wareHouseSummary/WareHouseHistory.vue

@@ -115,8 +115,8 @@
 							</vxe-column>
 							<vxe-column min-width="160" align="center" title="领用数量" field="collectNumber">
 								<template #default="scope">
-									<span v-if="scope.row.collectNumber && scope.row.spec">{{
-										scope.row.collectNumber / scope.row.spec
+									<span v-if="scope.row.notSurplusStock && scope.row.spec">{{
+										scope.row.notSurplusStock / scope.row.spec
 									}}</span>
 									<span v-else>--</span>
 								</template>

+ 2 - 2
src/views/psiManagement/wareHouseSummary/WareHouseSummaryList.vue

@@ -61,8 +61,8 @@
 					<vxe-column min-width="160" align="center" title="总量" field="allNumber"></vxe-column>
 					<vxe-column min-width="160" align="center" title="领用量" field="borrowNumber">
 						<template #default="scope">
-							<span v-if="scope.row.borrowNumber">
-								{{ scope.row.borrowNumber / scope.row.spec }}
+							<span v-if="scope.row.notSurplusStock">
+								{{ scope.row.notSurplusStock / scope.row.spec }}
 							</span>
 							<span v-else>
 								0