|
|
@@ -68,7 +68,7 @@ |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="发货仓库" prop="sendStoreCode"> |
|
|
|
<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-select> |
|
|
|
</el-form-item> |
|
|
@@ -84,7 +84,7 @@ |
|
|
|
|
|
|
|
<el-col :span="12" 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" |
|
|
|
:value="item.value" :disabled="typeOption === 'view' || typeOption === 'sure'"/> |
|
|
|
</el-select> |
|
|
@@ -212,9 +212,7 @@ |
|
|
|
<el-button class="op-btn" type="primary" |
|
|
|
@click="validHandle(scope.row, scope.$index)">校验 |
|
|
|
</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" |
|
|
|
@click="deleteHandle(scope.row, scope.$index)">删除 |
|
|
|
</el-button> |
|
|
@@ -231,12 +229,8 @@ |
|
|
|
</el-form> |
|
|
|
<div class="btn-wrap"> |
|
|
|
<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> |
|
|
|
</template> |
|
|
@@ -273,14 +267,14 @@ const emit = defineEmits([ |
|
|
|
"refreshDataList" |
|
|
|
]) |
|
|
|
const handleChange = (value) => { |
|
|
|
console.log(value) |
|
|
|
// console.log(value) |
|
|
|
} |
|
|
|
const handleRemove = (file) => { |
|
|
|
const index = fileList.value.indexOf(file); |
|
|
|
if (index !== -1) { |
|
|
|
fileList.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) => { |
|
|
@@ -294,10 +288,10 @@ const beforeUpload = (file) => { |
|
|
|
return true; |
|
|
|
}; |
|
|
|
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) |
|
|
|
console.log(fileListData.value, 'fileListData.valuefileListData.value') |
|
|
|
// console.log(fileListData.value, 'fileListData.valuefileListData.value') |
|
|
|
}; |
|
|
|
const handlePreview = (file) => { |
|
|
|
const isImage = file.type && file.type.includes('image'); |
|
|
@@ -342,7 +336,7 @@ const initForm = { |
|
|
|
} |
|
|
|
const templateDownload = () => { |
|
|
|
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, '设备备货号段导入模板') |
|
|
|
} |
|
|
|
const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile) => { |
|
|
@@ -424,7 +418,7 @@ const handleExceed: UploadProps['onExceed'] = (files) => { |
|
|
|
upload.value!.submit() |
|
|
|
} |
|
|
|
|
|
|
|
function changeStore(){ |
|
|
|
function changeStore(flag){ |
|
|
|
let code = addForm.value.sendStoreCode; |
|
|
|
if(code !== '' && code !== undefined && code !== null) { |
|
|
|
let params = { |
|
|
@@ -436,7 +430,9 @@ function changeStore(){ |
|
|
|
if (res && res.code === 0) { |
|
|
|
let bizContent = res.data |
|
|
|
receiveStoreList.value = bizContent.idNames |
|
|
|
addForm.value.receiveStoreCode=null; |
|
|
|
if(flag === 1){ |
|
|
|
addForm.value.receiveStoreCode=null; |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
@@ -510,6 +506,7 @@ function getInfo(id: string) { |
|
|
|
...data, |
|
|
|
detailList: list |
|
|
|
} |
|
|
|
changeStore(); |
|
|
|
// console.log(addForm.value, '=============------------=========='); |
|
|
|
|
|
|
|
//addForm.value.detailList = list; |
|
|
@@ -524,13 +521,13 @@ function getInfo(id: string) { |
|
|
|
let idex = '' |
|
|
|
|
|
|
|
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) { |
|
|
|
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 = [] |
|
|
|
data.forEach((column, index) => { |
|
|
|
|
|
|
@@ -796,7 +793,7 @@ function saveHandle() { |
|
|
|
} |
|
|
|
list.push(tem); |
|
|
|
}) |
|
|
|
console.log(params); |
|
|
|
// console.log(params); |
|
|
|
|
|
|
|
let params2 = {} |
|
|
|
params2.brand = params.brand; |
|
|
@@ -809,7 +806,7 @@ function saveHandle() { |
|
|
|
params2.obuType = params.obuType; |
|
|
|
params2.filePath = fileListData.value[0]; |
|
|
|
let api = '/invw/api/transfer/add'; |
|
|
|
console.log("typeOption.value", typeOption.value) |
|
|
|
// console.log("typeOption.value", typeOption.value) |
|
|
|
if (typeOption.value === 'add') { |
|
|
|
delete params2.id |
|
|
|
} |
|
|
@@ -826,7 +823,7 @@ function saveHandle() { |
|
|
|
clearData(); |
|
|
|
emit("refreshDataList"); |
|
|
|
emit("closeHandle"); |
|
|
|
ElMessage.success("备货保存成功"); |
|
|
|
ElMessage.success("保存成功"); |
|
|
|
} else { |
|
|
|
btnLoding.value = false; |
|
|
|
ElMessage.error(res.message); |
|
|
@@ -948,7 +945,7 @@ function getSummaries(param) { |
|
|
|
|
|
|
|
// 获取仓库状态 |
|
|
|
function getLowerList() { |
|
|
|
console.log("获取仓库列表") |
|
|
|
// console.log("获取仓库列表") |
|
|
|
let params = { |
|
|
|
allType: 0 |
|
|
|
} |
|
|
@@ -965,7 +962,7 @@ function getLowerList() { |
|
|
|
|
|
|
|
// 获取仓库状态 |
|
|
|
function getAgency() { |
|
|
|
console.log("获取产权列表") |
|
|
|
// console.log("获取产权列表") |
|
|
|
BaseService.postN('/invw/agency/list').then((res: any) => { |
|
|
|
if (res && res.code === 0) { |
|
|
|
let bizContent = res.data |