Browse Source

页面修改

master
yangpeilai 2 months ago
parent
commit
551b753c69

+ 27
- 30
src/views/inventoryControl/newInventory/allocationManagement/addOrUpdate.vue View File

<el-col :span="12"> <el-col :span="12">
<el-form-item label="发货仓库" prop="sendStoreCode"> <el-form-item label="发货仓库" prop="sendStoreCode">
<el-select v-model="addForm.sendStoreCode" placeholder="请选择" :disabled="typeOption === 'view' || typeOption === 'sure'" <el-select v-model="addForm.sendStoreCode" placeholder="请选择" :disabled="typeOption === 'view' || typeOption === 'sure'"
@change="changeStore">
@change="changeStore(1)">
<el-option v-for="item in props.storeList" :key="item.value" :label="item.name" :value="item.code"/> <el-option v-for="item in props.storeList" :key="item.value" :label="item.name" :value="item.code"/>
</el-select> </el-select>
</el-form-item> </el-form-item>


<el-col :span="12" v-if="addForm.inventoryType === 'OBU'"> <el-col :span="12" v-if="addForm.inventoryType === 'OBU'">
<el-form-item label="签类型" prop="obuType" v-if="addForm.inventoryType === 'OBU'"> <el-form-item label="签类型" prop="obuType" v-if="addForm.inventoryType === 'OBU'">
<el-select clearable v-model="addForm.obuType" placeholder="请选择签类型">
<el-select clearable v-model="addForm.obuType" placeholder="请选择签类型" :disabled="typeOption === 'view' || typeOption === 'sure'">
<el-option v-for="item in obuType" :key="item.value" :label="item.label" <el-option v-for="item in obuType" :key="item.value" :label="item.label"
:value="item.value" :disabled="typeOption === 'view' || typeOption === 'sure'"/> :value="item.value" :disabled="typeOption === 'view' || typeOption === 'sure'"/>
</el-select> </el-select>
<el-button class="op-btn" type="primary" <el-button class="op-btn" type="primary"
@click="validHandle(scope.row, scope.$index)">校验 @click="validHandle(scope.row, scope.$index)">校验
</el-button> </el-button>
<el-button class="op-btn" type="primary" @click="validDetailHandle(scope.row)"
v-if="scope.row.isShowBtn">校验失败明细
</el-button>
<!-- <el-button class="op-btn" type="primary" @click="validDetailHandle(scope.row)" v-if="scope.row.isShowBtn">校验失败明细</el-button>-->
<el-button class="op-btn" type="danger" v-if="scope.$index > 0" <el-button class="op-btn" type="danger" v-if="scope.$index > 0"
@click="deleteHandle(scope.row, scope.$index)">删除 @click="deleteHandle(scope.row, scope.$index)">删除
</el-button> </el-button>
</el-form> </el-form>
<div class="btn-wrap"> <div class="btn-wrap">
<el-button type="primary" @click="backHandle">关闭</el-button> <el-button type="primary" @click="backHandle">关闭</el-button>
<el-button type="primary" v-if="typeOption === 'add' || typeOption === 'edit'" @click="saveHandle"
v-loading="btnLoding">调拨保存
</el-button>
<el-button type="primary" v-if="typeOption === 'sure'" @click="sureHandle"
v-loading="btnLoding">确认入库
</el-button>
<el-button type="primary" v-if="typeOption === 'add' || typeOption === 'edit'" @click="saveHandle">调拨保存</el-button>
<el-button type="primary" v-if="typeOption === 'sure'" @click="sureHandle">确认入库</el-button>
</div> </div>
</div> </div>
</template> </template>
"refreshDataList" "refreshDataList"
]) ])
const handleChange = (value) => { const handleChange = (value) => {
console.log(value)
// console.log(value)
} }
const handleRemove = (file) => { const handleRemove = (file) => {
const index = fileList.value.indexOf(file); const index = fileList.value.indexOf(file);
if (index !== -1) { if (index !== -1) {
fileList.value.splice(index, 1); fileList.value.splice(index, 1);
fileListData.value.splice(index, 1); fileListData.value.splice(index, 1);
console.log(fileListData.value, 'fileListData.valuefileListData.value')
// console.log(fileListData.value, 'fileListData.valuefileListData.value')
} }
}; };
const beforeUpload = (file) => { const beforeUpload = (file) => {
return true; return true;
}; };
const handleSuccess = (response: any) => { const handleSuccess = (response: any) => {
console.log(fileList.value, 'fileListfileList')
console.log(response.data, 'response.dataresponse.data')
// console.log(fileList.value, 'fileListfileList')
// console.log(response.data, 'response.dataresponse.data')
fileListData.value.push(response.data.ossFilePath) fileListData.value.push(response.data.ossFilePath)
console.log(fileListData.value, 'fileListData.valuefileListData.value')
// console.log(fileListData.value, 'fileListData.valuefileListData.value')
}; };
const handlePreview = (file) => { const handlePreview = (file) => {
const isImage = file.type && file.type.includes('image'); const isImage = file.type && file.type.includes('image');
} }
const templateDownload = () => { const templateDownload = () => {
let url = import.meta.env.VITE_APP_UPLOAD_URL + 'zhywpt-issuer/template/invw/设备备货号段导入模板.xlsx'; let url = import.meta.env.VITE_APP_UPLOAD_URL + 'zhywpt-issuer/template/invw/设备备货号段导入模板.xlsx';
console.log(url, 'bizContent.exportExcelUrlbizContent.exportExcelUrl')
// console.log(url, 'bizContent.exportExcelUrlbizContent.exportExcelUrl')
BaseService.getDownload(url, '设备备货号段导入模板') BaseService.getDownload(url, '设备备货号段导入模板')
} }
const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile) => { const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile) => {
upload.value!.submit() upload.value!.submit()
} }


