소스 검색

景聚庭-商品管理新版细节完善

huangguoce 6 시간 전
부모
커밋
016dfea9d9

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

@@ -399,7 +399,7 @@
           files: [] // 附件信息
         }
         if (method === 'add') {
-          this.title = `新建入库信息`
+          this.title = `新建入库信息1`
         } else if (method === 'edit') {
           this.inputForm.id = id
           this.title = '修改入库信息'

+ 15 - 4
src/views/psiManagement/collect/CollectForm.vue

@@ -109,7 +109,7 @@
 								<el-input disabled v-model="scope.row.company"></el-input>
 							</template>
 						</vxe-table-column>
-						<vxe-table-column field="surplusNumber" title="当前库存数量">
+						<vxe-table-column field="surplusNumber" title="库存">
 							<!-- <template v-slot:edit="scope">
 								<el-input :disabled="true" v-model="scope.row.surplusNumber" maxlength="10"></el-input>
 							</template> -->
@@ -143,10 +143,10 @@
 								<vxe-button size="small" status="danger"
 									:disabled="method === 'view' || status == 'audit' || this.formReadOnly"
 									@click="removeEvent(scope.row, scope.$rowIndex, 'detail')">删除</vxe-button>
-								<vxe-button size="small" status="primary"
+								<vxe-button size="small" status="primary" v-show="false"
 									:disabled="method === 'view' || status == 'audit' || this.formReadOnly"
 									@click="sss(scope.$rowIndex)">上传附件</vxe-button>
-								<vxe-button size="small" status="primary"
+								<vxe-button v-show="false" size="small" status="primary"
 									v-if="method === 'view' || status == 'audit' || this.formReadOnly" :disabled="false"
 									@click="seeFileInfo(scope.$rowIndex)">查看文件详情</vxe-button>
 							</template>
@@ -263,7 +263,11 @@
 		<PurchasePageFormByOption ref="purchasePageFormByOption" @getProject="getContract1"></PurchasePageFormByOption>
 		<!-- 附件 -->
 		<MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
-		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+		<div v-show="method === 'view' || status == 'audit' || formReadOnly">
+			<div v-show="false">
+				<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			</div>
+		</div>
 		<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
 		<MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType"></MaterialTypePullForm>
 		<MaterialTypePullFormByOption ref="materialTypePullFormByOption" @getProgramForType="getProgramForType1">
@@ -911,6 +915,13 @@ export default {
 			this.$refs.materialTypePullFormByOption.init(uniqueTypes)
 		},
 		getProgramForType(rows) {
+			const exists = this.inputForm.detailInfos.some((item, index) => {
+				return String(index) !== String(this.indexRow) && String(item.collectTypeId) === String(rows.id)
+			})
+			if (exists) {
+				this.$message.warning('同种商品只能选择一次')
+				return
+			}
 			this.inputForm.detailInfos[this.indexRow].collectTypeId = rows.id
 			this.inputForm.detailInfos[this.indexRow].collectType = rows.name
 			this.inputForm.detailInfos[this.indexRow].goodsName = ''

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

@@ -113,7 +113,7 @@
 						<vxe-table-column field="remarks" title="备注" align="center"></vxe-table-column>
 						<vxe-table-column title="操作" width="170" align="center">
 							<template v-slot="scope">
-								<el-button size="small" type="primary" :disabled="false"
+								<el-button v-show="false" size="small" type="primary" :disabled="false"
 									@click="seeFileInfo(scope.$rowIndex)">附件</el-button>
 								<!-- <el-button size="small" type="primary"
 									v-if="scope.row.isReturn === '0' && status !== 'audit' && status !== 'taskFormDetail'"
@@ -141,7 +141,9 @@
 		<PurchasePageForm ref="purchasePageForm" @getProject="getContract"></PurchasePageForm>
 		<!-- 附件 -->
 		<MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
-		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+		<div v-show="false">
+				<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			</div>
 		<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
 		<MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType"></MaterialTypePullForm>
 		<UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>

+ 4 - 2
src/views/psiManagement/collect/CollectReturnHiForm.vue

@@ -100,7 +100,7 @@
 							<vxe-table-column field="remarks" title="备注" align="center"></vxe-table-column>
 							<vxe-table-column title="操作" width="170" align="center">
 								<template #default="scope">
-									<el-button type="primary" :disabled="false"
+									<el-button v-show="false" type="primary" :disabled="false"
 										@click="seeFileInfo(scope.$rowIndex)">附件</el-button>
 								</template>
 							</vxe-table-column>
@@ -121,7 +121,9 @@
 			<PurchasePageForm ref="purchasePageForm" @getProject="getContract"></PurchasePageForm>
 			<!-- 附件 -->
 			<MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
-			<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			<div v-show="false">
+				<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			</div>
 			<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
 			<MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType">
 			</MaterialTypePullForm>

+ 10 - 8
src/views/psiManagement/collect/UpdateCollectInfoForm.vue

@@ -70,8 +70,8 @@
 									<el-input :disabled='true' v-model="scope.row.recipientOffice"></el-input>
 								</template>
 							</vxe-table-column> -->
-							<vxe-table-column field="collectType" title="领用类型" :edit-render="{}"
-								:rules="[{ required: true, message: '请选择领用类型', trigger: 'blur' }]">
+							<vxe-table-column field="collectType" title="商品名称" :edit-render="{}"
+								:rules="[{ required: true, message: '请选择商品名称', trigger: 'blur' }]">
 								<template v-slot:edit="scope">
 									<el-input :disabled='true' v-model="scope.row.collectType"
 										@focus="typePullForm(scope.$rowIndex)"></el-input>
@@ -122,8 +122,8 @@
 							<vxe-table-column title="操作" width="180">
 								<template v-slot="scope">
 									<!--                <el-button :disabled='true' type="danger" v-if="method!=='view'" @click="removeEvent(scope.row,scope.$rowIndex,'detail')">删除</el-button>-->
-									<!--                <el-button :disabled='true' type="primary" v-if="method!=='view'" @click="sss(scope.$rowIndex)">上传附件</el-button>-->
-									<vxe-button status="primary" :disabled="false"
+									<!--                <el-button v-show="false" :disabled='true' type="primary" v-if="method!=='view'" @click="sss(scope.$rowIndex)">上传附件</el-button>-->
+									<vxe-button v-show="false" status="primary" :disabled="false"
 										@click="seeFileInfo(scope.$rowIndex)">查看文件详情</vxe-button>
 								</template>
 							</vxe-table-column>
@@ -214,7 +214,9 @@
 			<PurchasePageForm ref="purchasePageForm" @getProject="getContract"></PurchasePageForm>
 			<!-- 附件 -->
 			<MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
-			<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			<div v-show="false">
+				<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			</div>
 			<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
 			<MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType">
 			</MaterialTypePullForm>
@@ -352,13 +354,13 @@ export default {
 				files: [] // 附件信息
 			}
 			if (method === 'add') {
-				this.title = `新建领用类型`
+				this.title = `新建领用详情`
 			} else if (method === 'edit') {
 				this.inputForm.id = id
-				this.title = '修改领用类型'
+				this.title = '修改领用详情'
 			} else if (method === 'view') {
 				this.inputForm.id = id
-				this.title = '查看领用类型'
+				this.title = '查看领用详情'
 			}
 			this.visible = true
 			this.loading = false

+ 2 - 1
src/views/psiManagement/contract/ContractForm.vue

@@ -176,13 +176,14 @@
 						</el-form>
 					</el-row>
 				</el-tab-pane>
-				<el-tab-pane label="附件" name="files">
+				<el-tab-pane v-if="false" label="附件" name="files">
 					<!--        附件-->
 					<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
 				</el-tab-pane>
 
 
 			</el-tabs>
+			<UpLoadComponent v-show="false" ref="uploadComponent"></UpLoadComponent>
 		</el-form>
 	</div>
 </template>

+ 2 - 1
src/views/psiManagement/contract/UpdateContractInfoForm.vue

@@ -184,13 +184,14 @@
 							</el-form>
 						</el-row>
 					</el-tab-pane>
-					<el-tab-pane label="附件" name="files">
+					<el-tab-pane v-if="false" label="附件" name="files">
 						<!--        附件-->
 						<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
 					</el-tab-pane>
 
 
 				</el-tabs>
+				<UpLoadComponent v-show="false" ref="uploadComponent"></UpLoadComponent>
 			</el-form>
 			<template #footer>
 				<span class="dialog-footer">

+ 1 - 1
src/views/psiManagement/dishManage/library/DishLibraryForm.vue

@@ -86,7 +86,7 @@
 						</el-form-item>
 					</el-col>
 					<el-col :span="12">
-						<el-form-item label="菜品图片" prop="imageUrl">
+						<el-form-item v-if="false" label="菜品图片" prop="imageUrl">
 							<DishImageUpload ref="dishImageUpload" v-model="inputForm.imageUrl" :auth="method"
 								directory="dish" :max-size="10" :limit="9">
 							</DishImageUpload>

+ 1 - 1
src/views/psiManagement/foodPurchase/FoodPurchaseForm.vue

@@ -327,7 +327,7 @@
 				</el-col>
 			</el-row>
 		</el-form>
-		<UpLoadComponent ref="uploadComponent" />
+		<UpLoadComponent v-show="false" ref="uploadComponent" />
 	</div>
 </template>
 

+ 1 - 0
src/views/psiManagement/info/MaterialTypePullForm.vue

@@ -49,6 +49,7 @@ import TypeForm from '../materialType/TypeForm'
 export default {
 	data() {
 		const radioConfig = {
+			trigger: 'row',
 			checkMethod: ({ row }) => {
 				return row.infoType === '1' || row.infoType === 1
 			}

+ 1 - 0
src/views/psiManagement/info/MaterialTypePullFormByOption.vue

@@ -7,6 +7,7 @@
 					show-header-overflow show-overflow highlight-hover-row :menu-config="{}"
 					:sort-config="{ remote: true }" :data="dataList"
 					:tree-config="{ transform: true, rowField: 'collectTypeId', parentField: 'parentId', expandAll: true }"
+					:radio-config="{ trigger: 'row' }"
 					:checkbox-config="{}">
 					<vxe-column type="seq" width="60" title="序号"></vxe-column>
 					<!--          <vxe-column type="checkbox" width="40" ></vxe-column>-->

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

@@ -170,9 +170,9 @@
 								<template #default="scope">
 									<vxe-button status="danger" size="small" v-if="method !== 'view'"
 										@click="removeEvent(scope.row, scope.$rowIndex, 'detail')">删除</vxe-button>
-									<vxe-button status="primary" size="small" v-if="method !== 'view'"
+									<vxe-button status="primary" size="small" v-show="false" v-if="method !== 'view'"
 										@click="sss(scope.$rowIndex)">上传附件</vxe-button>
-									<vxe-button status="primary" size="small" v-if="method === 'view'" :disabled="false"
+									<vxe-button status="primary" size="small" v-show="false" v-if="method === 'view'" :disabled="false"
 										@click="seeFileInfo(scope.$rowIndex)">查看文件详情</vxe-button>
 									<!--              <el-button  v-if="formReadOnly" :disabled="false" type="primary" @click="seeFileInfo(scope.$rowIndex)">查看文件详情</el-button>-->
 								</template>
@@ -235,7 +235,7 @@
 
 			</el-form>
 			<!-- 附件 -->
-			<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			<UpLoadComponent v-show="false" ref="uploadComponent"></UpLoadComponent>
 			<MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
 			<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
 			<MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType">

+ 1 - 6
src/views/psiManagement/materialType/TypeForm.vue

@@ -154,12 +154,7 @@ export default {
 					this.loading = true
 					this.materialTypeService.save(this.inputForm).then((data) => {
 						const result = this.getResponseData(data)
-						if (result === false || result === 'false') {
-							this.close()
-							this.$message.error('物资名称重复,请重新填写')
-							this.$emit('refreshDataList')
-							this.loading = false
-						} else if (result === '商品节点下不能新增下级') {
+						if (result === '商品节点下不能新增下级') {
 							this.$message.error(result)
 							this.loading = false
 						} else {

+ 13 - 6
src/views/psiManagement/purchase/PurchaseForm.vue

@@ -196,10 +196,10 @@
 								<vxe-button size="small" :disabled="status === 'audit' || status === 'taskFormDetail'"
 									status="danger"
 									@click="removeEvent(scope.row, scope.$rowIndex, 'detail')">删除</vxe-button>
-								<vxe-button size="small" status="primary"
+								<vxe-button size="small" status="primary" v-show="false"
 									:disabled="status === 'audit' || status === 'taskFormDetail'"
 									@click="sss(scope.$rowIndex)">上传附件</vxe-button>
-								<vxe-button size="small" status="primary"
+								<vxe-button size="small" status="primary" v-show="false"
 									v-if="status === 'audit' || status === 'taskFormDetail'" :disabled="false"
 									@click="seeFileInfo(scope.$rowIndex)">查看文件详情</vxe-button>
 							</template>
@@ -212,7 +212,7 @@
 		</el-form>
 		<!-- 附件 -->
 		<MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
-		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+		<UpLoadComponent v-show="false" ref="uploadComponent"></UpLoadComponent>
 		<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
 		<MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType"></MaterialTypePullForm>
 		<!--      <CwReimbursementTypePullForm ref="cwReimbursementTypePullForm" @getProgramForType="getProgramForType"></CwReimbursementTypePullForm>-->
@@ -626,10 +626,10 @@ export default {
 						}
 						for (let j = 0; j < i; j++) {
 							for (let k = j + 1; k < i; k++) {
-								if (this.inputForm.detailInfos[j].procurementType === this.inputForm.detailInfos[k].procurementType) { // 如果采购类型相同
-									this.$message.warning(`采购详情中,同种商品名称只能输入一条`)
+								if (String(this.inputForm.detailInfos[j].procurementTypeId) === String(this.inputForm.detailInfos[k].procurementTypeId)) { // 如果采购类型相同
+									this.$message.warning(`采购详情中,同种商品只能输入一条`)
 									this.loading = false
-									throw new Error('采购详情中,同种商品名称只能输入一条')
+									throw new Error('采购详情中,同种商品只能输入一条')
 								}
 							}
 						}
@@ -840,6 +840,13 @@ export default {
 			this.$refs.materialTypePullForm.init()
 		},
 		getProgramForType(rows) {
+			const exists = this.inputForm.detailInfos.some((item, index) => {
+				return String(index) !== String(this.indexRow) && String(item.procurementTypeId) === String(rows.id)
+			})
+			if (exists) {
+				this.$message.warning('同种商品只能选择一次')
+				return
+			}
 			this.inputForm.detailInfos[this.indexRow].procurementTypeId = rows.id
 			this.inputForm.detailInfos[this.indexRow].procurementType = rows.name
 			this.inputForm.detailInfos[this.indexRow].tradeName = rows.name

+ 1 - 1
src/views/psiManagement/supplier/SupplierForm.vue

@@ -198,7 +198,7 @@
 				</el-col>
 			</el-row>
 			<!--    附件-->
-			<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			<UpLoadComponent v-show="false" ref="uploadComponent"></UpLoadComponent>
 			<template #footer>
 				<span class="dialog-footer">
 					<el-button :loading="loading" @click="close()" icon="el-icon-circle-close">关闭</el-button>

+ 16 - 5
src/views/psiManagement/wareHouse/WareHouseAddForm.vue

@@ -78,9 +78,9 @@
 								<vxe-column min-width="100" align="center" field="remarks" title="备注"></vxe-column>
 								<vxe-column align="center" title="操作" fixed="right" width="150">
 									<template v-slot="scope">
-										<vxe-button size="small" v-if="method === 'purchaseAdd'" status="primary"
-											:disabled="false" @click="wareHouseAdd(scope.$rowIndex)">入库</vxe-button>
 										<vxe-button size="small" status="primary" :disabled="false"
+											@click="wareHouseAdd(scope.$rowIndex)">入库</vxe-button>
+										<vxe-button v-show="false" size="small" status="primary" :disabled="false"
 											@click="seeFileInfo(scope.$rowIndex)">附件</vxe-button>
 									</template>
 								</vxe-column>
@@ -251,9 +251,9 @@
 							</vxe-table-column>
 							<vxe-table-column align="center" fixed="right" title="操作" width="220px">
 								<template v-slot="scope">
-									<vxe-button status="primary" v-show="method === 'view'" :disabled="false"
+									<vxe-button status="primary" v-show="false" :disabled="false"
 										@click="seeFileInfo2(scope.$rowIndex)">查看附件</vxe-button>
-									<vxe-button status="primary" v-if="method !== 'view'"
+									<vxe-button status="primary" v-if="method !== 'view'" v-show="false"
 										@click="sss2(scope.$rowIndex)">上传附件</vxe-button>
 									<vxe-button status="danger" v-if="method !== 'view'"
 										@click="removeEvent(scope.row, scope.$rowIndex, 'detail')">删除</vxe-button>
@@ -266,7 +266,11 @@
 			</el-form>
 			<!-- 附件 -->
 			<UpdateInfoForm ref="updateInfoForm"></UpdateInfoForm>
-			<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			<div v-show="method === 'view'">
+				<div v-show="false">
+				<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			</div>
+			</div>
 			<MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
 			<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
 			<MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType">
@@ -562,6 +566,13 @@ export default {
 			this.$forceUpdate()
 		},
 		getProgramForType(rows) {
+			const exists = this.inputForm.wareHouse.some((item, index) => {
+				return String(index) !== String(this.indexRow) && String(item.wareHouseTypeId) === String(rows.id)
+			})
+			if (exists) {
+				this.$message.warning('同种商品只能选择一次')
+				return
+			}
 			this.inputForm.wareHouse[this.indexRow].wareHouseTypeId = rows.id
 			this.inputForm.wareHouse[this.indexRow].wareHouseType = rows.name
 			this.inputForm.wareHouse[this.indexRow].tradeName = rows.name

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

@@ -82,7 +82,7 @@
 							<vxe-column min-width="100" align="center" field="remarks" title="备注"></vxe-column>
 							<vxe-column align="center" title="操作" fixed="right" width="80">
 								<template v-slot="scope">
-									<el-button size="small" type="primary" :disabled="false"
+									<el-button v-show="false" size="small" type="primary" :disabled="false"
 										@click="seeFileInfo(scope.$rowIndex)" plain>附件</el-button>
 								</template>
 							</vxe-column>
@@ -122,7 +122,7 @@
 						<vxe-column min-width="100px" align="center" field="remarks" title="备注"></vxe-column>
 						<vxe-column align="center" fixed="right" title="操作" width="80px">
 							<template v-slot="scope">
-								<el-button size="small" type="primary" v-if="scope.row.upFlag !== '1'" :disabled="false"
+								<el-button v-show="false" size="small" type="primary" v-if="scope.row.upFlag !== '1'" :disabled="false"
 									@click="seeFileInfo2(scope.$rowIndex)" plain>附件</el-button>
 							</template>
 						</vxe-column>
@@ -142,7 +142,9 @@
 			<MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
 			<UpdateInfoForm ref="updateInfoForm"></UpdateInfoForm>
 			<PurchaseChooseForm ref="purchaseChooseForm" @getProject="getContract"></PurchaseChooseForm>
-			<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			<div v-show="false">
+				<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			</div>
 			<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
 			<MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType">
 			</MaterialTypePullForm>

+ 15 - 4
src/views/psiManagement/wareHouse/WareHouseUpdateForm.vue

@@ -81,7 +81,7 @@
 							<vxe-column min-width="100" align="center" field="remarks" title="备注"></vxe-column>
 							<vxe-column align="center" title="操作" fixed="right" width="80">
 								<template v-slot="scope">
-									<vxe-button status="primary" size="small" :disabled="false"
+									<vxe-button v-show="false" status="primary" size="small" :disabled="false"
 										@click="seeFileInfo(scope.$rowIndex)" plain>附件</vxe-button>
 								</template>
 							</vxe-column>
@@ -135,7 +135,7 @@
 						<vxe-column min-width="110px" align="center" field="remarks" title="备注"></vxe-column>
 						<vxe-column align="center" fixed="right" title="操作" width="80px">
 							<template v-slot="scope">
-								<vxe-button status="primary" size="small" v-if="scope.row.upFlag !== '1'"
+								<vxe-button v-show="false" status="primary" size="small" v-if="scope.row.upFlag !== '1'"
 									:disabled="false" @click="seeFileInfo2(scope.$rowIndex)" plain>附件</vxe-button>
 							</template>
 						</vxe-column>
@@ -301,7 +301,7 @@
 							<template v-slot="scope">
 								<el-button size="small" type="primary"
 									@click="updateWareHouse(scope.$rowIndex)">修改</el-button>
-								<el-button size="small" type="primary" @click="sss2(scope.$rowIndex)">上传附件</el-button>
+								<el-button size="small" type="primary" v-show="false" @click="sss2(scope.$rowIndex)">上传附件</el-button>
 								<el-button size="small" type="danger"
 									@click="removeEvent(scope.row, scope.$rowIndex, 'detail')">删除</el-button>
 							</template>
@@ -323,7 +323,11 @@
 		<MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
 		<UpdateInfoForm ref="updateInfoForm"></UpdateInfoForm>
 		<PurchaseChooseForm ref="purchaseChooseForm" @getProject="getContract"></PurchaseChooseForm>
-		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+		<div v-show="method === 'view'">
+			<div v-show="false">
+				<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+			</div>
+		</div>
 		<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
 		<MaterialTypePullForm ref="materialTypePullForm" @getProgramForType="getProgramForType"></MaterialTypePullForm>
 		<UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
@@ -915,6 +919,13 @@ export default {
 			this.$forceUpdate()
 		},
 		getProgramForType(rows) {
+			const exists = this.inputForm.wareHouse.some((item, index) => {
+				return String(index) !== String(this.indexRow) && String(item.wareHouseTypeId) === String(rows.id)
+			})
+			if (exists) {
+				this.$message.warning('同种商品只能选择一次')
+				return
+			}
 			this.inputForm.wareHouse[this.indexRow].wareHouseTypeId = rows.id
 			this.inputForm.wareHouse[this.indexRow].wareHouseType = rows.name
 			this.inputForm.wareHouse[this.indexRow].tradeName = rows.name