|
@@ -1,11 +1,13 @@
|
|
|
import { required, diyRequired } from '@/components/template/rules_verify.js'
|
|
|
import { listPageV2 } from '@/api/auxiliaryFittings/supplier'
|
|
|
import { goodsPurchaseList, goodsPurchaseDetail } from '@/api/goodsPurchasedStored.js'
|
|
|
+import { storageListPageV2 } from '@/api/storage.js'
|
|
|
import ImageUpload from '@/components/file-upload'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
gysList: [],
|
|
|
+ warehouseList: [],
|
|
|
cgrkOrder: []
|
|
|
}
|
|
|
},
|
|
@@ -44,10 +46,10 @@ export default {
|
|
|
<el-descriptions
|
|
|
border
|
|
|
title=""
|
|
|
- column={2}
|
|
|
+ column={3}
|
|
|
colon={false}
|
|
|
labelStyle={{ width: '8%' }}
|
|
|
- contentStyle={{ width: '42%' }}
|
|
|
+ contentStyle={{ width: '25%' }}
|
|
|
style="margin-top:-1px"
|
|
|
>
|
|
|
<el-descriptions-item label="*供应商名称">
|
|
@@ -88,6 +90,38 @@ export default {
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-descriptions-item>
|
|
|
+ <el-descriptions-item label={(JSON.parse(localStorage.getItem('greemall_user')).joinCode === "NO"?'':'*') + (!!~['merchandisePurchaseReturn'].indexOf(this?.$route?.name) ?'出库仓库':'入库仓库')}>
|
|
|
+ <div class="redbordererr">
|
|
|
+ <el-form-item label="" lebel-width="0px" prop={`storageId`} rules={JSON.parse(localStorage.getItem('greemall_user')).joinCode === "NO"?[]:[diyRequired.bind(this)((rule, value)=>{
|
|
|
+ if(this.logs){
|
|
|
+ this.logs.push({errMsg:`*仓库不能为空`})
|
|
|
+ }
|
|
|
+ this?.tishicuowu?.()
|
|
|
+ return new Error('必须填写')
|
|
|
+ })]}>
|
|
|
+ <el-select
|
|
|
+ style="width:100%"
|
|
|
+ value={this.formData.storageId}
|
|
|
+ onInput={val => {
|
|
|
+ this.formData.storageId = val
|
|
|
+ }}
|
|
|
+ placeholder="请选择"
|
|
|
+ disabled={!!~['WAIT', 'OK', 'FAIL'].indexOf(this.formData.status) || !!~['merchandisePurchaseReturn'].indexOf(this?.$route?.name)}
|
|
|
+ onChange={val => {
|
|
|
+ if (val) {
|
|
|
+ this.formData['storageName'] = this.warehouseList.find(item => item.storageId == val).storageName
|
|
|
+ } else {
|
|
|
+ this.formData['storageName'] = ''
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {this.warehouseList.map(item => (
|
|
|
+ <el-option key={item.storageId} label={item.storageName} value={item.storageId}></el-option>
|
|
|
+ ))}
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </el-descriptions-item>
|
|
|
{!!~['merchandisePurchaseReturn'].indexOf(this?.$route?.name) ? (
|
|
|
<el-descriptions-item label="*采购入库单">
|
|
|
<div class="redbordererr">
|
|
@@ -266,6 +300,15 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ getWarehouseList(){
|
|
|
+ storageListPageV2({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: -1,
|
|
|
+ params: [{param: "a.type", compare: "like", value: "商品"}]
|
|
|
+ }).then(res => {
|
|
|
+ this.warehouseList = res.data.records
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|