function changeStore(){
function changeStore(flag){
let code = addForm.value.sendStoreCode; let code = addForm.value.sendStoreCode;
if(code !== '' && code !== undefined && code !== null) { if(code !== '' && code !== undefined && code !== null) {
let params = { let params = {
if (res && res.code === 0) { if (res && res.code === 0) {
let bizContent = res.data let bizContent = res.data
receiveStoreList.value = bizContent.idNames receiveStoreList.value = bizContent.idNames
addForm.value.receiveStoreCode=null;
if(flag === 1){
addForm.value.receiveStoreCode=null;
}
} }
}) })
} }
...data, ...data,
detailList: list detailList: list
} }
changeStore();
// console.log(addForm.value, '=============------------=========='); // console.log(addForm.value, '=============------------==========');


//addForm.value.detailList = list; //addForm.value.detailList = list;
let idex = '' let idex = ''


function onSuccess(response: any) { function onSuccess(response: any) {
console.log(response)
BaseService.postN('/invw/api/transfer/import', {url: response.data.ossFilePath}).then((res: any) => {
// console.log(response)
BaseService.postN('/invw/api/transfer/import', {fileUrl: response.data.ossFilePath}).then((res: any) => {
if (res && res.code === 0) { if (res && res.code === 0) {
let bizContent = JSON.parse(res.bizContent);
console.log(bizContent)
let info = bizContent.info || "";
let data = bizContent.data
let bizContent = res.data;
// console.log(bizContent)
let info = bizContent.transferDetails || "";
let data = bizContent.transferDetails
let newarr: any = [] let newarr: any = []
data.forEach((column, index) => { data.forEach((column, index) => {


} }
list.push(tem); list.push(tem);
}) })
console.log(params);
// console.log(params);


let params2 = {} let params2 = {}
params2.brand = params.brand; params2.brand = params.brand;
params2.obuType = params.obuType; params2.obuType = params.obuType;
params2.filePath = fileListData.value[0]; params2.filePath = fileListData.value[0];
let api = '/invw/api/transfer/add'; let api = '/invw/api/transfer/add';
console.log("typeOption.value", typeOption.value)
// console.log("typeOption.value", typeOption.value)
if (typeOption.value === 'add') { if (typeOption.value === 'add') {
delete params2.id delete params2.id
} }
clearData(); clearData();
emit("refreshDataList"); emit("refreshDataList");
emit("closeHandle"); emit("closeHandle");
ElMessage.success("备货保存成功");
ElMessage.success("保存成功");
} else { } else {
btnLoding.value = false; btnLoding.value = false;
ElMessage.error(res.message); ElMessage.error(res.message);


// 获取仓库状态 // 获取仓库状态
function getLowerList() { function getLowerList() {
console.log("获取仓库列表")
// console.log("获取仓库列表")
let params = { let params = {
allType: 0 allType: 0
} }


// 获取仓库状态 // 获取仓库状态
function getAgency() { function getAgency() {
console.log("获取产权列表")
// console.log("获取产权列表")
BaseService.postN('/invw/agency/list').then((res: any) => { BaseService.postN('/invw/agency/list').then((res: any) => {
if (res && res.code === 0) { if (res && res.code === 0) {
let bizContent = res.data let bizContent = res.data

+ 32
- 26
src/views/inventoryControl/newInventory/allocationManagement/index.vue View File

</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="inventoryType" label="采购设备类型" min-width="100">
<el-table-column prop="inventoryType" label="设备类型" min-width="80">
<template v-slot="scope"> <template v-slot="scope">
<span>{{ getDictLabel(inventoryType, scope.row.inventoryType) }}</span> <span>{{ getDictLabel(inventoryType, scope.row.inventoryType) }}</span>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="applyCount" label="备货数量" width="80"></el-table-column> <el-table-column prop="applyCount" label="备货数量" width="80"></el-table-column>
<el-table-column prop="applyTime" label="申请时间" width="170"></el-table-column>
<el-table-column prop="applyStatus" label="状态" width="80"> <el-table-column prop="applyStatus" label="状态" width="80">
<template v-slot="scope"> <template v-slot="scope">
<el-tag :type="scope.row.applyStatus === 'CANCEL' ? 'danger' : scope.row.applyStatus === 'NEW'?'success':''"> <el-tag :type="scope.row.applyStatus === 'CANCEL' ? 'danger' : scope.row.applyStatus === 'NEW'?'success':''">
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="applyTime" label="申请时间" width="170"></el-table-column>
<el-table-column label="操作" width="250" fixed="right"> <el-table-column label="操作" width="250" fixed="right">
<template v-slot="scope"> <template v-slot="scope">
<el-button size="small" type="success" class="op-btn" @click="editHandle(scope.row)" v-if=" (scope.row.applyStatus === 'NEW')">修改</el-button> <el-button size="small" type="success" class="op-btn" @click="editHandle(scope.row)" v-if=" (scope.row.applyStatus === 'NEW')">修改</el-button>
<el-dialog v-model="cancelOrderDialog" width="30%" title="取消订单"> <el-dialog v-model="cancelOrderDialog" width="30%" title="取消订单">
<el-form ref="cancelOrderFormRef" :model="cancelOrderForm" :rules="{ <el-form ref="cancelOrderFormRef" :model="cancelOrderForm" :rules="{
cancelReason: [ cancelReason: [
{ required: true, message: '取消原因不能为空', trigger: 'change' },
{ required: true, message: '取消原因不能为空', trigger: 'blur' },
], ],
}" label-width="80px"> }" label-width="80px">
<el-form-item label="取消原因" prop="cancelReason"> <el-form-item label="取消原因" prop="cancelReason">
cancelReason: '' cancelReason: ''
}) })
const addUpdateRef = ref() const addUpdateRef = ref()
const cancelOrderFormRef = ref()
const state = reactive({ const state = reactive({
tableData: [] as IObject[], tableData: [] as IObject[],
searchForm: {}, searchForm: {},


// 删除 // 删除
function deleteHandle(row: IObject) { function deleteHandle(row: IObject) {
ElMessageBox.confirm('确定要取消调拨么?', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
let reason = cancelOrderForm.value.cancelReason
cancelOrderFormRef.value.validate((valid) => {
if (valid) {
ElMessageBox.confirm('确定要取消调拨么?', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
}).then(() => {
BaseService.postN('/invw/api/transfer/cancelIn', {
id: rowData.value.id,
reason: reason
}).then(
(res: any) => {
if (res && res.code === 0) {
getList()
cancelOrderDialog.value = false
ElMessage.success('取消调拨成功')
} else {
ElMessage.error(res.message)
}
}
)
})
.catch(() => {
console.log('取消')
})
}
}) })
.then(() => {
BaseService.postN('/invw/api/transfer/cancelIn', {
id: rowData.value.id,
reason: cancelOrderForm.value.cancelReason
}).then(
(res: any) => {
if (res && res.code === 0) {
getList()
cancelOrderDialog.value = false
ElMessage.success('取消调拨成功')
} else {
ElMessage.error(res.message)
}
}
)
})
.catch(() => {
console.log('取消')
})

} }


// 恢复备货 // 恢复备货

+ 1
- 1
src/views/inventoryControl/newInventory/warehouseManagement/data.js View File

operateFixed: true, //操作栏是否固定(默认false) operateFixed: true, //操作栏是否固定(默认false)
operateWidth: "140", //操作栏宽度 operateWidth: "140", //操作栏宽度
operate: { operate: {
edit: true, //是否编辑(默认true) IsPermission(route, 'EDIT_LIST')
edit: false, //是否编辑(默认true) IsPermission(route, 'EDIT_LIST')
info: false, //是否编辑(默认true) IsPermission(route, 'INFO_LIST') info: false, //是否编辑(默认true) IsPermission(route, 'INFO_LIST')
delete: false, //是否删除(默认true) IsPermission(route, 'DEL_LIST') delete: false, //是否删除(默认true) IsPermission(route, 'DEL_LIST')
announcement: false, // 公告 announcement: false, // 公告

+ 17
- 4
src/views/inventoryControl/newInventory/warehouseManagement/index.vue View File

end-placeholder="结束日期" format="YYYY-MM-DD" value-format="YYYY-MM-DD" @change="dateChangeHandle" style="width: 250px"/> end-placeholder="结束日期" format="YYYY-MM-DD" value-format="YYYY-MM-DD" @change="dateChangeHandle" style="width: 250px"/>
</template> </template>
<template #operation="{scope}"> <template #operation="{scope}">
<el-button type="success" size="small" @click="showInfo(scope.$index, scope.row)">详情</el-button>
<el-button v-if="scope.row.code!=='5201010304001900000'" type="success" size="small" @click="toEdit(scope.row)">修改</el-button>
<el-button type="primary" size="small" @click="showInfo(scope.$index, scope.row)">详情</el-button>
</template> </template>
<template #isCheck="item"> <template #isCheck="item">
<!-- @vue-ignore --> <!-- @vue-ignore -->
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, watch } from 'vue'
import { ref, onMounted, watch, nextTick, toRaw } from 'vue'
// @ts-ignore crudFrom模板 // @ts-ignore crudFrom模板
import CrudTemplate from '@/crud/index.vue' import CrudTemplate from '@/crud/index.vue'
import BaseService from '@/utils/baseService' //引入接口请求 import BaseService from '@/utils/baseService' //引入接口请求
} }
function getUpperWarehouseIdList() { function getUpperWarehouseIdList() {
BaseService.post('/invw/api/warehouse/getWarehouseIdNames', { BaseService.post('/invw/api/warehouse/getWarehouseIdNames', {
"id": "",
"type": ""
"id": "9999",
"type": "8"
}).then((res: any) => { }).then((res: any) => {
if (res && res.statusCode === 0) { if (res && res.statusCode === 0) {
//数据转换 .agencyQueryAllModels //数据转换 .agencyQueryAllModels
} }
} }
} }
// 修改
function toEdit(row) {
const data: any = toRaw(row)
crudRef.value.dialogFormVisible = true
crudRef.value.title = '编辑'
nextTick(() => {
crudRef.value.form={
...data
}
})
}

//详情 //详情
function showInfo(idx: any, row: any) { function showInfo(idx: any, row: any) {
let labels = field.value.field let labels = field.value.field

+ 2
- 0
src/views/onlineBusinessHall/orderManagement/orderReview/index.vue View File

if (autdis.auditStatus == 'true') { if (autdis.auditStatus == 'true') {
autdisReasonType.value = '' autdisReasonType.value = ''
autdis.reason = '' autdis.reason = ''
autdis.orderNo = beanData.orderNo
// autdis.reason1 = '' // autdis.reason1 = ''
} }
console.log("autdis", autdis)
BaseService.postN('/managew/api/issue/orderExamine/examine', autdis).then((res: any) => { BaseService.postN('/managew/api/issue/orderExamine/examine', autdis).then((res: any) => {
if (res && res.code === 0) { if (res && res.code === 0) {
ElMessage.success(res.message) ElMessage.success(res.message)

Loading…
Cancel
Save