| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- <template>
- <view>
- <u-popup :show="show" closeOnClickOverlay mode="top" @close="closePopup">
- <view class="search_list">
- <u-form labelPosition="left" :model="form" labelWidth="140" labelAlign="left" class="baseForm"
- v-if="dataSources == 0">
- <u-form-item label="仓库名称:" class="item-form" borderBottom prop="assetType">
- <uni-data-select v-model="form.warehouseId" :clear="false" :localdata="warehouseList">
- </uni-data-select>
- </u-form-item>
- <u-form-item label="物品编码:" class="item-form" borderBottom prop="assetType">
- <uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="form.categoryCode"
- placeholder="请输入">
- </uni-easyinput>
- </u-form-item>
- <u-form-item label="物品名称:" class="item-form" borderBottom prop="assetType">
- <uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="form.categoryName"
- placeholder="请输入">
- </uni-easyinput>
- </u-form-item>
- <u-form-item label="批次号:" class="item-form" borderBottom prop="assetType">
- <uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="form.batchNo"
- placeholder="请输入">
- </uni-easyinput>
- </u-form-item>
- <u-form-item label="刻码:" class="item-form" borderBottom prop="assetType">
- <uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="form.engrave"
- placeholder="请输入">
- </uni-easyinput>
- </u-form-item>
- <u-form-item label="发货码:" class="item-form" borderBottom prop="assetType">
- <uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="form.barcodes"
- placeholder="请输入">
- </uni-easyinput>
- </u-form-item>
- <u-form-item label="牌号:" class="item-form" borderBottom prop="assetType">
- <uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="form.brandNum"
- placeholder="请输入">
- </uni-easyinput>
- </u-form-item>
- </u-form>
- <u-form labelPosition="left" :model="mainForm" labelWidth="140" labelAlign="left" class="baseForm"
- v-if="dataSources == 1">
- <u-form-item label="编码:" class="item-form" borderBottom prop="assetType">
- <uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="mainForm.code"
- placeholder="请输入">
- </uni-easyinput>
- </u-form-item>
- <u-form-item label="名称:" class="item-form" borderBottom prop="assetType">
- <uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="mainForm.name"
- placeholder="请输入">
- </uni-easyinput>
- </u-form-item>
- <u-form-item label="型号:" class="item-form" borderBottom prop="assetType">
- <uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="mainForm.modelType"
- placeholder="请输入">
- </uni-easyinput>
- </u-form-item>
- <u-form-item label="牌号:" class="item-form" borderBottom prop="assetType">
- <uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="mainForm.brandNum"
- placeholder="请输入">
- </uni-easyinput>
- </u-form-item>
- <u-form-item label="规格:" class="item-form" borderBottom prop="assetType">
- <uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="mainForm.specification"
- placeholder="请输入">
- </uni-easyinput>
- </u-form-item>
- </u-form>
- </view>
- <view class="operate_box rx-bc">
- <u-button size="small" class="u-reset-button" @click="show = false">
- 取消
- </u-button>
- <u-button size="small" class="u-reset-button" @click="reset">
- 重置
- </u-button>
- <u-button type="success" size="small" class="u-reset-button" @click="submit">
- 确定
- </u-button>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- import {
- getWarehouseList
- } from '@/api/salesServiceManagement/workOrder/index.js'
- export default {
- components: {},
- props: {
- dataSources: {
- type: String,
- default: ''
- }
- },
- data() {
- return {
- form: {
- warehouseId: "",
- categoryCode: "",
- categoryName: "",
- batchNo: '',
- engrave: '',
- barcodes: '',
- brandNum: ''
- },
- mainForm: {
- code: '',
- name: '',
- modelType: '',
- brandNum: '',
- specification: ''
- },
- show: false,
- warehouseList: []
- }
- },
- created() {
- this.getSearchData();
- },
- methods: {
- getSearchData() {
- console.log(this.dataSources, 'dataSources ---')
- if (this.dataSources == '1') return
- getWarehouseList({}).then((res) => {
- this.warehouseList = res.map(item => {
- item.text = item.name
- item.value = item.id
- return item
- })
- });
- },
- open() {
- this.show = true;
- },
- closePopup() {
- },
- reset() {
- if (this.dataSources == '1') {
- this.mainForm = {
- code: '',
- name: '',
- modelType: '',
- brandNum: '',
- specification: ''
- }
- } else {
- this.form = {
- warehouseId: "",
- categoryCode: "",
- categoryName: "",
- batchNo: '',
- engrave: '',
- barcodes: '',
- brandNum: ''
- }
- }
- this.submit();
- },
- submit() {
- if (this.dataSources == '1') {
- this.$emit('succeed', this.mainForm);
- } else {
- this.$emit('succeed', this.form);
- }
- this.show = false;
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .search_list {
- padding: 0 20rpx;
- }
- .operate_box {
- padding: 10rpx 32rpx;
- /deep/ .u-button {
- width: 30%;
- }
- }
- .item-form {
- /deep/ .u-form-item__body__left__content__label {
- font-size: 28rpx;
- }
- }
- </style>
|