|
|
@@ -257,9 +257,10 @@
|
|
257
|
257
|
</view>
|
|
258
|
258
|
</view>
|
|
259
|
259
|
<view :class="['btn_group', {'col-2': formData.stockStatus == '1'}]">
|
|
260
|
|
- <u-button plain type="primary" @click="submitForm('onlyIn')">保存</u-button>
|
|
261
|
|
- <u-button type="primary" @click="submitForm('inAndUp')" v-if="formData.stockStatus == '1'">入库并上架</u-button>
|
|
|
260
|
+ <u-button plain type="primary" @click="openInfoModal('onlyIn')">保存</u-button>
|
|
|
261
|
+ <u-button type="primary" @click="openInfoModal('inAndUp')" v-if="formData.stockStatus == '1'">入库并上架</u-button>
|
|
262
|
262
|
</view>
|
|
|
263
|
+ <moreInfo ref="moreInfoRef" :moreOptions="moreOptions" @confirm="handleMoreInfoConfirm" :isCopy="true" :showCancelButton="true"></moreInfo>
|
|
263
|
264
|
</view>
|
|
264
|
265
|
</template>
|
|
265
|
266
|
<script>
|
|
|
@@ -269,6 +270,7 @@ import BrandList from '@/components/brand-list/index.vue'
|
|
269
|
270
|
import ImgsRowScroll from '@/components/imgs-row-scroll/index.vue'
|
|
270
|
271
|
import PersonPicker from '@/components/person-picker/index.vue'
|
|
271
|
272
|
import { permissionCheck,getRoles } from '@/utils/util.js'
|
|
|
273
|
+import moreInfo from './moreInfo.vue'
|
|
272
|
274
|
import { productConditionList,productAttributeList,stockStatusList,recycleTypeList,labelList,paymentTabList } from '../js/public.js'
|
|
273
|
275
|
export default {
|
|
274
|
276
|
components: {
|
|
|
@@ -276,7 +278,8 @@ export default {
|
|
276
|
278
|
Cell,
|
|
277
|
279
|
BrandList,
|
|
278
|
280
|
ImgsRowScroll,
|
|
279
|
|
- PersonPicker
|
|
|
281
|
+ PersonPicker,
|
|
|
282
|
+ moreInfo
|
|
280
|
283
|
},
|
|
281
|
284
|
data() {
|
|
282
|
285
|
return {
|
|
|
@@ -392,6 +395,8 @@ export default {
|
|
392
|
395
|
recycleTypeList: recycleTypeList,
|
|
393
|
396
|
labelList: labelList,
|
|
394
|
397
|
paymentTabList: paymentTabList,
|
|
|
398
|
+ moreOptions: {},
|
|
|
399
|
+
|
|
395
|
400
|
}
|
|
396
|
401
|
},
|
|
397
|
402
|
onLoad(options) {
|
|
|
@@ -463,9 +468,27 @@ export default {
|
|
463
|
468
|
this.typeList = res
|
|
464
|
469
|
})
|
|
465
|
470
|
},
|
|
|
471
|
+ openInfoModal(submitType) {
|
|
|
472
|
+ this.$refs.addForm.validate().then(() => {
|
|
|
473
|
+ this.submitType = submitType
|
|
|
474
|
+ this.moreOptions = {
|
|
|
475
|
+ dictLabel: this.formData.dictLabel || '',
|
|
|
476
|
+ origin: this.formData.origin || '',
|
|
|
477
|
+ actualPrice: this.formData.actualPrice || '',
|
|
|
478
|
+ model: this.formData.model || '',
|
|
|
479
|
+ indentifyCode: this.formData.indentifyCode || '',
|
|
|
480
|
+ cardYear: this.formData.cardYear || '',
|
|
|
481
|
+ productDesc: this.formData.productDesc || '',
|
|
|
482
|
+ }
|
|
|
483
|
+ this.$refs.moreInfoRef.showMoreInfo();
|
|
|
484
|
+ })
|
|
|
485
|
+ },
|
|
|
486
|
+ handleMoreInfoConfirm() {
|
|
|
487
|
+ if(!permissionCheck('WAREHOUSER')) return false
|
|
|
488
|
+ this.submitForm(this.submitType)
|
|
|
489
|
+ },
|
|
466
|
490
|
// 提交表单
|
|
467
|
491
|
submitForm(submitType) {
|
|
468
|
|
- if(!permissionCheck('WAREHOUSER')) return false
|
|
469
|
492
|
this.$refs.addForm.validate().then((valid) => {
|
|
470
|
493
|
if (valid) {
|
|
471
|
494
|
if (this.formData.title == '') {
|
|
|
@@ -477,6 +500,7 @@ export default {
|
|
477
|
500
|
submitType: submitType, //提交类型 onlyIn:仅入库/暂存入库 inAndUp:入库并上架
|
|
478
|
501
|
continuousWarehousing: this.continuousWarehousing[0] || '0',//是否连续入库 1:是 0:否
|
|
479
|
502
|
}
|
|
|
503
|
+ this.$refs.moreInfoRef.closeModal();
|
|
480
|
504
|
if(this.formType == 'add'){
|
|
481
|
505
|
uni.$u.api.wareHouseAdd(data).then(res => {
|
|
482
|
506
|
uni.$u.toast('操作成功');
|