领料配件上传图片由员工上传改仓库上传

This commit is contained in:
xiaofajia 2024-11-23 14:51:04 +08:00
parent 287d393c05
commit 0bb87c2f67
2 changed files with 32 additions and 11 deletions

View File

@ -94,7 +94,7 @@
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="type" @click="handlePass"
<el-button type="primary" v-if="type" @click="handlePassBefore"
:disabled="allSelectRows.length === 0 || allSelectRows.filter(item => !item.isStock).length !== 0">
通知领料
</el-button>
@ -244,6 +244,14 @@
</div>
</el-dialog>
<el-dialog title="图片上传" :visible.sync="inPhoto" width="40%" v-dialogDrag append-to-body>
<ImageUpload v-model="images" />
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handlePass">确定</el-button>
<el-button type="primary" @click="inPhoto = false">取消</el-button>
</div>
</el-dialog>
<TicketWaresShow ref="ticketWaresShow" :user-role="'repair_warehouse'" @success="getList" :type="false"/>
</div>
</template>
@ -308,7 +316,9 @@ export default {
},
typeMap: null,
allSelectRows: [],
isRefresh: false
isRefresh: false,
inPhoto: false,
images: null
}
},
mounted() {
@ -376,8 +386,18 @@ export default {
getDictDatasToType(type) {
return this.getDictDatas(type)
},
handlePassBefore(){
this.images = null
this.inPhoto = true
},
// truefalse
async handlePass() {
if (this.images){
this.formData.images = this.images.split(",").map(item => {
return item.replace(process.env.VUE_APP_FILE_API, "")
}).join(",")
}
// 退
this.formData.repairSo = {
soType: this.type ? "02" : "04",
@ -408,6 +428,7 @@ export default {
await this.getList()
} finally {
this.dialogVisible = false
this.inPhoto = false
}
},
// truefalse

View File

@ -49,15 +49,15 @@
<!-- <el-table-column label="规格" align="center" prop="repairWares.model" />-->
<el-table-column label="数量" align="center" prop="goodsCount" />
</el-table>
<el-form style="margin-top: 1rem" :inline="true">
<el-row :gutter="1">
<el-col :span="24">
<el-form-item label="图片" prop="image">
<ImageUpload v-model="image" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- <el-form style="margin-top: 1rem" :inline="true">-->
<!-- <el-row :gutter="1">-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="图片" prop="image">-->
<!-- <ImageUpload v-model="image" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-form>-->
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleConfirm">
确认